Skip to content

Instantly share code, notes, and snippets.

@paulvill76
Forked from akrisiun/psremoting.md
Created March 18, 2021 11:10
Show Gist options
  • Save paulvill76/3e8d15a4dfba104799b1b6f1c170e299 to your computer and use it in GitHub Desktop.
Save paulvill76/3e8d15a4dfba104799b1b6f1c170e299 to your computer and use it in GitHub Desktop.
Enable PSRemoting port 5985

#Run winrm quickconfig defaults echo Y | winrm quickconfig

Enter-PSSession -ComputerName 192.168.2.229 –Credential

netstat -nb | findstr /R ":80"

Remote PS port 5985

#Run enable psremoting command with defaults
Enable-PSRemoting -force

# adjust local token filter policy
Set-ItemProperty –Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System –Name LocalAccountTokenFilterPolicy –Value 1 -Type DWord

#Enabled Trusted Hosts for Universial Access
Set-Item WSMan:\localhost\Client\TrustedHosts  –Value * -Force

restart-Service winrm
echo "Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment