Module for managing PowerShell through PowerShellGet (PSGet)
depends: |
|
---|
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. |
---|
CLI Example:
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.
CLI Example:
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 |
---|
CLI Example:
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.
Parameters: |
|
---|
CLI Example:
salt 'win01' psget.install PowerPlan
salt.modules.win_psget.
list_modules
(desc=False)¶List currently installed PSGet Modules on the system.
Parameters: | desc (bool ) -- If True , the verbose description will be returned. |
---|
CLI Example:
salt 'win01' psget.list_modules
salt 'win01' psget.list_modules desc=True
salt.modules.win_psget.
psversion
()¶Returns the Powershell version
This has been deprecated and has been replaced by cmd.shell_info
Note
the minimum version return is 5 as dsc
is not available for version
less than 5. This function will be removed in 'Oxygen' release.
CLI Example:
salt 'win01' dsc.psversion
salt.modules.win_psget.
register_repository
(name, location, installation_policy=None)¶Register a PSGet repository on the local machine
Parameters: |
|
---|
CLI Example:
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 |
---|
CLI Example:
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
Parameters: |
|
---|
CLI Example:
salt 'win01' psget.update PowerPlan