Remove-AzureVMDscExtension, doesn't seem to work

This topic contains 3 replies, has 2 voices, and was last updated by  Tudor A. Lascu 3 years ago.

  • Author
  • #22453

    Tudor A. Lascu

    Hi everybody,
    I'm starting to explore the Azure DSC connection.
    I was able to successfully deploy a configuration through

     Publish-AzureVMDscConfiguration -StorageContext $storageContext -ConfigurationPath '.\basic-iis-configuration.ps1'


     $vm = Set-AzureVMDSCExtension -VM $vm -StorageContext $storageContext -ConfigurationArchive "" -ConfigurationName "IISInstall"

    But in the cleanup phase, when I try to remove the DSC extension from the VM through

     Remove-AzureVMDscExtension -VM $vm -Verbose | Update-AzureVM

    nothing seems to happen.
    Did anyone else encounter the same problem? Any hints?

    Thanks a lot!

  • #22548

    Don Jones

    I'm not sure you're meant to pipe that to Update-AzureVM. What happens when you try running just the Remove- command? Does it DO anything, regardless of whether or not it prints anything on the screen?

  • #22656

    Tudor A. Lascu

    I actually saw the command piped to Update-AzureVM in this article: [url]{}[/url]
    When I run

    {Remove-AzureVMDscExtension -VM $vm -Verbose}

    it prints the following

    DeploymentName : my-first-vm
    Name : my-first-vm
    Label :
    VM : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.PersistentVM
    InstanceStatus : ReadyRole
    IpAddress :
    InstanceStateDetails :
    PowerState : Started
    InstanceErrorCode :
    InstanceFaultDomain : 0
    InstanceName : my-first-vm
    InstanceUpgradeDomain : 0
    InstanceSize : Small
    HostName : my-first-vm
    AvailabilitySetName :
    DNSName :
    Status : ReadyRole
    GuestAgentStatus : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.GuestAgentStatus
    ResourceExtensionStatusList : {Microsoft.Compute.BGInfo, Microsoft.Powershell.DSC}
    PublicIPAddress :
    PublicIPName :
    NetworkInterfaces : {}
    ServiceName : first-ale-vm
    OperationDescription : Get-AzureVM
    OperationId : b46f15a8a0cc7a9fb7578e7a1a8aec72
    OperationStatus : OK

    and nothing seems to happen as I checked by looking both at the graphical interface through and by printing $vm.ResourceExtensionStatusList, obtaining:
    HandlerName : Microsoft.Powershell.DSC
    Version :
    Status : Ready
    Code :
    Message :
    FormattedMessage :
    ExtensionSettingStatus : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ResourceExtensionConfigurationStatus
    ExtensionData :

    Thanks a lot for your help!

  • #23632

    Tudor A. Lascu

    for anyone interested I forward the answer I received from Microsoft Connect in response to [url][/url].
    Apparently the one above is a well known issue for all [b]Remove-AzureVM*Extension[/b] cmdlets. This has also been filed under [url][/url].
    As a fix, in the mean time, one can use the [b]Set-AzureVMExtension[/b] cmdlet with option [b]-Uninstall[/b] as in:

    $vm | Set-AzureVMExtension -Uninstall -ExtensionName DSC -Publisher Microsoft.Powershell -Version 1.* | Update-AzureVM


You must be logged in to reply to this topic.