dsccommunity / xRemoteDesktopSessionHost

This module contains DSC resources for the management and configuration of Microsoft Remote Desktop Session Host (RDSH).
MIT License
36 stars 47 forks source link

Creating Session Collection fails when disconnectedSessionLimit is already set with a GPO #32

Closed KennethVerbeure closed 6 years ago

KennethVerbeure commented 6 years ago

The property DisconnectedSessionLimit is configured by using Group Policy settings. Use the Group Policy Management Console to configure this property. The PowerShell DSC resource \u0027[xRDSessionCollection]Collection\u0027 with SourceInfo \u0027C:\Packages\Plugins\Microsoft.Powershell.DSC\2.75.0.0\DSCWork\CreateAppServer.ps1.0\CreateAppServer.ps1::79::9::xRDSessionCollection\u0027 threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details. The SendConfigurationApply function did not succeed. LCM failed to start desired state configuration manually.",

KennethVerbeure commented 6 years ago

Found out its not actually this library that breaks but the module you depend on. Anyone has a proper solution for this exept adding -errorAction SilentlyContinue feel free to help

when executing this command myself on my env where my GPO on i get the same error:

New-RDSessionCollection -CollectionName 'testink' -CollectionDescription 'something' -SessionHost $localhost -ConnectionBroker $localhost
The property DisconnectedSessionLimit is configured by using Group Policy settings. Use the Group Policy Management Console to configure this property.
    + CategoryInfo          : ObjectNotFound: (:) [Add-RDSHServer], RDManagementException
    + FullyQualifiedErrorId : GPSettingfailed,Microsoft.RemoteDesktopServices.Management.Cmdlets.AddRDSessionHostServerCommand
    + PSComputerName        : localhost
wahidsaleemi commented 6 years ago

I'm having the same problem. Debugging this shows that "Update-VirtualDesktopCollection" is the internal function that is being called. Or it might need to be fixed in a couple of places.

KennethVerbeure commented 6 years ago

i ended up working around this issue by setting the GPO's on my env after i configured the RDS. I'll close this ticket since the bug is not with this module but with the underlying powershell commands