Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

STSADM: Command Line Error

Posted by Steve Pietrek on February 19, 2009

I was working with a coworker yesterday. He was having an issue deploying a solution. Reviewing the STSADM command, things looked correct; however, when he hit Enter to run the command, all the STSADM commands would display. Similar to what happens when you run STSADM.EXE -help. Scrolling to the top of the list of commands was the “Command Line Error”.  Turns out he was copying the command from a blog post of mine and WordPress must do something with the dashes (similar issue with quotes).

Long story short, instead of copying/pasting STSADM commands, type the command manually. Problem solved.

Advertisements

5 Responses to “STSADM: Command Line Error”

  1. Yep. Smart quotes and dashes somehow get pasted into the Windows Command Shell when you’re coming from an application that uses them (such as Outlook or Word) and STSADM.exe doesn’t like smart quotes. This can *really* be a frustrating issue to sort out. Bottom line, when in doubt you should always type out your STSADM commands.

  2. The problem is one that has to do with applications encoding text as unicode, the cmd window is using the ANSI encoding to display and recieve text and thus the unicode imports will be garbled.

    Serge van den Oever has posted an article on his blog explaining the problem and a solution to once again copy and pate your way through implementations using the famous 128 character long stsadm commands ;-).

    His post can be found here: http://weblogs.asp.net/soever/archive/2007/12/22/sharepoint-stsadm-exe-and-the-infamous-quot-command-line-error-quot.aspx

    In sumary his advise is to use an application like Notepad++ to paste the text in and then switch the encoding to ANSI from there a copy paste will once again work as expected.

    Regards,

    Willem Bruinius

  3. Been a while since i last had this issue and posted from memory, saw my memory is somewhat sloppy on the issue so i figured i repost the correct sollution 😉

    The problem is one that has to do with applications encoding text as ANSI, the stsadm executambe is using the UTF-8 encoding to recieve input and thus the commans pasted in ANSI will fail.

    Serge van den Oever has posted an article on his blog explaining the problem and a solution to once again copy and pate your way through implementations using the famous 128 character long stsadm commands .

    His post can be found here: http://weblogs.asp.net/soever/archive/2007/12/22/sharepoint-stsadm-exe-and-the-infamous-quot-command-line-error-quot.aspx

    In sumary his advise is to use an application like Notepad++ to paste the text in and then switch the encoding to UTF-8 from there a copy paste will once again work as expected.

    Regards,

    Willem Bruinius

  4. James Cod said

    Post 1:
    ——-
    Crazy workaround, I’m gonna try it now & post my response in few minutes

  5. James Cod said

    Part 2:
    ——

    Hi, this is James again, It worked !! stupid MS cmd , gotta switch Note++

Sorry, the comment form is closed at this time.

 
%d bloggers like this: