Friday, December 2, 2011

STSADM ' - ' Command line error

All parameters passed to stsadm command are correct but it still complains about "Command line error". This is an encoding issue.

e.g. If this command does not work on cmd prompt,
       stsadm -o enumsites -url http://myurl -databasename dbname
      - Paste this command in a notepad and try to search for -databasename 
      - Notepad will return "cannot find -databasename " although you can see it there.
The '-' is not getting encoded correctly. Simply delete the - and retype it in notepad. Copy and paste it in cmd prompt and execute. It will work. This problem may occur with any '-' parameter.


No comments:

Post a Comment