Forum Discussion

Atekka's avatar
Atekka
Copper Contributor
Sep 12, 2022

Windows 11 RM Https

Hello!

 

I am trying to enable remote commands via Powershell on a Windows 11 Enterprise N in Azure.I have a script which if I run locally works well but if from a pipeline in Azure Devops I got:

 

Machine="localhost"><f:Message><f:ProviderFault provider="Config provider" 
path="%systemroot%\system32\WsmSvc.dll"><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" 
Code="2150859113" Machine="3waegf4b2x"><f:Message>WinRM firewall exception will not work since one of the network 
connection types on this machine is set to Public. Change the network connection type to either Domain or Private and 
try again. </f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
At line:116 char:17

 

Tried all of the command which I can found on the net to fix it but nothing seems to help:

 

Get-NetConnectionProfile | Where-Object { $_.NetworkCategory -match "Public" } | Set-NetConnectionProfile -NetworkCategory Private; Enable-PSRemoting -SkipNetworkProfileCheck -Force; Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP-PUBLIC" -RemoteAddress Any; Set-Item wsman:\localhost\Client\TrustedHosts -value * -Force

 

Is there any new "thing" in Windows 11 which I should take care of to make this work? What do I miss here?

 

Thanks,

Attila

No RepliesBe the first to reply

Share