Skip to content

Set-AzureVMDscExtension checks local computer for DSC modules #18

@pcgeek86

Description

@pcgeek86

Problem Description: The Set-AzureVMDscExtension command in the Azure PowerShell module, version 0.8.11, is checking the local computer for all of the supporting DSC modules (resources) before deploying the configuration document to the target virtual machine. If the local computer doesn't have all of the DSC resources that are required on the target system, then the command fails.

Expected Behavior: The Set-AzureVMDscExtension` command should not require that DSC resources be present on the local system, prior to deployment of the new/updated VM configuration.

image

VERBOSE: Parsing configuration script: C:\dc01-dsc.ps1
Publish-AzureVMDscConfiguration : Configuration script 'C:\dc01-dsc.ps1' contained parse errors:
At C:\dc01-dsc.ps1:7 char:5

  • Import-DscResource -ModuleName xActiveDirectory,xPendingReboot;
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Unable to load module 'xActiveDirectory': module not found.

NOTE: I found out that the Publish-AzureVMDscConfiguration command is bundling together the DSC modules along with the DSC configuration document, but this should still be an optional configuration. If I pre-stage the DSC resource on the target system using another mechanism, I shouldn't have to bundle them into the Azure DSC ZIP file.

Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
http://twitter.com/pcgeek86

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions