ansible.builtin.powershell - Windows PowerShell
This module is part of ansible-base and included in all Ansible installations. In most cases, you can use the short module name powershell even without specifying the collections: keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.
Synopsis
- The only option when using 'winrm' or 'psrp' as a connection plugin.
- Can also be used when using 'ssh' as a connection plugin and the DefaultShell has been configured to PowerShell.
Parameters
Parameter Choices/Defaults Configuration Comments string
Default:
"%USERPROFILE%\\.ansible_async"
ini entries:
[powershell]
async_dir = %USERPROFILE%\.ansible_asyncvar: ansible_async_dir
Directory in which ansible will keep async job information.
Before Ansible 2.8, this was set to remote_tmp + "\.ansible_async".
Default:
{}
Dictionary of environment variables and their values to use when executing commands.
string
Default:
"%TEMP%"
ini entries:
[powershell]
remote_tmp = %TEMP%var: ansible_remote_tmp
Temporary directory to use on targets when copying files to the host.
boolean
- no ←
- yes
Controls if we set the locale for modules when executing on the target.
Windows only supports no as an option.