ansible.builtin.powershell shell – Windows PowerShell
Note
This shell plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name powershell. However, we recommend you use the Fully Qualified Collection Name (FQCN) ansible.builtin.powershell for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same shell plugin 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
DefaultShellhas been configured to PowerShell.
Aliases: formerly_core_powershell
Parameters
Parameter | Comments |
|---|---|
async_dir string added in Ansible 2.8 | Directory in which ansible will keep async job information. Before Ansible 2.8, this was set to Default: Configuration:
|
remote_tmp string | Temporary directory to use on targets when copying files to the host. Default: Configuration:
|
set_module_language boolean | Controls if we set the locale for modules when executing on the target. Windows only supports Choices:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/powershell_shell.html