salt.modules.win_license#
This module allows you to manage windows licensing via slmgr.vbs
salt '*' license.install XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
- salt.modules.win_license.activate()#
Attempt to activate the current machine via Windows Activation
CLI Example:
salt '*' license.activate
- salt.modules.win_license.info()#
Return information about the license, if the license is not correctly activated this will return None.
CLI Example:
salt '*' license.info
- salt.modules.win_license.install(product_key)#
Install the given product key
- Parameters:
product_key (str) -- The product key to install.
- Returns:
The output of the
slmgr.vbsscript- Return type:
CLI Example:
salt '*' license.install XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
- salt.modules.win_license.installed(product_key)#
Check to see if the product key is already installed.
- Note: This is not 100% accurate as we can only see the last
5 digits of the license.
- Parameters:
product_key (str) -- The product key to check.
- Returns:
Trueif the last 5 digits match the current product key,otherwise
False.
- Return type:
CLI Example:
salt '*' license.installed XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
- salt.modules.win_license.licensed()#
Return true if the current machine is licensed correctly
CLI Example:
salt '*' license.licensed
- salt.modules.win_license.uninstall()#
Uninstall the current product key
CLI Example:
salt '*' license.uninstall