Enable/Disable site features from powershell
-
07-02-2021 - |
Question
I need to activate the Team Collaboration Lists feature and deactivate the Minimal Download strategy in a user's blog and personal site. I am a farm admin, is that possible using powershell?
UPDATE: Some features are not showing up in some sites. See the differences:
How can I enable the Team Collaboration Features in a particular site if this is not available?
Solution
If you are farm-admin and you can use server-code. PowerShell can be used.
Use Enable-SPFeature
or Disable-SPFeature
If you use Get-SPFeature
keep in mind, that (mostly) only enabled features are listed. The docs says:
The Get-SPFeature cmdlet behaves differently at each scope, returning the enabled Features at each level. If no scope is provided, all installed Features are returned.