salt.modules.win_psget
Module for managing PowerShell through PowerShellGet (PSGet)
- depends
-
PowerShell 5.0
PSGet
Support for PowerShell
-
List available modules in registered Powershell module repositories.
- Parameters
-
desc (
bool
) -- IfTrue
, the verbose description will be returned.
CLI Example:
salt 'win01' psget.avail_modules salt 'win01' psget.avail_modules desc=True
salt.modules.win_psget.avail_modules(desc=False)
-
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.bootstrap()
-
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.get_repository(name)
-
Install a Powershell module from powershell gallery on the system.
- Parameters
-
name (
str
) -- Name of a Powershell moduleminimum_version (
str
) -- The maximum version to install, e.g. 1.23.2required_version (
str
) -- Install a specific versionscope (
str
) -- The scope to install the module to, e.g. CurrentUser, Computerrepository (
str
) -- The friendly name of a private repository, e.g. MyREpo
CLI Example:
salt 'win01' psget.install PowerPlan
salt.modules.win_psget.install(name, minimum_version=None, required_version=None, scope=None, repository=None)
-
List currently installed PSGet Modules on the system.
- Parameters
-
desc (
bool
) -- IfTrue
, the verbose description will be returned.
CLI Example:
salt 'win01' psget.list_modules salt 'win01' psget.list_modules desc=True
salt.modules.win_psget.list_modules(desc=False)
-
Register a PSGet repository on the local machine
- Parameters
-
name (
str
) -- The name for the repositorylocation (
str
) -- The URI for the repositoryinstallation_policy (
str
) -- The installation policy for packages, e.g. Trusted, Untrusted
CLI Example:
salt 'win01' psget.register_repository MyRepo https://myrepo.mycompany.com/packages
salt.modules.win_psget.register_repository(name, location, installation_policy=None)
-
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.remove(name)
-
Update a PowerShell module to a specific version, or the newest
- Parameters
-
name (
str
) -- Name of a Powershell modulemaximum_version (
str
) -- The maximum version to install, e.g. 1.23.2required_version (
str
) -- Install a specific version
CLI Example:
salt 'win01' psget.update PowerPlan
salt.modules.win_psget.update(name, maximum_version=None, required_version=None)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.win_psget.html