<!DOCTYPE html> <html> <head> </head> <body> <p><strong># Enabling PowerShell</strong></p> <p>Enable-PSRemoting -Force</p> <p><strong>To enable all host:</strong><br />Set-Item wsman:localhostclienttrustedhosts *<br /><br /><strong>To enable a specific host:</strong><br />Set-Item wsman:localhostclienttrustedhosts prtg.goline.ch<br /><br /><strong>To delete all hosts:</strong> <br />Clear-Item WSMan:/localhost/Client/TrustedHosts -Force<br /><br /><strong>To get all authorized hosts:</strong><br />Get-Item WSMan:localhostClientTrustedHosts | fl Name, Value<br /><br /></p> <p><strong>Restart WinRM service:</strong><br />Restart-Service WinRM</p> <p><strong># Connect in PowerShell to a remote computer</strong></p> <p>Enter-PSSession -ComputerName COMPUTER</p> <p>or</p> <p>Enter-PSSession -ComputerName COMPUTER -Credential USER</p> </body> </html>
Subscribe
0 Comments
Oldest