Install windows features/capabilties with DISM
Language.Basic~~~en-US~0.0.1.0:
dism.capability_installed
NetFx3:
dism.feature_installed
salt.states.win_dism.
capability_installed
(name, source=None, limit_access=False, image=None, restart=False)¶Install a DISM capability
name (str): The capability to install source (str): The optional source of the capability limit_access (bool): Prevent DISM from contacting Windows Update for
online images
restart (Optional[bool]): Reboot the machine if required by the install
Run dism.available_capabilities
to get a list of available
capabilities. This will help you get the proper name to use.
install_dotnet35:
dism.capability_installed:
- name: NetFX3~~~~
salt.states.win_dism.
capability_removed
(name, image=None, restart=False)¶Uninstall a DISM capability
name (str): The capability to uninstall image (Optional[str]): The path to the root directory of an offline
Windows image. If None is passed, the running operating system is targeted. Default is None.
restart (Optional[bool]): Reboot the machine if required by the install
Run dism.installed_capabilities
to get a list of installed
capabilities. This will help you get the proper name to use.
remove_dotnet35:
dism.capability_removed:
- name: NetFX3~~~~
salt.states.win_dism.
feature_installed
(name, package=None, source=None, limit_access=False, enable_parent=False, image=None, restart=False)¶Install a DISM feature
name (str): The feature in which to install package (Optional[str]): The parent package for the feature. You do not
have to specify the package if it is the Windows Foundation Package. Otherwise, use package to specify the parent package of the feature
source (str): The optional source of the feature limit_access (bool): Prevent DISM from contacting Windows Update for
online images
restart (Optional[bool]): Reboot the machine if required by the install
Run dism.available_features
to get a list of available features.
This will help you get the proper name to use.
install_telnet_client:
dism.feature_installed:
- name: TelnetClient
salt.states.win_dism.
feature_removed
(name, remove_payload=False, image=None, restart=False)¶Disables a feature.
name (str): The feature to disable remove_payload (Optional[bool]): Remove the feature's payload. Must
supply source when enabling in the future.
restart (Optional[bool]): Reboot the machine if required by the install
Run dism.installed_features
to get a list of installed features.
This will help you get the proper name to use.
remove_telnet_client:
dism.feature_removed:
- name: TelnetClient
- remove_payload: True
salt.states.win_dism.
package_installed
(name, ignore_check=False, prevent_pending=False, image=None, restart=False)¶Install a package.
restart (Optional[bool]): Reboot the machine if required by the install
Example:
install_KB123123123: dism.package_installed: - name: C:\Packages\KB123123123.cab
salt.states.win_dism.
package_removed
(name, image=None, restart=False)¶Uninstall a package
dism.installed_packages
restart (Optional[bool]): Reboot the machine if required by the install
Example:
# Example using source remove_KB1231231: dism.package_installed: - name: C:\Packages\KB1231231.cab # Example using name from ``dism.installed_packages`` remove_KB1231231: dism.package_installed: - name: Package_for_KB1231231~31bf3856ad364e35~amd64~~10.0.1.3