You are on page 1of 4

Enable/Disable WinRM on remote hosts | Green Circle Community https://greencircle.vmturbo.

com/docs/DOC-1912

Enable/Disable WinRM on remote hosts

1. Download PsTools from Microsoft Technet . Extract PsExec from the archive.

2. Create a file containing the list of hosts that you want to enable/disable WinRm. (one host per line)
3. Download the two .BAT files attached to this wiki.
4. Use PsExec.exe to enable/disable WinRM on remote hosts.
a. To enable: .\PsExec.exe @$HOST_FILE_PATH -u $USERNAME -p $PASSWORD -c
enable_winrm.bat

b. To disable: .\PsExec.exe @$HOST_FILE_PATH -u $USERNAME -p $PASSWORD -c


disable_winrm.bat

5. if you get a error message on elevated user, add the -h option to PsExec.exe: .\PsExec.exe -h

1. Download and extract PsExec from PsTools.

1 of 4 11/28/2018, 2:19 PM
Enable/Disable WinRM on remote hosts | Green Circle Community https://greencircle.vmturbo.com/docs/DOC-1912

2. Download the attached *.bat files

They are linked at the bottom of this wiki page.

3. Create a text file containing the hosts.

hosts file

hp-dl590

hp-dl591
hp-dl592

PowerShell PsExec

Enable WinRM

2 of 4 11/28/2018, 2:19 PM
Enable/Disable WinRM on remote hosts | Green Circle Community https://greencircle.vmturbo.com/docs/DOC-1912

.\PsExec.exe @C:\Users\marco.yuen\hosts.txt -u corp\marco.yuen -p XXXX -c


C:\Users\marco.yuen\enable_winrm.bat

Disable WinRM

.\PsExec.exe @C:\Users\marco.yuen\hosts.txt -u corp\marco.yuen -p XXXX -c


C:\Users\marco.yuen\disable_winrm.bat

205 bytes 341 bytes

0 Comments

3 of 4 11/28/2018, 2:19 PM
Enable/Disable WinRM on remote hosts | Green Circle Community https://greencircle.vmturbo.com/docs/DOC-1912

Related Content

Recommended Content

Incoming Links

4 of 4 11/28/2018, 2:19 PM