.. _community.windows.win_psscript_module:
******************************
community.windows.win_psscript
******************************
**Install and manage PowerShell scripts from a PSRepository**
.. contents::
:local:
:depth: 1
Synopsis
--------
- Add or remove PowerShell scripts from registered PSRepositories.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ``PowerShellGet`` module v1.6.0+
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
allow_prerelease
boolean
|
|
If yes installs scripts flagged as prereleases.
|
|
maximum_version
string
|
|
The maximum version of the script to install.
Cannot be used when state=latest.
|
|
minimum_version
string
|
|
The minimum version of the script to install.
Cannot be used when state=latest.
|
|
name
string
/ required
|
|
The name of the script you want to install or remove.
|
|
repository
string
|
|
The registered name of the repository you want to install from.
Cannot be used when state=absent.
If ommitted, all repositories will be searched.
To register a repository, use community.windows.win_psrepository.
|
|
required_version
string
|
|
The exact version of the script to install.
Cannot be used with minimum_version or maximum_version.
Cannot be used when state=latest.
|
|
scope
string
|
Choices:
- current_user
all_users ←
|
Determines whether the script is installed for only the current_user or for all_users.
|
|
source_password
string
|
|
The password portion of the credential required to access the repository.
Must be used together with source_username.
|
|
source_username
string
|
|
The username portion of the credential required to access the repository.
Must be used together with source_password.
|
|
state
string
|
Choices:
present ←
- absent
- latest
|
The desired state of the script. absent removes the script.
latest will ensure the most recent version available is installed.
present only installs if the script is missing.
|