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