Disable Open in Client Feature on All Site Collection in a Web Application

Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue
$Connect = Get-SPWebApplication https://portal.contoso.com

$Sites = $Connect.Sites
ForEach ($Site in $Sites)
{ 
    Write-Host "Open Documents in Client Applications Feature for: $Site" -foregroundcolor Yellow;
    Disable-SPFeature -id 8a4b8de2-6fd8-41e9-923c-c7c3c00f8295 -URL $Site.Url -Force -Confirm:$false
    Write-Host "Open Documents in Client Applications Feature for: $Site is now Disabled" -foregroundcolor Green;
    $Site.Dispose()
}    
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s