neulab/tldr huggingface dataset:
salt '*' win_pki.test_cert thumbprint='AAA000' dns_name='example.test'
salt.modules.win_powercfg This module allows you to control the power settings of a windows minion via powercfg.
# Set monitor to never turn off on Battery power salt '*' powercfg.set_monitor_timeout 0 power=dc # Set disk timeout to 120 minutes on AC power salt '*' powercfg.set_disk_timeout 120 power=ac
salt.modules.win_powercfg.get_disk_timeout(scheme=None) Get the current disk timeout of the given scheme
Parameters scheme (str) --
The scheme to use, leave as None to use the current. Default is None. This can be the GUID or the Alias for the Scheme. Known Aliases are:
• SCHEME_BALANCED - Balanced
• SCHEME_MAX - Power saver
• SCHEME_MIN - High performance
Returns A dictionary of both the AC and DC settings
salt '*' powercfg.get_disk_timeout
salt.modules.win_powercfg.get_hibernate_timeout(scheme=None) Get the current hibernate timeout of the given scheme
scheme (str): The scheme to use, leave as None to use the current. Default is None. This can be the GUID or the Alias for the Scheme. Known Aliases are:
salt '*' powercfg.get_hibernate_timeout
salt.modules.win_powercfg.get_monitor_timeout(scheme=None) Get the current monitor timeout of the given scheme
salt '*' powercfg.get_monitor_timeout
salt.modules.win_powercfg.get_standby_timeout(scheme=None) Get the current standby timeout of the given scheme
salt '*' powercfg.get_standby_timeout
salt.modules.win_powercfg.set_disk_timeout(timeout, power='ac', scheme=None) Set the disk timeout in minutes for the given power scheme
• timeout (int) -- The amount of time in minutes before the disk will timeout
• power (str) --
Set the value for AC or DC power. Default is ac. Valid options are:
• ac (AC Power)
• dc (Battery)
• scheme (str) --
# Sets the disk timeout to 30 minutes on battery salt '*' powercfg.set_disk_timeout 30 power=dc
salt.modules.win_powercfg.set_hibernate_timeout(timeout, power='ac', scheme=None) Set the hibernate timeout in minutes for the given power scheme
• timeout (int) -- The amount of time in minutes before the computer hibernates
# Sets the hibernate timeout to 30 minutes on Battery salt '*' powercfg.set_hibernate_timeout 30 power=dc
salt.modules.win_powercfg.set_monitor_timeout(timeout, power='ac', scheme=None) Set the monitor timeout in minutes for the given power scheme
• timeout (int) -- The amount of time in minutes before the monitor will timeout
# Sets the monitor timeout to 30 minutes salt '*' powercfg.set_monitor_timeout 30
salt.modules.win_powercfg.set_standby_timeout(timeout, power='ac', scheme=None) Set the standby timeout in minutes for the given power scheme
• timeout (int) -- The amount of time in minutes before the computer sleeps
# Sets the system standby timeout to 30 minutes on Battery salt '*' powercfg.set_standby_timeout 30 power=dc
salt.modules.win_psget Module for managing PowerShell through PowerShellGet (PSGet)
• PSGet
Support for PowerShell
salt.modules.win_psget.avail_modules(desc=False) List available modules in registered Powershell module repositories.
Parameters desc (bool) -- If True, the verbose description will be returned.
salt 'win01' psget.avail_modules salt 'win01' psget.avail_modules desc=True
salt.modules.win_psget.bootstrap() Make sure that nuget-anycpu.exe is installed.  This will download the official nuget-anycpu.exe from the internet.
salt 'win01' psget.bootstrap
salt.modules.win_psget.get_repository(name) Get the details of a local PSGet repository
Parameters name (str) -- Name of the repository
salt 'win01' psget.get_repository MyRepo
salt.modules.win_psget.install(name, minimum_version=None, required_version=None, scope=None, repository=None) Install a Powershell module from powershell gallery on the system.
• name (str) -- Name of a Powershell module
• minimum_version (str) -- The maximum version to install, e.g. 1.23.2
• required_version (str) -- Install a specific version
• scope (str) -- The scope to install the module to, e.g. CurrentUser, Computer
• repository (str) -- The friendly name of a private repository, e.g. MyREpo
salt 'win01' psget.install PowerPlan
salt.modules.win_psget.list_modules(desc=False) List currently installed PSGet Modules on the system.
salt 'win01' psget.list_modules salt 'win01' psget.list_modules desc=True
salt.modules.win_psget.register_repository(name, location, installation_policy=None) Register a PSGet repository on the local machine
• name (str) -- The name for the repository
• location (str) -- The URI for the repository
• installation_policy (str) -- The installation policy for packages, e.g. Trusted, Untrusted
salt 'win01' psget.register_repository MyRepo https://myrepo.mycompany.com/packages
salt.modules.win_psget.remove(name) Remove a Powershell DSC module from the system.
Parameters name (str) -- Name of a Powershell DSC module
salt 'win01' psget.remove PowerPlan
salt.modules.win_psget.update(name, maximum_version=None, required_version=None) Update a PowerShell module to a specific version, or the newest
• maximum_version (str) -- The maximum version to install, e.g. 1.23.2
salt 'win01' psget.update PowerPlan
salt.modules.win_servermanager Manage Windows features via the ServerManager powershell module. Can list available and installed roles/features. Can install and remove roles/features.
maintainer Shane Lee <slee@saltstack.com>
platform Windows Server 2008R2 or greater
depends PowerShell module ServerManager
salt.modules.win_servermanager.install(feature, recurse=False, restart=False, source=None, exclude=None) Install a feature
NOTE: Some features require reboot after un/installation, if so until the server is restarted other features can not be installed!
NOTE: Some features take a long time to complete un/installation, set -t with a long timeout
• feature (str, list) --
The name of the feature(s) to install. This can be a single feature, a string of features in a comma delimited list (no spaces), or a list of features.
New in version 2018.3.0: Added the ability to pass a list of features to be installed.
• recurse (Options[bool]) -- Install all sub-features. Default is False
• restart (Optional[bool]) -- Restarts the computer when installation is complete, if required by the role/feature installed. Will also trigger a reboot if an item in exclude requires a reboot to be properly removed. Default is False
• source (Optional[str]) -- Path to the source files if missing from the target system. None means that the system will use windows update services to find the required files. Default is None
• exclude (Optional[str]) --
The name of the feature to exclude when installing the named feature. This can be a single feature, a string of features in a comma-delimited list (no spaces), or a list of features.
WARNING: As there is no exclude option for the Add-WindowsFeature or Install-WindowsFeature PowerShell commands the features named in exclude will be installed with other sub-features and will then be removed. If the feature named in ``exclude`` is not a sub-feature of one of the installed items it will still be removed.
Returns A dictionary containing the results of the install
# Install the Telnet Client passing a single string salt '*' win_servermanager.install Telnet-Client
# Install the TFTP Client and the SNMP Service passing a comma-delimited # string. Install all sub-features salt '*' win_servermanager.install TFTP-Client,SNMP-Service recurse=True
# Install the TFTP Client from d:\side-by-side salt '*' win_servermanager.install TFTP-Client source=d:\\side-by-side
# Install the XPS Viewer, SNMP Service, and Remote Access passing a # list. Install all sub-features, but exclude the Web Server salt '*' win_servermanager.install "['XPS-Viewer', 'SNMP-Service', 'RemoteAccess']" True recurse=True exclude="Web-Server"
salt.modules.win_servermanager.list_available() List available features to install
Returns A list of available features as returned by the Get-WindowsFeature PowerShell command
salt '*' win_servermanager.list_available
salt.modules.win_servermanager.list_installed() List installed features. Supported on Windows Server 2008 and Windows 8 and newer.
Returns A dictionary of installed features
salt '*' win_servermanager.list_installed
salt.modules.win_servermanager.remove(feature, remove_payload=False, restart=False) Remove an installed feature
NOTE: Some features require a reboot after installation/uninstallation. If one of these features are modified, then other features cannot be installed until the server is restarted. Additionally, some features take a while to complete installation/uninstallation, so it is a good idea to use the -t option to set a longer timeout.
The name of the feature(s) to remove. This can be a single feature, a string of features in a comma delimited list (no spaces), or a list of features.
New in version 2018.3.0: Added the ability to pass a list of features to be removed.
• remove_payload (Optional[bool]) -- True will cause the feature to be removed from the side-by-side store (%SystemDrive%:\Windows\WinSxS). Default is False
• restart (Optional[bool]) -- Restarts the computer when uninstall is complete, if required by the role/feature removed. Default is False
Returns A dictionary containing the results of the uninstall
salt -t 600 '*' win_servermanager.remove Telnet-Client
salt.modules.win_service Windows Service module.
Changed in version 2016.11.0: Rewritten to use PyWin32
salt.modules.win_service.available(name) Check if a service is available on the system.
Parameters name (str) -- The name of the service to check
Returns True if the service is available, False otherwise
salt '*' service.available <service name>
salt.modules.win_service.create(name, bin_path, exe_args=None, display_name=None, description=None, service_type='own', start_type='manual', start_delayed=False, error_control='normal', load_order_group=None, dependencies=None, account_name='.\\LocalSystem', account_password=None, run_interactive=False, **kwargs) Create the named service.
• name (str) -- Specifies the service name. This is not the display_name
• bin_path (str) -- Specifies the path to the service binary file. Backslashes must be escaped, eg: C:\path\to\binary.exe
• exe_args (str) -- Any additional arguments required by the service binary.
• display_name (str) -- The name to be displayed in the service manager. If not passed, the name will be used
• description (str) -- A description of the service
• service_type (str) --
Specifies the service type. Default is own. Valid options are as follows:
• kernel: Driver service
• filesystem: File system driver service
• adapter: Adapter driver service (reserved)
• recognizer: Recognizer driver service (reserved)
• own (default): Service runs in its own process
• share: Service shares a process with one or more other services
• start_type (str) --
Specifies the service start type. Valid options are as follows:
• boot: Device driver that is loaded by the boot loader
• system: Device driver that is started during kernel initialization
• auto: Service that automatically starts
• manual (default): Service must be started manually
• disabled: Service cannot be started
• start_delayed (bool) -- Set the service to Auto(Delayed Start). Only valid if the start_type is set to Auto. If service_type is not passed, but the service is already set to Auto, then the flag will be set. Default is False
• error_control (str) --
The severity of the error, and action taken, if this service fails to start. Valid options are as follows:
• normal (normal): Error is logged and a message box is displayed
• severe: Error is logged and computer attempts a restart with the last known good configuration
• critical: Error is logged, computer attempts to restart with the last known good configuration, system halts on failure
• ignore: Error is logged and startup continues, no notification is given to the user
• load_order_group (str) -- The name of the load order group to which this service belongs
• dependencies (list) -- A list of services or load ordering groups that must start before this service
• account_name (str) --
The name of the account under which the service should run. For own type services this should be in the domain\username format. The following are examples of valid built-in service accounts:
• NT AuthorityLocalService
• NT AuthorityNetworkService
• NT AuthorityLocalSystem
• .LocalSystem
• account_password (str) -- The password for the account name specified in account_name. For the above built-in accounts, this can be None. Otherwise a password must be specified.
• run_interactive (bool) -- If this setting is True, the service will be allowed to interact with the user. Not recommended for services that run with elevated privileges.
Returns A dictionary containing information about the new service
salt '*' service.create <service name> <path to exe> display_name='<display name>'
salt.modules.win_service.create_win_salt_restart_task() Create a task in Windows task scheduler to enable restarting the salt-minion
salt '*' service.create_win_salt_restart_task()
salt.modules.win_service.delete(name, timeout=90) Delete the named service
• name (str) -- The name of the service to delete
• timeout (int) --
The time in seconds to wait for the service to be deleted before returning. This is necessary because a service must be stopped before it can be deleted. Default is 90 seconds
New in version 2017.7.9,2018.3.4.
True if successful, otherwise False. Also returns True if the service is not present
salt.modules.win_service.disable(name, **kwargs) Disable the named service to start at boot
Parameters name (str) -- The name of the service to disable
Returns True if disabled, False otherwise
salt.modules.win_service.disabled(name) Check to see if the named service is disabled to start on boot
Returns True if the service is disabled
salt.modules.win_service.enable(name, start_type='auto', start_delayed=False, **kwargs) Enable the named service to start at boot
• name (str) -- The name of the service to enable.
• manual: Service must be started manually
• start_delayed (bool) -- Set the service to Auto(Delayed Start). Only valid if the start_type is set to Auto. If service_type is not passed, but the service is already set to Auto, then the flag will be set.
Returns True if successful, False otherwise
salt.modules.win_service.enabled(name, **kwargs) Check to see if the named service is enabled to start on boot
Returns True if the service is set to start
salt.modules.win_service.execute_salt_restart_task() Run the Windows Salt restart task
salt '*' service.execute_salt_restart_task()
salt.modules.win_service.get_all() Return all installed services
Returns Returns a list of all services on the system.
salt.modules.win_service.get_disabled() Return a list of disabled services. Disabled is defined as a service that is marked 'Disabled' or 'Manual'.
Returns A list of disabled services.
salt.modules.win_service.get_enabled() Return a list of enabled services. Enabled is defined as a service that is marked to Auto Start.
Returns A list of enabled services
salt.modules.win_service.get_service_name(*args) The Display Name is what is displayed in Windows when services.msc is executed.  Each Display Name has an associated Service Name which is the actual name of the service.  This function allows you to discover the Service Name by returning a dictionary of Display Names and Service Names, or filter by adding arguments of Display Names.
If no args are passed, return a dict of all services where the keys are the service Display Names and the values are the Service Names.
If arguments are passed, create a dict of Display Names and Service Names
Returns A dictionary of display names and service names
salt '*' service.get_service_name salt '*' service.get_service_name 'Google Update Service (gupdate)' 'DHCP Client'
salt.modules.win_service.getsid(name) Return the SID for this windows service
Parameters name (str) -- The name of the service for which to return the SID
Returns A string representing the SID for the service
salt '*' service.getsid <service name>
salt.modules.win_service.info(name) Get information about a service on the system
Parameters name (str) -- The name of the service. This is not the display name. Use get_service_name to find the service name.
Returns A dictionary containing information about the service.
salt '*' service.info spooler
salt.modules.win_service.missing(name) The inverse of service.available.
Returns True if the service is missing, False otherwise
salt '*' service.missing <service name>
salt.modules.win_service.modify(name, bin_path=None, exe_args=None, display_name=None, description=None, service_type=None, start_type=None, start_delayed=None, error_control=None, load_order_group=None, dependencies=None, account_name=None, account_password=None, run_interactive=None) Modify a service's parameters. Changes will not be made for parameters that are not passed.
• name (str) -- The name of the service. Can be found using the service.get_service_name function
• bin_path (str) -- The path to the service executable. Backslashes must be escaped, eg: C:\path\to\binary.exe
• exe_args (str) -- Any arguments required by the service executable
• display_name (str) -- The name to display in the service manager
• description (str) -- The description to display for the service
• normal: Error is logged and a message box is displayed
Returns a dictionary of changes made
salt '*' service.modify spooler start_type=disabled
salt.modules.win_service.restart(name, timeout=90) Restart the named service. This issues a stop command followed by a start.
• name --
The name of the service to restart.
NOTE: If the name passed is salt-minion a scheduled task is created and executed to restart the salt-minion service.
The time in seconds to wait for the service to stop and start before returning. Default is 90 seconds
NOTE: The timeout is cumulative meaning it is applied to the stop and then to the start command. A timeout of 90 could take up to 180 seconds if the service is long in stopping and starting
salt.modules.win_service.start(name, timeout=90) Start the specified service.
WARNING: You cannot start a disabled service in Windows. If the service is disabled, it will be changed to Manual start.
• name (str) -- The name of the service to start
The time in seconds to wait for the service to start before returning. Default is 90 seconds
True if successful, otherwise False. Also returns True if the service is already started
salt.modules.win_service.status(name, *args, **kwargs) Return the status for a service.  If the name contains globbing, a dict mapping service name to True/False values is returned.
salt.modules.win_service.stop(name, timeout=90) Stop the specified service
• name (str) -- The name of the service to stop
The time in seconds to wait for the service to stop before returning. Default is 90 seconds
True if successful, otherwise False. Also returns True if the service is already stopped
salt.modules.win_shadow Manage the shadow file
salt.modules.win_shadow.info(name) Return information for the specified user This is just returns dummy data so that salt states can work.
Parameters name (str) -- The name of the user account to show.
salt.modules.win_shadow.require_password_change(name) Require the user to change their password the next time they log in.
Parameters name -- The name of the user account to require a password change.
Returns True if successful. False if unsuccessful.
salt '*' shadow.require_password_change <username>
salt.modules.win_shadow.set_expire(name, expire) Set the expiration date for a user account.
• name -- The name of the user account to edit.
• expire -- The date the account will expire.
salt '*' shadow.set_expire <username> 2016/7/1
salt.modules.win_shadow.set_password(name, password) Set the password for a named user.
• password (str) -- The new password
salt '*' shadow.set_password root mysecretpassword
salt.modules.win_shadow.unlock_account(name) Unlocks a user account.
Parameters name -- The name of the user account to unlock.
salt '*' shadow.unlock_account <username>
salt.modules.win_smtp_server Module for managing IIS SMTP server configuration on Windows servers. The Windows features 'SMTP-Server' and 'Web-WMI' must be installed.
depends wmi
salt.modules.win_smtp_server.get_connection_ip_list(as_wmi_format=False, server='SmtpSvc/1') Get the IPGrant list for the SMTP virtual server.
• as_wmi_format (bool) -- Returns the connection IPs as a list in the format WMI expects.
• server (str) -- The SMTP server name.
Returns A dictionary of the IP and subnet pairs.
salt '*' win_smtp_server.get_connection_ip_list
salt.modules.win_smtp_server.get_log_format(server='SmtpSvc/1') Get the active log format for the SMTP virtual server.
Parameters server (str) -- The SMTP server name.
Returns A string of the log format name.
salt '*' win_smtp_server.get_log_format
salt.modules.win_smtp_server.get_log_format_types() Get all available log format names and ids.
Returns A dictionary of the log format names and ids.
salt '*' win_smtp_server.get_log_format_types
salt.modules.win_smtp_server.get_relay_ip_list(server='SmtpSvc/1') Get the RelayIpList list for the SMTP virtual server.
Returns A list of the relay IPs.
NOTE: A return value of None corresponds to the restrictive 'Only the list below' GUI parameter with an empty access list, and setting an empty list/tuple corresponds to the more permissive 'All except the list below' GUI parameter.
salt '*' win_smtp_server.get_relay_ip_list
salt.modules.win_smtp_server.get_server_setting(settings, server='SmtpSvc/1') Get the value of the setting for the SMTP virtual server.
• settings (str) -- A list of the setting names.
salt '*' win_smtp_server.get_server_setting settings="['MaxRecipients']"
salt.modules.win_smtp_server.get_servers() Get the SMTP virtual server names.
Returns A list of the SMTP virtual servers.
salt '*' win_smtp_server.get_servers
salt.modules.win_smtp_server.set_connection_ip_list(addresses=None, grant_by_default=False, server='SmtpSvc/1') Set the IPGrant list for the SMTP virtual server.
• addresses (str) -- A dictionary of IP + subnet pairs.
• grant_by_default (bool) -- Whether the addresses should be a blacklist or whitelist.
Returns A boolean representing whether the change succeeded.
salt '*' win_smtp_server.set_connection_ip_list addresses="{'127.0.0.1': '255.255.255.255'}"
salt.modules.win_smtp_server.set_log_format(log_format, server='SmtpSvc/1') Set the active log format for the SMTP virtual server.
• log_format (str) -- The log format name.
salt '*' win_smtp_server.set_log_format 'Microsoft IIS Log File Format'
salt.modules.win_smtp_server.set_relay_ip_list(addresses=None, server='SmtpSvc/1') Set the RelayIpList list for the SMTP virtual server.
Due to the unusual way that Windows stores the relay IPs, it is advisable to retrieve the existing list you wish to set from a pre-configured server.
For example, setting '127.0.0.1' as an allowed relay IP through the GUI would generate an actual relay IP list similar to the following:
['24.0.0.128', '32.0.0.128', '60.0.0.128', '68.0.0.128', '1.0.0.0', '76.0.0.0', '0.0.0.0', '0.0.0.0', '1.0.0.0', '1.0.0.0', '2.0.0.0', '2.0.0.0', '4.0.0.0', '0.0.0.0', '76.0.0.128', '0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0', '255.255.255.255', '127.0.0.1']
NOTE: Setting the list to None corresponds to the restrictive 'Only the list below' GUI parameter with an empty access list configured, and setting an empty list/tuple corresponds to the more permissive 'All except the list below' GUI parameter.
• addresses (str) -- A list of the relay IPs. The order of the list is important.
salt '*' win_smtp_server.set_relay_ip_list addresses="['192.168.1.1', '172.16.1.1']"
salt.modules.win_smtp_server.set_server_setting(settings, server='SmtpSvc/1') Set the value of the setting for the SMTP virtual server.
NOTE: The setting names are case-sensitive.
• settings (str) -- A dictionary of the setting names and their values.
salt '*' win_smtp_server.set_server_setting settings="{'MaxRecipients': '500'}"
salt.modules.win_snmp Module for managing SNMP service settings on Windows servers.  The Windows feature 'SNMP-Service' must be installed.
salt.modules.win_snmp.get_agent_service_types() Get the sysServices types that can be configured.
Returns A list of service types.
salt '*' win_snmp.get_agent_service_types
salt.modules.win_snmp.get_agent_settings() Determine the value of the SNMP sysContact, sysLocation, and sysServices settings.
Returns A dictionary of the agent settings.
salt '*' win_snmp.get_agent_settings
salt.modules.win_snmp.get_auth_traps_enabled() Determine whether the host is configured to send authentication traps.
Returns True if traps are enabled, otherwise False
salt '*' win_snmp.get_auth_traps_enabled
salt.modules.win_snmp.get_community_names() Get the current accepted SNMP community names and their permissions.
If community names are being managed by Group Policy, those values will be returned instead like this:
TestCommunity: Managed by GPO
Community names managed normally will denote the permission instead:
TestCommunity: Read Only
Returns A dictionary of community names and permissions.
salt '*' win_snmp.get_community_names
salt.modules.win_snmp.get_permission_types() Get the permission types that can be configured for communities.
Returns A list of permission types.
salt '*' win_snmp.get_permission_types
salt.modules.win_snmp.set_agent_settings(contact=None, location=None, services=None) Manage the SNMP sysContact, sysLocation, and sysServices settings.
• contact (str, optional) -- The SNMP contact.
• location (str, optional) -- The SNMP location.
• services (list, optional) -- A list of selected services. The possible service names can be found via win_snmp.get_agent_service_types.  To disable all services pass a list of None, ie: ['None']
salt '*' win_snmp.set_agent_settings contact='Contact Name' location='Place' services="['Physical']"
salt.modules.win_snmp.set_auth_traps_enabled(status=True) Manage the sending of authentication traps.
Parameters status (bool) -- True to enable traps. False to disable.
salt '*' win_snmp.set_auth_traps_enabled status='True'
salt.modules.win_snmp.set_community_names(communities) Manage the SNMP accepted community names and their permissions.
NOTE: Settings managed by Group Policy will always take precedence over those set using the SNMP interface. Therefore if this function finds Group Policy settings it will raise a CommandExecutionError
Parameters communities (dict) -- A dictionary of SNMP community names and permissions. The possible permissions can be found via win_snmp.get_permission_types.
Raises CommandExecutionError -- If SNMP settings are being managed by Group Policy
salt '*' win_snmp.set_community_names communities="{'TestCommunity': 'Read Only'}'
salt.modules.win_status Module for returning various status data about a minion.  These data can be useful for compiling into stats later, or for problem solving if your minion is having problems.
• wmi
class salt.modules.win_status.SYSTEM_PERFORMANCE_INFORMATION
AvailablePagedPoolPages Structure/Union member
AvailablePages Structure/Union member
CacheIoCount Structure/Union member
CacheReadCount Structure/Union member
CacheTransitionCount Structure/Union member
CcCopyReadNoWait Structure/Union member
CcCopyReadNoWaitMiss Structure/Union member
CcCopyReadWait Structure/Union member
CcCopyReadWaitMiss Structure/Union member
CcDataFlushes Structure/Union member
CcDataPages Structure/Union member
CcDirtyPagesThreshold Structure/Union member
CcFastMdlReadNoWait Structure/Union member
CcFastMdlReadNotPossible Structure/Union member
CcFastMdlReadResourceMiss Structure/Union member
CcFastMdlReadWait Structure/Union member
CcFastReadNoWait Structure/Union member
CcFastReadNotPossible Structure/Union member
CcFastReadResourceMiss Structure/Union member
CcFastReadWait Structure/Union member
CcLazyWriteIos Structure/Union member
CcLazyWritePages Structure/Union member
CcMapDataNoWait Structure/Union member
CcMapDataNoWaitMiss Structure/Union member
CcMapDataWait Structure/Union member
CcMapDataWaitMiss Structure/Union member
CcMdlReadNoWait Structure/Union member
CcMdlReadNoWaitMiss Structure/Union member
CcMdlReadWait Structure/Union member
CcMdlReadWaitMiss Structure/Union member
CcPinMappedDataCount Structure/Union member
CcPinReadNoWait Structure/Union member
CcPinReadNoWaitMiss Structure/Union member
CcPinReadWait Structure/Union member
CcPinReadWaitMiss Structure/Union member
CcReadAheadIos Structure/Union member
CcTotalDirtyPages Structure/Union member
CommitLimit Structure/Union member
CommittedPages Structure/Union member
ContextSwitches Structure/Union member
CopyOnWriteCount Structure/Union member
DemandZeroCount Structure/Union member
DirtyPagesWriteCount Structure/Union member
DirtyWriteIoCount Structure/Union member
FirstLevelTbFills Structure/Union member
FreeSystemPtes Structure/Union member
IdleProcessTime Structure/Union member
IoOtherOperationCount Structure/Union member
IoOtherTransferCount Structure/Union member
IoReadOperationCount Structure/Union member
IoReadTransferCount Structure/Union member
IoWriteOperationCount Structure/Union member
IoWriteTransferCount Structure/Union member
MappedPagesWriteCount Structure/Union member
MappedWriteIoCount Structure/Union member
NonPagedPoolAllocs Structure/Union member
NonPagedPoolFrees Structure/Union member
NonPagedPoolLookasideHits Structure/Union member
NonPagedPoolPages Structure/Union member
PageFaultCount Structure/Union member
PageReadCount Structure/Union member
PageReadIoCount Structure/Union member
PagedPoolAllocs Structure/Union member
PagedPoolFrees Structure/Union member
PagedPoolLookasideHits Structure/Union member
PagedPoolPages Structure/Union member
PeakCommitment Structure/Union member
ResidentAvailablePages Structure/Union member
ResidentPagedPoolPage Structure/Union member
ResidentSystemCachePage Structure/Union member
ResidentSystemCodePage Structure/Union member
ResidentSystemDriverPage Structure/Union member
SecondLevelTbFills Structure/Union member
SharedCommittedPages Structure/Union member
SystemCalls Structure/Union member
TotalSystemCodePages Structure/Union member
TotalSystemDriverPages Structure/Union member
TransitionCount Structure/Union member
salt.modules.win_status.cpuload() New in version 2015.8.0.
Return the processor load as a percentage
salt '*' status.cpuload
salt.modules.win_status.cpustats() Return information about the CPU.
Returns dict: A dictionary containing information about the CPU stats
salt * status.cpustats
salt.modules.win_status.diskusage(human_readable=False, path=None) New in version 2015.8.0.
Return the disk usage for this minion
human_readable False If True, usage will be in KB/MB/GB etc.
salt '*' status.diskusage path=c:/salt
salt.modules.win_status.loadavg() Returns counter information related to the load of the machine
Returns A dictionary of counters
salt * status.loadavg
salt.modules.win_status.master(master=None, connected=True) New in version 2015.5.0.
Fire an event if the minion gets disconnected from its master. This function is meant to be run via a scheduled job from the minion. If master_ip is an FQDN/Hostname, is must be resolvable to a valid IPv4 address.
salt.modules.win_status.meminfo() Return information about physical and virtual memory on the system
Returns A dictionary of information about memory on the system
salt * status.meminfo
salt.modules.win_status.procs(count=False) Return the process data
count  False If True, this function will simply return the number of processes.
salt '*' status.procs salt '*' status.procs count
salt.modules.win_status.saltmem(human_readable=False) New in version 2015.8.0.
Returns the amount of memory that salt is using
human_readable False return the value in a nicely formatted number
salt '*' status.saltmem salt '*' status.saltmem human_readable=True
salt.modules.win_status.uptime(human_readable=False) New in version 2015.8.0.
Return the system uptime for the machine
Parameters human_readable (bool) --
Return uptime in human readable format if True, otherwise return seconds. Default is False
NOTE: Human readable format is days, hours:min:sec. Days will only be displayed if more than 0
Returns The uptime in seconds or human readable format depending on the value of human_readable
salt '*' status.uptime salt '*' status.uptime human_readable=True
salt.modules.win_status.vmstats() Return information about the virtual memory on the machine
Returns A dictionary of virtual memory stats
salt * status.vmstats
salt.modules.win_system Module for managing Windows systems and getting Windows system information.  Support for reboot, shutdown, join domain, rename
• pywintypes
• win32net
salt.modules.win_system.get_computer_desc() Get the Windows computer description
Returns Returns the computer description if found. Otherwise returns False.
salt 'minion-id' system.get_computer_desc
salt.modules.win_system.get_computer_description() This function is an alias of get_computer_desc. Get the Windows computer description
Returns: str: Returns the computer description if found. Otherwise returns False.
salt.modules.win_system.get_computer_name() Get the Windows computer name
Returns Returns the computer name if found. Otherwise returns False.
salt 'minion-id' system.get_computer_name
salt.modules.win_system.get_domain_workgroup() Get the domain or workgroup the computer belongs to.
Returns The name of the domain or workgroup
salt 'minion-id' system.get_domain_workgroup
salt.modules.win_system.get_hostname() Get the hostname of the windows minion
Returns Returns the hostname of the windows minion
salt 'minion-id' system.get_hostname
salt.modules.win_system.get_pending_component_servicing() Determine whether there are pending Component Based Servicing tasks that require a reboot.
Returns True if there are pending Component Based Servicing tasks, otherwise False
salt '*' system.get_pending_component_servicing
salt.modules.win_system.get_pending_computer_name() Get a pending computer name. If the computer name has been changed, and the change is pending a system reboot, this function will return the pending computer name. Otherwise, None will be returned. If there was an error retrieving the pending computer name, False will be returned, and an error message will be logged to the minion log.
Returns Returns the pending name if pending restart. Returns None if not pending restart.
salt 'minion-id' system.get_pending_computer_name
salt.modules.win_system.get_pending_domain_join() Determine whether there is a pending domain join action that requires a reboot.
Returns True if there is a pending domain join action, otherwise False
salt '*' system.get_pending_domain_join
salt.modules.win_system.get_pending_file_rename() Determine whether there are pending file rename operations that require a reboot.
Returns True if there are pending file rename operations, otherwise False
salt '*' system.get_pending_file_rename
salt.modules.win_system.get_pending_reboot() Determine whether there is a reboot pending.
Returns True if the system is pending reboot, otherwise False
salt '*' system.get_pending_reboot
salt.modules.win_system.get_pending_reboot_details() Determine which check is signalling that the system is pending a reboot.  Useful in determining why your system is signalling that it needs a reboot.
Returns A dictionary of the results of each system that would indicate a pending reboot
salt '*' system.get_pending_reboot_details
salt.modules.win_system.get_pending_servermanager() Determine whether there are pending Server Manager tasks that require a reboot.
Returns True if there are pending Server Manager tasks, otherwise False
salt '*' system.get_pending_servermanager
salt.modules.win_system.get_pending_update() Determine whether there are pending updates that require a reboot.
Returns True if there are pending updates, otherwise False
salt '*' system.get_pending_update
salt.modules.win_system.get_pending_windows_update() Check the Windows Update system for a pending reboot state.
This leverages the Windows Update System to determine if the system is pending a reboot.
Returns True if the Windows Update system reports a pending update, otherwise False
salt '*' system.get_pending_windows_update
salt.modules.win_system.get_reboot_required_witnessed() Determine if at any time during the current boot session the salt minion witnessed an event indicating that a reboot is required.
This function will return True if an install completed with exit code 3010 during the current boot session and can be extended where appropriate in the future.
Returns True if the Requires reboot registry flag is set to 1, otherwise False
salt.modules.win_system.get_system_date() Get the Windows system date
Returns Returns the system date
salt.modules.win_system.get_system_info() Get system information.
NOTE: Not all system info is available across all versions of Windows. If it is not available on an older version, it will be skipped
Returns Dictionary containing information about the system to include name, description, version, etc...
salt 'minion-id' system.get_system_info
salt.modules.win_system.get_system_time() Get the system time.
salt 'minion-id' system.get_system_time
salt.modules.win_system.halt(timeout=5, in_seconds=False) Halt a running system.
• timeout (int) -- Number of seconds before halting the system. Default is 5 seconds.
• in_seconds (bool) --
Whether to treat timeout as seconds or minutes.
salt '*' system.halt 5 True
salt.modules.win_system.init(runlevel) Change the system runlevel on sysV compatible systems. Not applicable to Windows
salt.modules.win_system.join_domain(domain, username=None, password=None, account_ou=None, account_exists=False, restart=False) Join a computer to an Active Directory domain. Requires a reboot.
• domain (str) -- The domain to which the computer should be joined, e.g.  example.com
• username (str) -- Username of an account which is authorized to join computers to the specified domain. Needs to be either fully qualified like user@domain.tld or simply user
• password (str) -- Password of the specified user
• account_ou (str) -- The DN of the OU below which the account for this computer should be created when joining the domain, e.g. ou=computers,ou=departm_432,dc=my-company,dc=com
• account_exists (bool) -- If set to True the computer will only join the domain if the account already exists. If set to False the computer account will be created if it does not exist, otherwise it will use the existing account. Default is False
• restart (bool) --
True will restart the computer after a successful join. Default is False
New in version 2015.8.2/2015.5.7.
Returns Returns a dictionary if successful, otherwise False
salt 'minion-id' system.join_domain domain='domain.tld' \ username='joinuser' password='joinpassword' \ account_ou='ou=clients,ou=org,dc=domain,dc=tld' \ account_exists=False, restart=True
salt.modules.win_system.lock() Lock the workstation.
salt 'minion-id' system.lock
salt.modules.win_system.poweroff(timeout=5, in_seconds=False) Power off a running system.
• timeout (int) -- Number of seconds before powering off the system. Default is 5 seconds.
salt '*' system.poweroff 5
salt.modules.win_system.reboot(timeout=5, in_seconds=False, wait_for_reboot=False, only_on_pending_reboot=False) Reboot a running system.
• timeout (int) -- The number of minutes/seconds before rebooting the system. Use of minutes or seconds depends on the value of in_seconds. Default is 5 minutes.
• in_seconds (bool) -- .INDENT 2.0
True will cause the timeout parameter to be in seconds. False will be in minutes. Default is False.
• wait_for_reboot (bool) --
True will sleep for timeout + 30 seconds after reboot has been initiated. This is useful for use in a highstate. For example, you may have states that you want to apply only after the reboot.  Default is False.
• only_on_pending_reboot (bool) -- If this is set to True, then the reboot will only proceed if the system reports a pending reboot. Setting this parameter to True could be useful when calling this function from a final housekeeping state intended to be executed at the end of a state run (using order: last). Default is False.
Returns True if successful (a reboot will occur), otherwise False
salt '*' system.reboot 5 salt '*' system.reboot 5 True
Invoking this function from a final housekeeping state:
final_housekeeping: module.run: - name: system.reboot - only_on_pending_reboot: True - order: last
salt.modules.win_system.set_computer_desc(desc=None) Set the Windows computer description
Returns Description if successful, otherwise False
salt 'minion-id' system.set_computer_desc 'This computer belongs to Dave!'
salt.modules.win_system.set_computer_description(desc=None) This function is an alias of set_computer_desc. Set the Windows computer description
Args:
desc (str): The computer description
Returns: str: Description if successful, otherwise False
salt.modules.win_system.set_computer_name(name) Set the Windows computer name
Parameters name (str) -- The new name to give the computer. Requires a reboot to take effect.
Returns Returns a dictionary containing the old and new names if successful.  False if not.
salt 'minion-id' system.set_computer_name 'DavesComputer'
salt.modules.win_system.set_domain_workgroup(workgroup) Set the domain or workgroup the computer belongs to.
salt 'minion-id' system.set_domain_workgroup LOCAL
salt.modules.win_system.set_hostname(hostname) Set the hostname of the windows minion, requires a restart before this will be updated.
Parameters hostname (str) -- The hostname to set
salt 'minion-id' system.set_hostname newhostname
salt.modules.win_system.set_reboot_required_witnessed() This function is used to remember that an event indicating that a reboot is required was witnessed. This function relies on the salt-minion's ability to create the following volatile registry key in the HKLM hive: SYSTEM\CurrentControlSet\Services\salt-minion\Volatile-Data
Because this registry key is volatile, it will not persist beyond the current boot session. Also, in the scope of this key, the name 'Reboot required' will be assigned the value of 1.
For the time being, this function is being used whenever an install completes with exit code 3010 and can be extended where appropriate in the future.
salt.modules.win_system.set_system_date(newdate) Set the Windows system date. Use <mm-dd-yy> format for the date.
The date to set. Can be any of the following formats
salt.modules.win_system.set_system_date_time(years=None, months=None, days=None, hours=None, minutes=None, seconds=None) Set the system date and time. Each argument is an element of the date, but not required. If an element is not passed, the current system value for that element will be used. For example, if you don't pass the year, the current system year will be used. (Used by set_system_date and set_system_time)
salt '*' system.set_system_date_ time 2015 5 12 11 37 53
salt.modules.win_system.set_system_time(newtime) Set the system time.
Parameters newtime (str) --
The time to set. Can be any of the following formats:
• HH:MM:SS AM/PM
• HH:MM AM/PM
• HH:MM:SS (24 hour)
• HH:MM (24 hour)
salt 'minion-id' system.set_system_time 12:01
salt.modules.win_system.shutdown(message=None, timeout=5, force_close=True, reboot=False, in_seconds=False, only_on_pending_reboot=False) Shutdown a running system.
• message (str) -- The message to display to the user before shutting down.
The length of time (in seconds) that the shutdown dialog box should be displayed. While this dialog box is displayed, the shutdown can be aborted using the system.shutdown_abort function.
If timeout is not zero, InitiateSystemShutdown displays a dialog box on the specified computer. The dialog box displays the name of the user who called the function, the message specified by the lpMessage parameter, and prompts the user to log off. The dialog box beeps when it is created and remains on top of other windows (system modal). The dialog box can be moved but not closed. A timer counts down the remaining time before the shutdown occurs.
If timeout is zero, the computer shuts down immediately without displaying the dialog box and cannot be stopped by system.shutdown_abort.
Default is 5 minutes
• force_close (bool) -- True will force close all open applications. False will display a dialog box instructing the user to close open applications. Default is True.
• reboot (bool) -- True restarts the computer immediately after shutdown. False powers down the system. Default is False.
• only_on_pending_reboot (bool) -- If this is set to True, then the shutdown will only proceed if the system reports a pending reboot. To optionally shutdown in a highstate, consider using the shutdown state instead of this module.
• only_on_pending_reboot -- If True the shutdown will only proceed if there is a reboot pending. False will shutdown the system. Default is False.
Returns True if successful (a shutdown or reboot will occur), otherwise False
salt '*' system.shutdown "System will shutdown in 5 minutes"
salt.modules.win_system.shutdown_abort() Abort a shutdown. Only available while the dialog box is being displayed to the user. Once the shutdown has initiated, it cannot be aborted.
salt 'minion-id' system.shutdown_abort
salt.modules.win_system.shutdown_hard() Shutdown a running system with no timeout or warning.
salt '*' system.shutdown_hard
salt.modules.win_system.start_time_service() Start the Windows time service
salt '*' system.start_time_service
salt.modules.win_system.stop_time_service() Stop the Windows time service
salt '*' system.stop_time_service
salt.modules.win_system.unjoin_domain(username=None, password=None, domain=None, workgroup='WORKGROUP', disable=False, restart=False) Unjoin a computer from an Active Directory Domain. Requires a restart.
• username (str) -- Username of an account which is authorized to manage computer accounts on the domain. Needs to be a fully qualified name like user@domain.tld or domain.tld\user. If the domain is not specified, the passed domain will be used. If the computer account doesn't need to be disabled after the computer is unjoined, this can be None.
• password (str) -- The password of the specified user
• domain (str) -- The domain from which to unjoin the computer. Can be None
• workgroup (str) --
The workgroup to join the computer to. Default is WORKGROUP
• disable (bool) -- True to disable the computer account in Active Directory.  Default is False
True will restart the computer after successful unjoin. Default is False
salt 'minion-id' system.unjoin_domain restart=True
salt 'minion-id' system.unjoin_domain username='unjoinuser' \ password='unjoinpassword' disable=True \ restart=True
salt.modules.win_task Windows Task Scheduler Module .. versionadded:: 2016.3.0
A module for working with the Windows Task Scheduler.  You can add and edit existing tasks.  You can add and clear triggers and actions.  You can list all tasks, folders, triggers, and actions.
salt.modules.win_task.add_action(name=None, location='\\', action_type='Execute', **kwargs) Add an action to a task.
• name (str) -- The name of the task to which to add the action.
• location (str) -- A string value representing the location of the task. Default is \ which is the root for the task scheduler (C:\Windows\System32\tasks).
• action_type (str) --
The type of action to add. There are three action types. Each one requires its own set of Keyword Arguments (kwargs). Valid values are:
• Execute
• Email
• Message
Required arguments for each action_type:
Execute Execute a command or an executable
cmd (str): (required) The command or executable to run.
arguments (str): (optional) Arguments to be passed to the command or executable.  To launch a script the first command will need to be the interpreter for the script. For example, to run a vbscript you would pass cscript.exe in the cmd parameter and pass the script in the arguments parameter as follows:
• cmd='cscript.exe' arguments='c:\scripts\myscript.vbs'
Batch files do not need an interpreter and may be passed to the cmd parameter directly.
start_in (str): (optional) The current working directory for the command.
Email Send and email. Requires server, from, and to or cc. from (str): The sender
reply_to (str): Who to reply to
to (str): The recipient
cc (str): The CC recipient
bcc (str): The BCC recipient
subject (str): The subject of the email
body (str): The Message Body of the email
server (str): The server used to send the email
attachments (list): A list of attachments. These will be the paths to the files to attach. ie: attachments="['C:\attachment1.txt', 'C:\attachment2.txt']"
Message Display a dialog box. The task must be set to "Run only when user is logged on" in order for the dialog box to display. Both parameters are required.
title (str): The dialog box title.
message (str): The dialog box message body