Disable Mobile view

In case you need to disable the mobile view in all your SharePoint Sites, the following code can be used:

$sites = get-spwebapplication http://mss2013be | Get-spsite -limit ALL
foreach ($site in $sites) {
foreach ($web in $site.AllWebs) {

Disable-SPFeature -identity d95c97f3-e528-4da2-ae9f-32b3535fbb59 -URL $Web.URL -Force -Confirm:$false
write-host "Feature desactivada en el sitio: $($Web.Url)"
}
}

A similar code can be used for SharePoint Online, in this case will change the way how you connect to SPO and how you deactivate the feature from SPO, in this case the command is: Disable-SPOFeature

Enjoy!

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