# trying to enable winrm over https on new VM

**URL:** <https://forum.ansible.com/t/trying-to-enable-winrm-over-https-on-new-vm/33199>\
**Category:** Ansible Project\
**Created:** [June 17, 2020, 1:30pm UTC](https://forum.ansible.com/t/trying-to-enable-winrm-over-https-on-new-vm/33199 "2020-06-17T13:30:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [June 17, 2020, 1:30pm UTC](https://forum.ansible.com/t/trying-to-enable-winrm-over-https-on-new-vm/33199/1 "2020-06-17T13:30:12Z")

</div>

I am clining VM with the vmware\_guest module.

it works fine and join domain.

but I need to enable winrm over https.

is there way to do this from the runonce or predeployment tasks?

I cant even copy a script over since winrm over https is not enabled

---

<div class="post-metadata">

**Author:** ![Dave\_York](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@Dave\_York](https://forum.ansible.com/u/Dave_York)\
**Post date:** [June 17, 2020, 5:53pm UTC](https://forum.ansible.com/t/trying-to-enable-winrm-over-https-on-new-vm/33199/2 "2020-06-17T17:53:11Z")

</div>

If you’re building from a template, you could bake the winrm changes into the template - you could also use the vmware customization to run the COnfigureRemotingForAnsible.ps1 script I link below

See this page for some in depth on setting things up:[https://docs.ansible.com/ansible/latest/user\_guide/windows\_setup.html](https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html)

And here’s a script that configures remoting for Ansible:[https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1](https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1)
