dsccommunity / ConfigMgrCBDsc

This module contains DSC resources for the management and configuration of Microsoft System Center Configuration Manager Current Branch (ConfigMgrCB).
MIT License
27 stars 8 forks source link

CMAccounts: Get return for Single CMAccount #92

Closed jeffotterpohl closed 3 years ago

jeffotterpohl commented 3 years ago

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

When running Invoke-DscResource -ModuleName ConfigMgrCBDsc -Name CMAccounts -Method Get -Property $properties and there is currently only 1 CMAccount, receive a CIM Instance error as it is expected an string[] return and only returns a string.

Verbose logs showing the problem

Suggested solution to the issue

Update module to force an string[] or update what is returned with Get-TargetResource and remove the array.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

Version and build of PowerShell the target node is running

Version of the DSC module that was used

Version 1.0.1