dscr-for-vmware
dscr-for-vmware copied to clipboard
PSv7 and VMware.vSphereDSC and Get-DscResource
While trying to use the Invoke-DscResource cmdlet on a Linux box, I noticed that the resources for one reason or another are not found.
On PSv7 on a Windows box the Get-DscResource cmdlet only lists the composite resources (3). On a Linux box (Ubuntu & Photon) with PSv7, the Get-DscResource cmdlet returns nothing.
According to PowerShell issue#10350 the Get-DscResource cmdlet should return class-based resources.
Is this a known issue? Anything specific to VMware.vSPhereDSC?
We are currently looking into this issue and researching it.
Btw, the Invoke-DscResource cmdlet also has issues in PSv5.1.
With the composite resources it errors out with
Invoke-DscResource : Failed to serialize properties into CimInstance.
which is an old known issue. See Invoke-DSCResource on WindowsFeatureSet fails.
And with non-composite resources it errors out with
The PowerShell DSC resource VMHostRole from module <VMware.vSphereDSC,2.1.0.58> does not exist at the PowerShell module path nor is it registered as a WMI DSC resource.
All in all, it looks as if Invoke-DscResource is a no-go for now.
@lucdekens the issue seems to be the same as the one described here. We've verified the workaround provided there: To comment FunctionsToExport and it works as expected on PSv7 on a Windows box.
Can you confirm that it works as well on your boxes ?