shuey
(Shuey)
1
Description
This script will enable WinRM on a remote machine (if it’s not already enabled).
Copy the code into a text file and save it (mine is named “winrm_enabler.bat”), then run it from a command prompt. You’ll be prompted to enter a computer name.
This script requires that you have the PsExec executable located either in the directory you are running the command from, or in your PATH (C:\Windows\System32 and/or C:\Windows\SysWOW64).
The entire PsTools suite can be downloaded from here (Only 1.6Mb!):
Source Code
:Start
cls
@echo off
Set /P Computer=Enter the Computer Name:
psexec \\%Computer% -s C:\windows\system32\winrm.cmd qc -quiet
Goto End
:End