SharePoint 2010 PowerShell

If Url (Sub Site ) contains Spaces Enable-SPFeature fails,

Tried, 1) Enable-SPFeature –Identity 8c7cfc9f-a19a-4604-8b1b-db11d77d3d0b –URL "Complete Server + Sub Site with spaces" Results : Enable-SPFeature : 0x80070002Th ere is no Web named "/Hello+World". At line:1 char:17 + Enable-SPFeature <<<< -Identity 8c7cfc9f-a19a-4604-8b1b-db11d77d3d0b -Url "h ttp://vm7491/Hello World" + CategoryInfo : InvalidData: (Microsoft.Share...etEnableFeature: SPCmdletEnableFeature) [Enable-SPFeature], FileNotFoundException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFe ature


Replace any spaces with %20 in the URL


You should always use ' or " when working with strings that contains spaces in PowerShell.

Ex. 'http://myisteurl.com/sites/something/My sub site'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.