Advertisement
mikedopp

Enable PSRemoting

Aug 19th, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.43 KB | None | 0 0
  1. @echo on
  2. echo %date% > "WinRM.txt"
  3. Set startDate=%date%
  4. Set sdy=%startDate:~10%
  5. Set /a sdm=1%startDate:~4,2% - 100
  6. Set /a sdd=1%startDate:~7,2% - 100
  7. powershell winrm get winrm/config > c:\TEMP\WinRM.txt
  8. powershell set-executionpolicy unrestricted
  9. powershell winrm quickconfig -q
  10. powershell enable-psremoting -force
  11. powershell restart-service winrm
  12. powershell .\VOTEWIEGHT.ps1
  13. rem "WinRM.txt" "WinRM%sdy%%sdm%%sdd%.txt"
  14. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement