STSADM and "Command line error"

Are you trying to execute STSADM commands and getting frustrated because you are getting "Command line error"? Are you completely sure the command you typed is perfectly valid and going insane for why it is not being interpreted properly? Fear no more, because you are not alone.

Fortunately, this problem and its solution was already discovered by several people. If you read SharePoint stsadm.exe and the infamous "Command line error" from Serge van den Oever, you will have all the information you need.

The problem is in the encoding of the text. It appears to be possible to get different encodings while you type your commands in the same command shell. Pretty strange...

Anyway, the solution is to use a text editor, write your commands there and make sure the encoding is set to ANSI. You can then copy your commands to the command shell or save them as a batch file.

Nuno Freitas
Posted by Nuno Freitas on August 14, 2013

Related articles