I realize this is a long-shot, but has your password changed recently?
With a command string like this, a lot of people use .bat files to automate the process.
I dislike using passwords in .bat files because:
- They are not secure (obvious, I know)
- Maintenance. Every time you update your password, you would have to remember to update every script. Or painfully troubleshoot every failure and finally remember that the password was embedded.
To mitigate this I use SET with a /P parameter to prompt for a password during .bat file execution.
Not perfect, but a lot better than hard coding a password.
Here is an example using the command string you supplied:
rem ----- begin script -----
SET /P pwd=Password:
CrmSvcUtil.exe /out:E:\OrgXrm.cs /url:https://mdtestuser.api.crm5.dynamics.com/XRMServices/2011/Organization.svc
/username:[email protected] /password:%pwd%
CLS
SET pwd=.
rem ----- end script -----
In this example the SET /P tells the command processor to set an environment variable and prompt for the input.
“pwd” is the environment variable being set.
“%pwd%” is the actual use of the environment variable.
“Password:” is the prompt string that will be displayed when the .bat file is run.
“CLS” clears the screen.
“pwd=.” sets the environment variable to “.” so the password is not left in the environment.
You can ignore the lines beginning with “rem” as they are simply remarks.
The “not perfect” part of the solution is that your password is visible as you type. However by clearing the screen immediately following the prompt it is cleared from the screen right away. There are other ways to prevent the password from being visible as you type, however I think they are vastly over complicated or require downloading some additional bits. The idea of using a .bat file is that it is quick and easily updatable ergo low maintenance.
The SET /P works well in my case as no one is looking over my shoulder whenever I need to refresh my file, and there is virtually no maintenance once the .bat file is written.