Skip to content

Instantly share code, notes, and snippets.

@MM1977
MM1977 / asmae-enable-remote-access.ps1
Created April 30, 2026 14:53
GOCOM PC enable WinRM (one-shot)
# Activation accès distant pour PC GOCOM Dashboard (172.16.1.24)
# À exécuter UNE FOIS par Asmae sur le PC, en PowerShell Administrateur
# Durée : ~30 secondes
# 1) WinRM — service distant pour scripter sans RDP graphique
Enable-PSRemoting -Force -SkipNetworkProfileCheck
Set-Service -Name WinRM -StartupType Automatic
Set-Item WSMan:\localhost\Service\Auth\Basic -Value $true
Set-Item WSMan:\localhost\Client\AllowUnencrypted -Value $true
Set-Item WSMan:\localhost\Client\TrustedHosts -Value '*' -Force