# Installing WinRM offline

**URL:** <https://forum.ansible.com/t/installing-winrm-offline/29055>\
**Category:** Ansible Project\
**Created:** [November 16, 2018, 10:45pm UTC](https://forum.ansible.com/t/installing-winrm-offline/29055 "2018-11-16T22:45:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartik\_Jayaraman](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@Kartik\_Jayaraman](https://forum.ansible.com/u/Kartik_Jayaraman)\
**Post date:** [November 16, 2018, 10:45pm UTC](https://forum.ansible.com/t/installing-winrm-offline/29055/1 "2018-11-16T22:45:04Z")

</div>

Hello,

I have a Centos VM which is cut off from the internet. It does have Ansible installed but does not have pywinrm installed. It did not even have pip installed.

So I installed pip offline, basically downloaded the tar.gz and copied to the VM using WinSCP. After which i installed using “python setup.py install” command

I tried doing the same of pywinrm-0.3.0, but there are way too many dependencies for ntlm etc that the installation aborts, because it looks to go to the web and does not find.

So right now i am stuck where my small little playbook throws this error. Please can someone assist? Thanks in advance

ansible web -i inventory.yml -m win\_ping

10.xxx.xxx.xx | FAILED! =\> {  
“msg”: “winrm or requests is not installed: No module named winrm”  
}

Thanks in advance for your assistance

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [November 17, 2018, 1:41am UTC](https://forum.ansible.com/t/installing-winrm-offline/29055/2 "2018-11-17T01:41:30Z")

</div>

You will either have to repeat this for every dependency you come across, or address your inability to access the internet.  
It depends on your local situation which option is the shortest path to success.

Dick

---

<div class="post-metadata">

**Author:** ![Kartik\_Jayaraman](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@Kartik\_Jayaraman](https://forum.ansible.com/u/Kartik_Jayaraman)\
**Post date:** [November 19, 2018, 9:14pm UTC](https://forum.ansible.com/t/installing-winrm-offline/29055/3 "2018-11-19T21:14:09Z")

</div>

Thank you sir.

I had actually done it and was still getting the error. I then realised i had to do sudo

sudo ansible web -i inventory.yml -m win\_ping

10.xxx.xxx.xx | FAILED! =\>SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}

This is for anyone who wants to install WinRM offline. This is what you do.

1. Download pywinrm from web - [https://pypi.org/project/pywinrm/#files](https://pypi.org/project/pywinrm/#files) - It has a tar file and the whl file.
2. Using WinSCP or any other tool, push it to your linux box, into a directory say WinRM
3. Then go to the command line in linux and go to WinRM directory
4. Untar the tar.gz file using “tar -xvzf pywinrm-0.3.0.tar.gz”
5. cd pywinrm-0.3.0
6. sudo python setup.py install
7. This would fail on dependencies again, if you do not have an internet connection, so please go to [pypi.org](http://pypi.org) and search for the following packages and repeat the same install, you should eventually be good.

gssapi-1.5.0.tar.gz  
MarkupSafe-1.1.0.tar.gz  
python-ntlm3-1.0.2.tar.gz  
python\_ntlm3-1.0.2-py2.py3-none-any.whl  
requests-2.9.1-py2.py3-none-any.whl

requests-2.9.1.tar.gz  
requests-credssp-1.0.2.tar.gz  
requests-kerberos-0.12.0.tar.gz  
requests\_credssp-1.0.2-py2.py3-none-any.whl  
requests\_kerberos-0.12.0-py2.py3-none-any.whl  
requests\_ntlm-0.3.0-py2.py3-none-any.whl  
requests\_ntlm-0.3.0.tar.gz  
six-1.4.0.tar.gz  
xmltodict-0.11.0-py2.py3-none-any.whl

xmltodict-0.11.0.tar.gz

Thanks!
