Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – Install Azure Modules

Posted on March 30, 2016October 16, 2017 By David Kittell

In order to work in PowerShell with Azure you need to have the modules setup properly, the script below will help get you ready to go then test it.

# Azure PowerShell
Get-Module PowerShellGet -list | Select-Object Name,Version,Path

# Install the Azure Resource Manager modules from the PowerShell Gallery
Install-Module AzureRM -AllowClobber -Force
 
# Install the Azure Service Management module from the PowerShell Gallery
Install-Module Azure -AllowClobber -Force
$PSVersionTable
$env:PSModulePath 

# Install the Azure Resource Manager modules from the PowerShell Gallery
Install-Module AzureRM

# Install the Azure Service Management module from the PowerShell Gallery
Install-Module Azure

# Import AzureRM modules for the given version manifest in the AzureRM module
Import-Module AzureRM

# Import Azure Service Management module
Import-Module Azure

# To make sure the Azure PowerShell module is available after you install
Get-Module –ListAvailable

# To log in to Azure Resource Manager
Login-AzureRmAccount

# You can also use a specific Tenant if you would like a faster log in experience
# Login-AzureRmAccount -TenantId xxxx

# To view all subscriptions for your account
Get-AzureRmSubscription

# Add
Add-AzureAccount
# Show configured Subscriptions
Get-AzureSubscription | FT -AutoSize SubscriptionName, SubscriptionID
(Get-AzureService).ServiceName
get-azurereservedip | Select ReservedIPName, Address, ServiceName
Originally Posted on March 30, 2016
Last Updated on October 16, 2017
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Azure Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Azure PowerShell – Create Virtual Network Within Resource Group

Posted on December 29, 2016

This is still a work in progress to include all the variables but the script below will create a Resource Group then create a Virtual Network with 3 subnets and a gateway along with custom DNS. # Main Reference: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-vnet-arm-ps Clear Write-verbose "Setting Environment Variables – Start" $VNetName = “azuredev-eastus-vnet”…

Read More

MSSQL – Sort By Day Of Week

Posted on March 21, 2014October 26, 2015

This script utilizes this Format Date Function to sort results based on a day of the week. The case statement in this query is easy to update if your region has a different day for the start of the week. This particular script is part of a metric that I…

Read More

PowerShell – Get/Set Windows Date/Time from NTP

Posted on December 3, 2015February 12, 2016

Sometimes w32Time is not available or practical so we get this PowerShell script to pull NTP date/time and set the Windows Date/Time <# Majority of code is from: Chris Warwick, @cjwarwickps, August 2012 chrisjwarwick.wordpress.com #> $sNTPServer = ‘pool.ntp.org’ function Get-NTPDateTime ([string] $sNTPServer) { $StartOfEpoch=New-Object DateTime(1900,1,1,0,0,0,[DateTimeKind]::Utc) [Byte[]]$NtpData = ,0 * 48…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes