PowerShell / PSDscResources

MIT License
129 stars 53 forks source link

WaitForXX resources not compatible with WinRM HTTPs listener #165

Open nmenigonms opened 5 years ago

nmenigonms commented 5 years ago

Details of the scenario you tried and the problem that is occurring

WaitForXX (All, Any, Some) resources by default work only on the WinRM Http listener port (5985). For some customers this is not considered as secure and default port is typically disabled on firewall and only Https listener on port 5986 is allowed. Consequence is that all remote requests on dependant nodes when WaitForXX is called fail.

Suggested solution to the issue

Add a parameter on WaitForXX resources to tell if we want to stay with default http listener or use an https listener on another port instead. May be also add a parameter for the listener port (with 5985 as default). Then update the PSDscXMachine.psm1 file, where the Invoke-WSManAction is made to add the -UseSSL flag and maybe other param like port to make it work with WinRM with and without SSL.

The operating system the target node is running

OsName : Microsoft Windows Server 2016 Datacenter OsOperatingSystemSKU : DatacenterServerEdition OsArchitecture : 64-bit WindowsBuildLabEx : 14393.3024.amd64fre.rs1_release.190530-2002 OsLanguage : en-US OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

PSVersion 5.1.14393.2969
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.2969
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

PSDesiredStateConfiguration - V1.1

mhendric commented 5 years ago

Thanks for the submission @nmenigonms. Good idea.