this is slightly off-topic for this forum and is far too dependent on how you want to store the credentials on the (windows based?) server side. A simple batch job which does a
find "username/password" my-not-so-secret-file.txt
would do what you request, but I hardly think it is what you want.
Look into Windows Powershell programming for more advanced shell scripting on windows.