Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

Replace any spaces with %20 in the URL

share|improve this answer
add comment

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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