ansible.builtin.powershell (v2.16.5) — shell

Windows PowerShell

| "added in version" historical of ansible.builtin"

Authors: unknown

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

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 C(DefaultShell) has been configured to PowerShell.

Inputs

    
async_dir:
    default: '%USERPROFILE%\.ansible_async'
    description:
    - Directory in which ansible will keep async job information.
    - Before Ansible 2.8, this was set to C(remote_tmp + "\.ansible_async").
    ini:
    - key: async_dir
      section: powershell
    vars:
    - name: ansible_async_dir
    version_added: '2.8'
    version_added_collection: ansible.builtin

remote_tmp:
    default: '%TEMP%'
    description:
    - Temporary directory to use on targets when copying files to the host.
    ini:
    - key: remote_tmp
      section: powershell
    vars:
    - name: ansible_remote_tmp

environment:
    default:
    - {}
    description:
    - List of dictionaries of environment variables and their values to use when executing
      commands.
    elements: dictionary
    keyword:
    - name: environment
    type: list

set_module_language:
    choices:
    - 'no'
    - false
    default: 'no'
    description:
    - Controls if we set the locale for modules when executing on the target.
    - Windows only supports V(no) as an option.
    type: bool