Skip to content

Instantly share code, notes, and snippets.

@dennythecoder
Created December 31, 2019 04:41
Show Gist options
  • Select an option

  • Save dennythecoder/05c293f4015284ad5bedb4de5313d2a2 to your computer and use it in GitHub Desktop.

Select an option

Save dennythecoder/05c293f4015284ad5bedb4de5313d2a2 to your computer and use it in GitHub Desktop.

Run PowerShell as Admin

$machineName = "MachineName"
Enable-PSRemoting -force 
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $machineName
Enter-PSSession -ComputerName $machineName -Credential (Get-Credential)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment