You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This relates to issue #91 which wasn't properly resolved by PR #92
In my use case, I am trying create an RDS deployment with two RD Session Collections, uxing `xRDSessionCollection.
The Test-TargetResource function in xRDSessionCollection relies on Get-TargetResource, within the same resource.
Get-TargetResource has been amended so that it filters the RD Session Collections on CollectionName matching the desired $CollectionName if there is more than one RD Session Collection returned from Get-RDSessionCollection, which had it's filtering removed (bug) when it was migrated from using WMI to CIM for Windows Server 2019.
I'm not sure why the change to xRDSessionCollection was implemented in this way, with a qualification around the filtering.
In the logs attached, there is no existing RD Session Collection called Test Collection, but because Test-TargetResource returns true, Set-TargetResource is never run.
Verbose logs
{"time": "2022-09-06T15:59:38.575+01:00", "type": "verbose", "message": "[RDS-BK1]: LCM: [ Start Resource ] [[xRDSessionCollection]collection Test Collection] "},
{"time": "2022-09-06T15:59:38.591+01:00", "type": "verbose", "message": "[RDS-BK1]: LCM: [ Start Test ] [[xRDSessionCollection]collection Test Collection] "},
{"time": "2022-09-06T15:59:39.763+01:00", "type": "verbose", "message": "[RDS-BK1]: [[xRDSessionCollection]collection Test Collection] Checking for existence of RDSH collection."},
{"time": "2022-09-06T15:59:39.778+01:00", "type": "verbose", "message": "[RDS-BK1]: [[xRDSessionCollection]collection Test Collection] Getting information about RDSH collection."},
{"time": "2022-09-06T15:59:40.528+01:00", "type": "verbose", "message": "[RDS-BK1]: LCM: [ End Test ] [[xRDSessionCollection]collection Test Collection] in 1.9380 seconds."},
{"time": "2022-09-06T15:59:40.528+01:00", "type": "verbose", "message": "[RDS-BK1]: LCM: [ Skip Set ] [[xRDSessionCollection]collection Test Collection] "},
{"time": "2022-09-06T15:59:40.528+01:00", "type": "verbose", "message": "[RDS-BK1]: LCM: [ End Resource ] [[xRDSessionCollection]collection Test Collection] "},
Name Version Path
---- ------- ----
xRemoteDesktopSessionHost 2.1.0 C:\Program Files\WindowsPowerShell\Modules\xRemoteDesktopSessionHost\2.1.0\xRemoteDesktopSessionHost.psd1
The text was updated successfully, but these errors were encountered:
Problem description
This relates to issue #91 which wasn't properly resolved by PR #92
In my use case, I am trying create an RDS deployment with two RD Session Collections, uxing `xRDSessionCollection.
The
Test-TargetResource
function inxRDSessionCollection
relies onGet-TargetResource
, within the same resource.Get-TargetResource
has been amended so that it filters the RD Session Collections onCollectionName
matching the desired$CollectionName
if there is more than one RD Session Collection returned fromGet-RDSessionCollection
, which had it's filtering removed (bug) when it was migrated from using WMI to CIM for Windows Server 2019.xRemoteDesktopSessionHost/source/DSCResources/MSFT_xRDSessionCollection/MSFT_xRDSessionCollection.psm1
Line 30 in b97c82b
I'm not sure why the change to
xRDSessionCollection
was implemented in this way, with a qualification around the filtering.In the logs attached, there is no existing RD Session Collection called
Test Collection
, but becauseTest-TargetResource
returns true,Set-TargetResource
is never run.Verbose logs
DSC configuration
Suggested solution
Re-implment as:
or
... depending on preferred layout/coding standards
Operating system the target node is running
PowerShell version and build the target node is running
xRemoteDesktopSessionHost version
The text was updated successfully, but these errors were encountered: