Knowledgebase: SharePoint ShortUrl
Activate SharePoint ShortUrl Features to all Sites
Posted by CIRRUS SOFT SUPPORT, Last modified by CIRRUS SOFT SUPPORT on 09 May 2017 09:17 AM

SharePoint ShortUrl Features are Activated on a Site by Site basis. The Below PowerShell Script will enable the selected SharePoint ShortUrl Features to all Sites within a specified Web Application on which SharePoint ShortUrl is Activated.

Please refer to the SharePoint ShortUrl 2013 Features & Commands List to get the correct Feature names that you require (Activation Command (column) > -Identity).


------------------------- PowerShell Script / edit as required-------------------------


$webapp = Get-SPWebApplication "https://webapp"

 $sites = $webapp | Get-SPSite -Limit All

 $webs = $sites | Get-SPWeb -Limit ALL

 $shorturlactivationId = $(Get-SPFeature -limit all | where {$_.displayname -eq "ShortUrl2013_ShortUrlECMLink"}).Id

 $shorturleventreceiverautoupdateId = $(Get-SPFeature -limit all | where {$_.displayname -eq "ShortUrl2013_ShortUrlEventReceiver-AUTOUPDATE"}).Id

 $shorturlshowmyshorturlId = $(Get-SPFeature -limit all | where {$_.displayname -eq "ShortUrl2013_ShortUrlShowMyShortUrls"}).Id

 $webs | % {Enable-SPFeature $shorturlactivationId -Url $_.Url}

 $webs | % {Enable-SPFeature $shorturleventreceiverautoupdateId -Url $_.Url}

 $webs | % {Enable-SPFeature $shorturlshowmyshorturlId -Url $_.Url}


Comments (0)
Post a new comment
Full Name: