Last active
November 6, 2019 18:17
-
-
Save gfoss/dd9b89b71c0bfc4829e765576c365158 to your computer and use it in GitHub Desktop.
quickly enable psremoting on Windows Hosts via PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function enablePSRemoting { | |
Enable-PSRemoting –force | |
Set-Service WinRM -StartMode Automatic | |
Get-WmiObject -Class win32_service | Where-Object {$_.name -like "WinRM"} | |
Set-Item WSMan:localhost\client\trustedhosts -value * | |
Get-Item WSMan:\localhost\Client\TrustedHosts | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment