This module was written to assist working with Azure Resource Manager Resources. Additional functionality may be added later and I will use this as a generic module to house Powershell functions specific to working with Azure Resource Manager Resources.
DISCLAIMER: Neither this module, nor its creator are in any way affiliated with Microsoft.
This module can be installed from the PowerShell Gallery using the command below.
Install-Module AzureRM-Helpers -Repository PSGallery
The following illustrates how to remove a Azure Resource Manager VM and it's associated disks, network interfaces and public IP addresses.
# Login to the Azure RM Account
Login-AzureRmAccount
# Select the subscription
Select-AzureRmSubscription -Subscription "Azure Subscription"
# Import the module
Import-Module AzureRM-Helpers
# Remove a Resource Manager VM using the VM and Resource Group name
Remove-AzureRMHelperVM -Name AzureRMVM -ResourceGroupName ResourceGroup -Verbose
# Remove a Resource Manager VM by piping a PSVirtualMachine object
$azureRMVirtualMachine = Get-azureRMVM -Name AzureRMVM -ResourceGroupName ResourceGroup
$azureRMVirtualMachine | Remove-AzureRMHelperVM
Below is a list of the available functions in the module
- Get-AzureRMHelperVhdInfoFromUri
- Get-AzureRMHelperVMDataDisks
- Get-AzureRmVMOSDiskInfo
- Get-AzureRMHelperResourceInfoFromID
- Get-AzureRMHelperVMNicInfo
- Get-AzureRMHelperVMPublicIPAddress
- Remove-AzureRMHelperVM
- Oliver Li