Remove-AzureVMDscExtension, doesn't seem to work

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'

and

 $vm = Set-AzureVMDSCExtension -VM $vm -StorageContext $storageContext -ConfigurationArchive "basic-iis-configuration.ps1.zip" -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!

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?

Hi,
I actually saw the command piped to Update-AzureVM in this article: {http://www.powershellmagazine.com/2014/08/05/understanding-azure-vm-dsc-extension/}
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 : 100.91.86.111
InstanceStateDetails :
PowerState : Started
InstanceErrorCode :
InstanceFaultDomain : 0
InstanceName : my-first-vm
InstanceUpgradeDomain : 0
InstanceSize : Small
HostName : my-first-vm
AvailabilitySetName :
DNSName : http://first-ale-vm.cloudapp.net/
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 portal.azure.com and by printing $vm.ResourceExtensionStatusList, obtaining:

HandlerName : Microsoft.Powershell.DSC
Version : 1.5.0.0
Status : Ready
Code :
Message :
FormattedMessage :
ExtensionSettingStatus : Microsoft.WindowsAzure.Commands.ServiceManagement.Model.ResourceExtensionConfigurationStatus
ExtensionData :

Thanks a lot for your help!

Hi,
for anyone interested I forward the answer I received from Microsoft Connect in response to [url]https://connect.microsoft.com/PowerShell/feedback/details/1162331/remove-azurevmdscextension-does-not-seem-to-work[/url].
Apparently the one above is a well known issue for all Remove-AzureVM*Extension cmdlets. This has also been filed under [url]https://github.com/Azure/azure-powershell/issues/257[/url].
As a fix, in the mean time, one can use the Set-AzureVMExtension cmdlet with option -Uninstall as in:

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

Cheers!