Manage Windows features via the ServerManager powershell module. Can install and remove roles/features.
maintainer: | Shane Lee <slee@saltstack.com> |
---|---|
platform: | Windows Server 2008R2 or greater |
depends: | win_servermanager.install |
depends: | win_servermanager.remove |
salt.states.win_servermanager.
__virtual__
()¶Load only if win_servermanager is loaded
salt.states.win_servermanager.
installed
(name, features=None, recurse=False, restart=False, source=None, exclude=None, **kwargs)¶Install the windows feature. To install a single feature, use the name
parameter. To install multiple features, use the features
parameter.
Note
Some features require reboot after un/installation. If so, until the server is restarted other features can not be installed!
Parameters: |
|
---|
Example
Do not use the role or feature names mentioned in the PKGMGR documentation. To get a list of available roles and features run the following command:
salt <minion_name> win_servermanager.list_available
Use the name in the right column of the results.
# Installs the IIS Web Server Role (Web-Server)
IIS-WebServerRole:
win_servermanager.installed:
- recurse: True
- name: Web-Server
# Install multiple features, exclude the Web-Service
install_multiple_features:
win_servermanager.installed:
- recurse: True
- features:
- RemoteAccess
- XPS-Viewer
- SNMP-Service
- exclude:
- Web-Service
salt.states.win_servermanager.
removed
(name, features=None, remove_payload=False, restart=False)¶Remove the windows feature To remove a single feature, use the name
parameter. To remove multiple features, use the features
parameter.
Parameters: |
|
---|
Note
Some features require a reboot after uninstall. If so the feature will not be completely uninstalled until the server is restarted.
Example
Do not use the role or feature names mentioned in the PKGMGR documentation. To get a list of available roles and features run the following command:
salt <minion_name> win_servermanager.list_available
Use the name in the right column of the results.
# Uninstall the IIS Web Server Rol (Web-Server)
IIS-WebserverRole:
win_servermanager.removed:
- name: Web-Server
# Uninstall multiple features, reboot if required
uninstall_multiple_features:
win_servermanager.removed:
- features:
- RemoteAccess
- XPX-Viewer
- SNMP-Service
- restart: True
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 2018.3.0