/azurerm-helpers

Functions to work with AzureRM Resources

Primary LanguagePowerShellApache License 2.0Apache-2.0

AzureRM-Helpers Build status GitHub license PowerShell Gallery

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.

Usage

This module can be installed from the PowerShell Gallery using the command below.

Install-Module AzureRM-Helpers -Repository PSGallery

Example

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

Functions

Below is a list of the available functions in the module

Disks

  • Get-AzureRMHelperVhdInfoFromUri
  • Get-AzureRMHelperVMDataDisks
  • Get-AzureRmVMOSDiskInfo

IDs

  • Get-AzureRMHelperResourceInfoFromID

NetworkInterfaces

  • Get-AzureRMHelperVMNicInfo

PublicIPAddresses

  • Get-AzureRMHelperVMPublicIPAddress

VM

  • Remove-AzureRMHelperVM

Authors

  • Oliver Li