# Winrm commands through a jumphost

**URL:** <https://forum.ansible.com/t/winrm-commands-through-a-jumphost/3041>\
**Category:** Get Help\
**Tags:** winrm, windows, aws, collections\
**Created:** [December 22, 2023, 4:26am UTC](https://forum.ansible.com/t/winrm-commands-through-a-jumphost/3041 "2023-12-22T04:26:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smags](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/smags/32/382_2.png) [@smags](https://forum.ansible.com/u/smags)\
**Post date:** [December 22, 2023, 4:26am UTC](https://forum.ansible.com/t/winrm-commands-through-a-jumphost/3041/1 "2023-12-22T04:26:25Z")

</div>

I’m working on some Ansible playbooks currently and have provisioned a few hosts in AWS to allow me to do testing, 2 windows and 2 linux hosts.

I only have connectivity into the new AWS environment I am working in via SSH currently.

I would like to be able to use one of the AWS Linux hosts which I have connectivity through too, as a sort of proxy or jumphost for testing the winrm connectivity and windows tasks in my playbooks.

I tested this out with using an ssh jumphost/proxy for the linux servers and from linux through the jumphost to a linux server in AWS works as expected and my basic gather\_facts tasks all work and return values etc.

Is there a way to have an SSH Jumphost run winrm tasks, at the moment when I run something it just tries to make a direct winrm connection and ignores the ansible ssh common args…

```auto
linux-hosts:
    hosts:
        linux-aws.internal.domain:
            ansible_host: linux-aws.internal.domain
    vars:
         ansible_user: "{{ linux_user_account }}"
         ansible_ssh_common_args: '-o ProxyJump="{{ linux_user_account }}"@linux-aws.internal.domain -o User="{{ linux_user_account }}"'

windows-hosts:
    hosts:
        windows-aws.internal.domain:
            ansible_host: windows-aws.internal.domain
    vars:
        ansible_ssh_common_args: '-o ProxyJump="{{ linux_user_account }}"@linux-aws.internal.domain -o User="{{ linux_user_account }}"'
        ansible_user: "{{ windows_user_account }}"
        ansible_port: 5985
        ansible_connection: winrm
        ansible_winrm_scheme: http
        ansible_winrm_server_cert_validation: ignore
        ansible_winrm_kerberos_delegation: true

```
