PowerTip: Get Status of a DSC File in Azure

Summary: Use the Azure cmdlets to get the current status of a Desired State Configuration file on a virtual machine.

Hey, Scripting Guy! Question How can I use Windows PowerShell to determine if a Desired State Configuration (DSC) file that I applied to an
           Azure virtual machine is successful?

Hey, Scripting Guy! Answer Get the Azure virtual machine and pipe the object to Get-AzureVMDscExtensionStatus. The following example
           checks the status on the virtual machine called Hitchy01 on the service called AzureVMNetwork:

Get-AzureVM –service ‘AzureVMNetwork’ –name ‘Hitchy01’ | Get-AzureVMDscExtensionStatus

Comments (2)

  1. G Davies says:

    This is the "old" way – for azure resource manager, use:
    get-azurermvmextension -ResourceGroupName "XXXX" -VMName "YYYY" -Name "dscExtension" –Status

  2. @G Davies

    Good point! The Azure Cmdlets are constantly evolving and the Azure Resource Manager Cmdlets and Portal have recently been released to production. There is indeed a newer way when working with ARM!

    Keep your eyes on the Hey Scripting Guy blog for an upcoming series on the new Azure Resource Manager Cmdlets in the next while.

    Honorary Scripting Guy

Skip to main content