{"id":627,"date":"2010-04-10T13:35:00","date_gmt":"2010-04-10T13:35:00","guid":{"rendered":"https:\/\/brainlitter.itgroove.net\/2010\/04\/10\/stsadm-and-command-is-invalid\/"},"modified":"2010-04-10T13:35:00","modified_gmt":"2010-04-10T13:35:00","slug":"stsadm-and-command-is-invalid","status":"publish","type":"post","link":"https:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/","title":{"rendered":"STSADM and &#8220;command is invalid&#8221;"},"content":{"rendered":"<div class=\"ExternalClass71A5A0DFF4E34428A50425FC918C0545\">\n<p>Hey folks,<\/p>\n<p>I&#8217;ve seen this enough that it warranted blogging about it specifically. Here&#8217;s the deal&#8230;<\/p>\n<\/p>\n<h2>Problem<\/h2>\n<p>When running an STSADM command in SharePoint, you get a result of <span style=\"color:#c0504d;font-size:14pt\">command is invalid<\/span>&#8221; following what you believe to be perfectly good syntax.  And you know what, it might well be.  But what you probably did is cut and pasted the command from a website somewhere.  Yep, at 2am when you are busy troubleshooting, you found some comment or instruction in a web based blog or forum that instructed you to perform something.  Rather than typing the command in yourself, you instead cut and pasted (why not, I do that all the time too ;).<\/p>\n<\/p>\n<p>The problem is, from the HTML page to your DOS prompt to the fussy STSADM command, the ASCII characters probably got skewed (you know what, it might not be ASCII, I don&#8217;t really know &#8230; or care, all I know is the &#8220;-&#8221; in the command is different or munged).<\/p>\n<\/p>\n<h2>The Solution<\/h2>\n<p>It&#8217;s really simple.  Don&#8217;t give up on your syntax and\/or research.  Simply augment your approach.  You have two choices really:<\/p>\n<\/p>\n<p><span style=\"color:#365f91\"><strong>Option 1:<\/strong><\/span> Don&#8217;t cut and paste (meh, I&#8217;m still going to do that, so on to Choice #2)<\/p>\n<\/p>\n<p><span style=\"color:#365f91\"><strong>Option 2:<\/strong><\/span> After the cut and paste and running the command fails, simply go through the command syntax in the DOS\/CMD prompt and replace all the extended characters like #$%&amp; and particularly the dash &#8220;-&#8221; with a retype on  your keyboard, replacing the non-valid characters with valid characters<\/p>\n<ul>\n<li><em>Note: Usually it will bitch about the last entry in the STSADM syntax, such as -force which is often the last instruction you&#8217;ll give in many commands, such as &#8220;psconfig -cmd upgrade -inplace b2b -wait -force&#8221;<\/em><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hey folks, I&#8217;ve seen this enough that it warranted blogging about it specifically. Here&#8217;s the deal&#8230; Problem When running an STSADM command in SharePoint, you get a result of command is invalid&#8221; following what you believe to be perfectly good syntax. And you know what, it might well be. But what you probably did is &hellip; <a href=\"https:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[337,14,334,338,339],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>STSADM and &quot;command is invalid&quot; - Brainlitter - Inside the mind of Sean Wallbridge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STSADM and &quot;command is invalid&quot; - Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"og:description\" content=\"Hey folks, I&#8217;ve seen this enough that it warranted blogging about it specifically. Here&#8217;s the deal&#8230; Problem When running an STSADM command in SharePoint, you get a result of command is invalid&#8221; following what you believe to be perfectly good syntax. And you know what, it might well be. But what you probably did is &hellip;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\" \/>\n<meta property=\"og:site_name\" content=\"Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"article:published_time\" content=\"2010-04-10T13:35:00+00:00\" \/>\n<meta name=\"author\" content=\"Sean Wallbridge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Wallbridge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\",\"url\":\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\",\"name\":\"STSADM and \\\"command is invalid\\\" - Brainlitter - Inside the mind of Sean Wallbridge\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\"},\"datePublished\":\"2010-04-10T13:35:00+00:00\",\"dateModified\":\"2010-04-10T13:35:00+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\"},\"breadcrumb\":{\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Brainlitter\",\"item\":\"https:\/\/regroove.ca\/brainlitter\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STSADM and &#8220;command is invalid&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\",\"url\":\"https:\/\/regroove.ca\/brainlitter\/\",\"name\":\"Brainlitter - Inside the mind of Sean Wallbridge\",\"description\":\"Dad. Husband. Drummer. Learner of Things.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\",\"name\":\"Sean Wallbridge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"caption\":\"Sean Wallbridge\"},\"url\":\"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STSADM and \"command is invalid\" - Brainlitter - Inside the mind of Sean Wallbridge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/","og_locale":"en_US","og_type":"article","og_title":"STSADM and \"command is invalid\" - Brainlitter - Inside the mind of Sean Wallbridge","og_description":"Hey folks, I&#8217;ve seen this enough that it warranted blogging about it specifically. Here&#8217;s the deal&#8230; Problem When running an STSADM command in SharePoint, you get a result of command is invalid&#8221; following what you believe to be perfectly good syntax. And you know what, it might well be. But what you probably did is &hellip;","og_url":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/","og_site_name":"Brainlitter - Inside the mind of Sean Wallbridge","article_published_time":"2010-04-10T13:35:00+00:00","author":"Sean Wallbridge","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Wallbridge","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/","url":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/","name":"STSADM and \"command is invalid\" - Brainlitter - Inside the mind of Sean Wallbridge","isPartOf":{"@id":"https:\/\/regroove.ca\/brainlitter\/#website"},"datePublished":"2010-04-10T13:35:00+00:00","dateModified":"2010-04-10T13:35:00+00:00","author":{"@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77"},"breadcrumb":{"@id":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/regroove.ca\/brainlitter\/2010\/04\/10\/stsadm-and-command-is-invalid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Brainlitter","item":"https:\/\/regroove.ca\/brainlitter\/"},{"@type":"ListItem","position":2,"name":"STSADM and &#8220;command is invalid&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/brainlitter\/#website","url":"https:\/\/regroove.ca\/brainlitter\/","name":"Brainlitter - Inside the mind of Sean Wallbridge","description":"Dad. Husband. Drummer. Learner of Things.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77","name":"Sean Wallbridge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","caption":"Sean Wallbridge"},"url":"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/627"}],"collection":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/comments?post=627"}],"version-history":[{"count":0,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/627\/revisions"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/media?parent=627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/categories?post=627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/tags?post=627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}