Passer au contenu principal

Commandes utiles WinRM

Obtenir la liste des hôtes autorisés

Via CMD

# Via CMD
winrm get winrm/config/client

Via Powershell

# Via PowerShell
Get-Item WSMan:\localhost\Client\TrustedHosts
Accepter de se connecter ou de recevoir les connexions

Via CMD

# via CMD
winrm set winrm/config/client '@{TrustedHosts="core"}'

Via PowerShell

# via PowerShell
Set-Item WSMan:\localhost\Client\TrustedHosts *
 
Tester la connexion WinRM
# Via PowerShell
Test-WsMan NomMachine