POSHOrigin_vSphere icon indicating copy to clipboard operation
POSHOrigin_vSphere copied to clipboard

Add support for compiling and applying a DSC configuration upon VM creation.

Open devblackops opened this issue 9 years ago • 0 comments

This will take a bit of work but it should be possible to dynamically create a DSC configuration MOF and apply it to the machine upon creation.

resource 'vsphere:vm' 'myvm' @{
    #
    # other options omitted for brevity
    #
    DSC = @(
        @{
            name = 'MySMBShare'
            type = 'xSMBShare'
            options = @{
                ensure = "present" 
                name   = "SMBShare1"
                path = "C:\Users\Duser1\Desktop"  
                description = "This is a test SMB Share"          
            }
        }
        @{
            name = 'IIS'
            type = 'windowsfeature'
            options = @{
                name = 'web-server'
                ensure = 'present'
            }
        }
    )
}

devblackops avatar Jun 02 '16 04:06 devblackops