dscr-for-vmware
dscr-for-vmware copied to clipboard
[Feature] Potential improvement/changes in future
- Logging to a property logic should be removed when Invoke-DscResource no longer uses a separate runspace in order to create the DSC resource objects.
- When Invoke-DscResource stops internally using a new runspace, the connections to vSphere can be fully reused without creating new ones via session secret.
- Instead of using Invoke-DscResource, it could be substituted by creating the resources manually and calling their get/set/test methods. Example:
$block = @" using module @{ ModuleName = $ModuleName RequiredVersion = $RequiredVersion } [$resourceName]::new() "@ # create object $dscObj = . ([ScriptBlock]::create($block)) # set dsc key properties to object $dscObj.Key = $propValue # call method $dscObj.$method # test/get/set