Closed pokepoke81 closed 4 years ago
Hi @pokepoke81, I think the problem here is that it is already set by group policy in your environment and that's what the error warns about. So if you would remove the group policy it would actually be able to apply the setting. Can you test that?
I am able to run the Powershell command Set-RDSessionCollectionConfiguration manually with all of the settings (including IdleSessionLimitMin) without getting an error. The error comes when trying from DSC (through ansible). I just tried re-running the DSC after manually applying the settings and I get a different error: "Failed to invoke DSC Set method: Unable to configure the RD Session Host server WC-RDS-SH03.wcdom.loc. Invalid parameter " that I'll have to look into why that's occuring.
It looks like I had another setting misconfigured and instead of complaining about that, it gave me this erroneous error about IdleSessionLimitMin. I was using the numbers for EncryptionLevel instead of the string. This documentation was confusing: https://docs.microsoft.com/en-us/powershell/module/remotedesktop/set-rdsessioncollectionconfiguration?view=win10-ps
In xRDSessionCollectionConfiguration, the parameter for IdleSessionLimitMin fails
Details of the scenario you tried and the problem that is occurring
Sending config to collection fails
Verbose logs showing the problem
Failed to invoke DSC Set method: The property IdleSessionLimit is configured by using Group Policy settings. Use the Group Policy Management Console to configure this property.
Suggested solution to the issue
Remove option from config and documentation
The DSC configuration that is used to reproduce the issue (as detailed as possible)
(I'm using Ansible's win_dsc resource, so it's in that format)
The operating system the target node is running
OsName : Microsoft Windows Server 2019 Datacenter OsOperatingSystemSKU : DatacenterServerEdition OsArchitecture : 64-bit WindowsVersion : 1809 WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434 OsLanguage : en-US OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
Name Value
PSVersion 5.1.17763.1007 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.1007 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Version of the DSC module that was used
I don't see versions