Well, this works much better.
if(Test-Path -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Listener*+HTTPS)
{return $true}
else
{return $false}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I want to deploy Configuration Baseline containing the Configuration Item that should report servers with WinRM https listener as compliant hence I tried with script which works fine in PowerShell:
if(Get-WSManInstance -ResourceURI winrm/config/listener -SelectorSet @{Address="*";Transport="HTTPS"})
{return $true}
else
{return $false}
However, this code inside CI does not work properly and systems without WinRM https listener are reported not as non-compliant but with error. Why is this happening?
Well, this works much better.
if(Test-Path -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Listener*+HTTPS)
{return $true}
else
{return $false}
Hi, @Bojan Zivkovic
Thank you for posting in Microsoft Q&A forum and thanks for the update.
We are glad that you found an accurate way to config the Configuration Item.