Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Potential improvement/changes in future #304

Open
KristiyanGK opened this issue Dec 18, 2020 · 0 comments
Open

[Feature] Potential improvement/changes in future #304

KristiyanGK opened this issue Dec 18, 2020 · 0 comments

Comments

@KristiyanGK
Copy link
Contributor

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant