salt.states.win_dism#
Installing of Windows features using DISM#
Install Windows features, capabilities, and packages 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
- Parameters:
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
image (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the install
Example
Run
dism.available_capabilitiesto get a list of available capabilities. This will help you get the proper name to useinstall_dotnet35: dism.capability_installed: - name: NetFX3~~~~
- salt.states.win_dism.capability_removed(name, image=None, restart=False)#
Uninstall a DISM capability
- Parameters:
Example
Run
dism.installed_capabilitiesto get a list of installed capabilities. This will help you get the proper name to useremove_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
- Parameters:
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
enable_parent (Optional[bool]) --
Truewill enable all parent features of the specified featureimage (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the install
Example
Run
dism.available_featuresto get a list of available features. This will help you get the proper name to useinstall_telnet_client: dism.feature_installed: - name: TelnetClient
- salt.states.win_dism.feature_removed(name, remove_payload=False, image=None, restart=False)#
Disables a feature.
- Parameters:
name (str) -- The feature to disable
remove_payload (Optional[bool]) -- Remove the feature's payload. Must supply source when enabling in the future.
image (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the uninstall
Example
Run
dism.installed_featuresto get a list of installed features. This will help you get the proper name to useremove_telnet_client: dism.feature_removed: - name: TelnetClient - remove_payload: True
- salt.states.win_dism.kb_removed(name, image=None, restart=False)#
Uninstall a KB package
New in version 3006.0.
- Parameters:
name (str) -- The name of the KB. Can be with or without the KB at the beginning
image (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the uninstall
Example
# Example using full KB name remove_KB1231231: dism.package_installed: - name: KB1231231 # Example using just he KB number remove_KB1231231: dism.package_installed: - name: 1231231
- salt.states.win_dism.package_installed(name, ignore_check=False, prevent_pending=False, image=None, restart=False)#
Install a package.
- Parameters:
name (str) -- The package to install. Can be a .cab file, a .msu file, or a folder
ignore_check (Optional[bool]) -- Skip installation of the package if the applicability checks fail
prevent_pending (Optional[bool]) -- Skip the installation of the package if there are pending online actions
image (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (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
- Parameters:
name (str) -- The full path to the package. Can be either a .cab file or a folder. Should point to the original source of the package, not to where the file is installed. This can also be the name of a package as listed in
dism.installed_packagesimage (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the uninstall
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
- salt.states.win_dism.provisioned_package_installed(name, image=None, restart=False)#
Provision a package on a Windows image.
New in version 3007.0.
- Parameters:
name (str) --
The package to install. Can be one of the following:
.appxor.appxbundle.msixor.msixbundle.ppkg
The name of the file before the file extension must match the name of the package after it is installed. This name can be found by running
dism.provisioned_packagesimage (Optional[str]) -- The path to the root directory of an offline Windows image. If
Noneis passed, the running operating system is targeted. Default isNonerestart (Optional[bool]) -- Reboot the machine if required by the installation. Default is
False
Example
install_windows_media_player: dism.provisioned_package_installed: - name: C:\Packages\Microsoft.ZuneVideo_2019.22091.10036.0_neutral_~_8wekyb3d8bbwe.Msixbundle