0% found this document useful (0 votes)
2K views125 pages

Installing Azure PowerShell Az Module

The document provides information on installing the new Azure PowerShell Az module, including requirements, installation steps using PowerShellGet for the current or all users, and troubleshooting common issues like installing behind a proxy. It recommends installing only for the current user unless elevated privileges are needed, describes compatibility with PowerShell 5.1 and Core, and offers options to install offline by saving modules to a file share.

Uploaded by

Me
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views125 pages

Installing Azure PowerShell Az Module

The document provides information on installing the new Azure PowerShell Az module, including requirements, installation steps using PowerShellGet for the current or all users, and troubleshooting common issues like installing behind a proxy. It recommends installing only for the current user unless elevated privileges are needed, describes compatibility with PowerShell 5.1 and Core, and offers options to install offline by saving modules to a file share.

Uploaded by

Me
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Introducing the new Azure PowerShell Az module
  • Install the Azure PowerShell module
  • Install Azure PowerShell on Windows with MSI
  • Uninstall the Azure PowerShell module
  • Migrate Azure PowerShell from AzureRM to Az
  • Breaking changes for Az 1.0.0
  • Get started with Azure PowerShell
  • Sign in with Azure PowerShell
  • Create an Azure service principal with Azure PowerShell
  • Azure PowerShell context objects
  • Query output of Azure PowerShell
  • Use multiple Azure subscriptions
  • Azure PowerShell release notes
  • Migration Guide for Az 2.0.0
  • Migration Guide for Az 3.0.0

Contents

Azure PowerShell
Introducing the new Az module
Install
Install with PowerShell Get
Install with MSI
Uninstall
Migrate from AzureRM
Migration steps
Changes between AzureRM and Az
Get started
Cloud Shell
Sign in
Authentication methods
Create a service principal
Credential contexts
Queries
Format output
Manage subscriptions
Deploy
Deploy Resource Manager templates
Export Resource Manager templates
Deploy private Resource Manager templates
Concepts
PowerShell jobs
Tutorials
Create Virtual Machines
Sample Scripts
Linux Virtual Machines
Windows Virtual Machines
Web Apps
SQL Databases
Cosmos DB
Release notes
Release notes
Az 2.0.0 breaking changes
Az 3.0.0 breaking changes
Introducing the new Azure PowerShell Az module
2/4/2020 • 3 minutes to read • Edit Online

Starting in December 2018, the Azure PowerShell Az module is in general release and is now the intended
PowerShell module for interacting with Azure. Az offers shorter commands, improved stability, and cross-platform
support. Az also has feature parity with AzureRM, giving you an easy migration path.
With the Az module, Azure PowerShell is now compatible with PowerShell 5.1 on Windows and PowerShell Core
6.x and later on all supported platforms - including Windows, macOS, and Linux.
Az is a new module, so the version has been reset to 1.0.0.

Why a new module?


Major updates can be inconvenient, so it's important that we let you know why the decision was made to introduce
a new set of modules, with new cmdlets, for interacting with Azure from PowerShell.
The biggest and most important change is that PowerShell has been a cross-platform product since the
introduction of PowerShell Core 6.x, based on the .NET Standard library. We're committed to bringing Azure
support to all platforms, which means that the Azure PowerShell modules needed to be updated to use .NET
Standard and be compatible with PowerShell Core. Rather than taking the existing AzureRM module and introduce
complex changes to add this support, the Az module was created.
Creating a new module also gave our engineers the opportunity to make the design and naming of cmdlets and
modules consistent. All modules now start with the Az. prefix and cmdlets all use the Verb- Az Noun form.
Previously, cmdlet names were not only longer, there were inconsistencies in cmdlet names.
The number of modules was also reduced: Some modules which worked with the same services have been rolled
together, and management plane and data plane cmdlets are now contained all within single modules for their
services. For those of you who manually manage dependencies and imports, this makes things much simpler.
By making these important changes that required building a new Azure PowerShell module, the team has
committed to making it easier than ever, and on more platforms than previously possible, to use Azure with
PowerShell cmdlets.

Upgrade to Az
To keep up with the latest Azure features in PowerShell, you should migrate to the Az module as soon as possible.
If you're not ready to install the Az module as a replacement for AzureRM, you have a couple of options available
to experiment with Az:
Use a PowerShell environment with Azure Cloud Shell. Azure Cloud Shell is a browser-based shell
environment which comes with the Az module installed and Enable-AzureRM compatibility aliases enabled.
Keep the AzureRM module installed with PowerShell 5.1 for Windows, but install the Az module for PowerShell
Core 6.x or later. PowerShell 5.1 for Windows and PowerShell Core use separate collections of modules. Follow
the instructions to install PowerShell Core and then install the Az module from a PowerShell Core terminal.
To upgrade from an existing AzureRM install:
1. Uninstall the Azure PowerShell AzureRM module
2. Install the Azure PowerShell Az module
3. OPTIONAL: Enable compatibility mode to add aliases for AzureRM cmdlets with Enable-AzureRMAlias while
you become familiar with the new command set. See the next section or Start migration from AzureRM to Az
for more details.

Migrate existing scripts to Az


The new cmdlet names have been designed to be easy to learn. Instead of using AzureRm or Azure in cmdlet
names, use Az . For example, the old command New-AzureRMVm has become New-AzVm . Migration is more than just
becoming familiar with the new cmdlet names, though: There are renamed modules, parameters, and other
important changes.
To help you with the process of migration from AzureRM to Az, we've got a number of resources:
Get started with migration from AzureRM to Az
Full list of breaking changes from AzureRM to Az 1.0.0
The Enable-AzureRmAlias cmdlet
The Az module has a compatibility mode to help you use existing scripts while you update to the new syntax. The
Enable-AzureRmAlias cmdlet enables a compatibility mode through aliases, to allow you to use existing scripts
with minimal modification while working towards a full migration to Az.

IMPORTANT
Even though the cmdlet names are aliased, there may still be new (or renamed) parameters or changed return values for the
Az cmdlets. Don't expect enabling aliases to take care of the migration for you! See the full breaking changes list to find
where your scripts may require updates.

Continued support for AzureRM


AzureRM will no longer receive new cmdlets or features. However, the AzureRM module is still officially
maintained and will get bug fixes through December 2020.
Install the Azure PowerShell module
2/11/2020 • 5 minutes to read • Edit Online

This article tells you how to install the Azure PowerShell modules using PowerShellGet. These instructions work
on Windows, macOS, and Linux platforms. For the Az module, currently no other installation methods are
supported.

Requirements
Azure PowerShell works with PowerShell 5.1 or higher on Windows, or PowerShell Core 6.x and later on all
platforms. If you aren't sure if you have PowerShell, or are on macOS or Linux, install the latest version of
PowerShell Core.
To check your PowerShell version, run the command:

$[Link]

To run Azure PowerShell in PowerShell 5.1 on Windows:


1. Update to Windows PowerShell 5.1 if needed. If you're on Windows 10, you already have PowerShell 5.1
installed.
2. Install .NET Framework 4.7.2 or later.
There are no additional requirements for Azure PowerShell when using PowerShell Core.

Install the Azure PowerShell module


WARNING
You can't have both the AzureRM and Az modules installed for PowerShell 5.1 for Windows at the same time. If you need to
keep AzureRM available on your system, install the Az module for PowerShell Core 6.x or later. To do this, install PowerShell
Core 6.x or later and then follow these instructions in a PowerShell Core terminal.

The recommended install method is to only install for the active user:

Install-Module -Name Az -AllowClobber -Scope CurrentUser

If you want to install for all users on a system, this requires administrator privileges. From an elevated PowerShell
session either run as administrator or with the sudo command on macOS or Linux:

Install-Module -Name Az -AllowClobber -Scope AllUsers

By default, the PowerShell gallery isn't configured as a trusted repository for PowerShellGet. The first time you
use the PSGallery you see the following prompt:
Untrusted repository

You are installing the modules from an untrusted repository. If you trust this repository, change
its InstallationPolicy value by running the Set-PSRepository cmdlet.

Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):

Answer Yes or Yes to All to continue with the installation.


The Az module is a rollup module for the Azure PowerShell cmdlets. Installing it downloads all of the available
Azure Resource Manager modules, and makes their cmdlets available for use.

Install offline
In some environments it's not possible to connect to the PowerShell Gallery. In those situations, you can still
install offline using one of these methods:
Download the modules to another location and use that as an installation source on your network. This can
be a complicated process, but will let you cache PowerShell modules on a single server or file share to be
deployed with PowerShellGet to any disconnected systems. Learn how to set up a local repository and
install on disconnected systems with Working with local PowerShellGet repositories.
Download the Azure PowerShell MSI to a machine connected to the network, and then copy the installer to
systems without access to PowerShell Gallery. Keep in mind that the MSI installer only works for
PowerShell 5.1 on Windows.
Save the module with Save-Module to a file share, or save it to another source and manually copy it to
other machines:

Save-Module -Name Az -Path '\\someshare\PowerShell\modules' -Force

Troubleshooting
Here are some common problems seen when installing the Azure PowerShell module. If you experience a
problem not listed here, please file an issue on GitHub.
Proxy blocks connection
If you get errors from Install-Module that indicate the PowerShell Gallery is unreachable, you may be behind a
proxy. Different operating systems will have different requirements for configuring a system-wide proxy, which
are not covered in detail here. Contact your system administrator for your proxy settings and how to configure
them for your OS.
PowerShell itself may not be configured to use this proxy automatically. With PowerShell 5.1 and later, configure
the proxy to use for a PowerShell session with the following command:

(New-Object [Link]).[Link] = `
[[Link]]::DefaultNetworkCredentials

If your operating system credentials are configured correctly, this will route PowerShell requests through the
proxy. In order to have this setting persist between sessions, add the command to a PowerShell profile.
In order to install the package, your proxy needs to allow HTTPS connections to the following address:
[Link]
Sign in
To start working with Azure PowerShell, sign in with your Azure credentials.

# Connect to Azure with a browser sign in token


Connect-AzAccount

NOTE
If you've disabled module autoloading, manually import the module with Import-Module Az . Because of the way the
module is structured, this can take a few seconds.

You'll need to repeat these steps for every new PowerShell session you start. To learn how to persist your Azure
sign-in across PowerShell sessions, see Persist user credentials across PowerShell sessions.

Update the Azure PowerShell module


If you originally used Install-Module, then you should use Update-Module to get the latest version. If you
originally used the MSI package then you should download and install the new MSI in order to udpate. If you
have any issues with updating using the package from PowershellGet then you will need to reinstall, rather than
just update. This is done in the same way as installing, but you may need to add the -Force argument:

Install-Module -Name Az -AllowClobber -Force

Although this can overwrite installed modules, you may still have older versions left on your system. To learn how
to remove old versions of Azure PowerShell from your system, see Uninstall the Azure PowerShell module.

Use multiple versions of Azure PowerShell


It's possible to install more than one version of Azure PowerShell. To check if you have multiple versions of Azure
PowerShell installed, use the following command:

Get-InstalledModule -Name Az -AllVersions | select Name,Version

To remove a version of Azure PowerShell, see Uninstall the Azure PowerShell module.
You can install or load a specific version of the Az module by using the -RequiredVersion argument:

# Install Az version 0.7.0


Install-Module -Name Az -RequiredVersion 0.7.0
# Load Az version 0.7.0
Import-Module -Name Az -RequiredVersion 0.7.0

If you have more than one version of the module installed, module autoload and Import-Module load the latest
version by default.

Provide feedback
If you find a bug in Azure Powershell, file an issue on GitHub. To provide feedback from the command line, use
the Send-Feedback cmdlet.
Next Steps
To learn more about the Azure PowerShell modules and their features, see Get Started with Azure PowerShell. If
you're familiar with Azure PowerShell and need to migrate from AzureRM, see Migrate from AzureRM to Az.
Install Azure PowerShell on Windows with MSI
2/4/2020 • 2 minutes to read • Edit Online

This article explains how to install Azure PowerShell on Windows using an MSI installer. The MSI installer is
provided for environments where the PowerShell Gallery may be blocked by a firewall, or an offline installer is
needed. The recommended way to install Azure PowerShell is with PowerShellGet. For instructions on using
PowerShellGet to install Azure PowerShell, see Install Azure PowerShell with PowerShellGet.

Requirements
The MSI installer for Azure PowerShell works only for PowerShell 5.1 on Windows. For installation on non-
Windows platforms or later versions of powershell, Install with PowerShellGet. To check your PowerShell version,
run the command:

$[Link]

To use Azure PowerShell in PowerShell 5.1, you need to:


1. Update to Windows PowerShell 5.1 if needed. If you're on Windows 10, you already have PowerShell 5.1
installed.
2. Install .NET Framework 4.7.2 or later.

Install or update on Windows using the MSI Package


Azure PowerShell for Windows is installed using the MSI file available from GitHub. If you have installed earlier
versions of Azure modules as an MSI, the installer automatically removes them. The MSI package installs modules
in ${env:ProgramFiles}\WindowsPowerShell\Modules .
To start working with Azure PowerShell, sign in with your Azure credentials.

# Connect to Azure with an interactive dialog for sign-in


Connect-AzAccount

NOTE
If you've disabled module autoloading, you need to manually import the module with Import-Module Az . Because of the
way the module is structured, this can take up to a minute.

You'll need to repeat this step for every new PowerShell session you start. To learn how to persist your Azure sign-
in across PowerShell sessions, see Persist user credentials across PowerShell sessions.

Provide feedback
If you find a bug in Azure Powershell, file an issue on GitHub. To provide feedback from the command line, use the
Send-Feedback cmdlet.

Next Steps
To learn more about the Azure PowerShell modules and their features, see Get Started with Azure PowerShell. If
you're familiar with Azure PowerShell and need to migrate from AzureRM, see Migrate from AzureRM to Az.
Uninstall the Azure PowerShell module
2/4/2020 • 4 minutes to read • Edit Online

This article tells you how to uninstall an older version of Azure PowerShell, or completely remove it from your
system. If you've decided to completely uninstall the Azure PowerShell, give us some feedback through the Send-
Feedback cmdlet. If you encountered a bug, we'd appreciate it if you file a GitHub issue so that it can be fixed.

Uninstall Azure PowerShell from MSI


If you installed Azure PowerShell using the MSI package, you must uninstall through the Windows system rather
than PowerShell.

PLATFORM INSTRUCTIONS

Windows 10 Start > Settings > Apps

Windows 7 Start > Control Panel > Programs > Uninstall a program
Windows 8

Once on this screen you should see Azure PowerShell in the program listing. This is the app to uninstall. If you
don't see this program listed, then you installed through PowerShellGet, and should follow the next set of
instructions.

Uninstall Azure PowerShell from PowerShell Get


To uninstall the Az modules, use the Uninstall-Module cmdlet. However, Uninstall-Module only uninstalls one
module. To remove Azure PowerShell completely, you must uninstall each module individually. Uninstallation can
be complicated if you have more than one version of Azure PowerShell installed.
To check which versions of Azure PowerShell you currently have installed, run the following command:

Get-InstalledModule -Name Az -AllVersions

Version Name Repository Description


------- ---- ---------- -----------
0.7.0 Az PSGallery Azure Resource Manager Module
1.0.0 Az PSGallery Azure Resource Manager Module

The following script queries the PowerShell Gallery to get a list of dependent submodules. Then, the script
uninstalls the correct version of each submodule. You will need to have administrator access to run this script in a
scope other than Process or CurrentUser .
function Uninstall-AllModules {
param(
[Parameter(Mandatory=$true)]
[string]$TargetModule,

[Parameter(Mandatory=$true)]
[string]$Version,

[switch]$Force,

[switch]$WhatIf
)

$AllModules = @()

'Creating list of dependencies...'


$target = Find-Module $TargetModule -RequiredVersion $version
$[Link] | ForEach-Object {
if ($_.[Link] -contains 'requiredVersion') {
$AllModules += New-Object -TypeName psobject -Property @{name=$_.name; version=$_.requiredVersion}
}
else { # Assume minimum version
# Minimum version actually reports the installed dependency
# which is used, not the actual "minimum dependency." Check to
# see if the requested version was installed as a dependency earlier.
$candidate = Get-InstalledModule $_.name -RequiredVersion $version -ErrorAction Ignore
if ($candidate) {
$AllModules += New-Object -TypeName psobject -Property @{name=$_.name; version=$version}
}
else {
$availableModules = Get-InstalledModule $_.name -AllVersions
Write-Warning ("Could not find uninstall candidate for {0}:{1} - module may require manual uninstall.
Available versions are: {2}" -f $_.name,$version,($[Link] -join ', '))
}
}
}
$AllModules += New-Object -TypeName psobject -Property @{name=$TargetModule; version=$Version}

foreach ($module in $AllModules) {


Write-Host ('Uninstalling {0} version {1}...' -f $[Link],$[Link])
try {
Uninstall-Module -Name $[Link] -RequiredVersion $[Link] -Force:$Force -ErrorAction Stop -
WhatIf:$WhatIf
} catch {
Write-Host ("`t" + $_.[Link])
}
}
}

To use this function, copy and paste the code into your PowerShell session. The following example shows how to
run the function to remove an older version of Azure PowerShell.

Uninstall-AllModules -TargetModule Az -Version 0.7.0 -Force

As the script runs, it will display the name and version of each submodule that is being uninstalled. To run the
script to only see what would be deleted, without removing it, use the -WhatIf option.

Creating list of dependencies...


Uninstalling [Link] version 0.7.0
Uninstalling [Link] version 0.7.0
Uninstalling [Link] version 0.7.0
...
NOTE
If this script can't match an exact dependency with the same version to uninstall, it won't uninstall any version of that
dependecy. This is because there may be other versions of the target module on your system which rely on these
dependencies. In this case, the available versions of the dependency are listed. You can then remove any old versions
manually with Uninstall-Module .

Run this command for every version of Azure PowerShell that you want to uninstall. For convenience, the
following script will uninstall all versions of Az except for the latest.

$versions = (Get-InstalledModule Az -AllVersions | Select-Object Version)


$versions[0..($[Link]-2)] | foreach { Uninstall-AllModules -TargetModule Az -Version ($_.Version) -
Force }

Uninstall the AzureRM module


If you have the Az module installed on your system and would like to uninstall AzureRM, there are two options
that don't require running the Uninstall-AllModules script above. Which method you follow depends on how you
installed the AzureRM module. If you're not sure of your original install method, follow the steps for uninstalling
an MSI first.
Uninstall Azure PowerShell MSI
If you installed the Azure PowerShell AzureRM modules using the MSI package, you must uninstall through the
Windows system rather than PowerShell.

PLATFORM INSTRUCTIONS

Windows 10 Start > Settings > Apps

Windows 7 Start > Control Panel > Programs > Uninstall a program
Windows 8

Once on this screen you should see Azure PowerShell or Microsoft Azure PowerShell - Month Year in the
program listing. This is the app to uninstall. If you don't see this program listed, then you installed through
PowerShellGet, and should follow the next set of instructions.
Uninstall from PowerShell
If you installed AzureRM with PowerShellGet, then you can remove the modules with the Uninstall-AzureRM
command, available as part of the [Link] module. This removes all AzureRM modules from your machine,
but requires administrator privileges.

Uninstall-AzureRm

or

Uninstall-Module AzureRm

If you can't successfully run the Uninstall-AzureRM command, use the Uninstall-AllModules script provided in this
article with the following invocation:
$versions = (Get-InstalledModule AzureRM -AllVersions | Select-Object Version)
$versions | foreach { Uninstall-AllModules -TargetModule AzureRM -Version ($_.Version) -Force }

or

foreach ($module in (Get-Module -ListAvailable AzureRM*).Name |Get-Unique) {


write-host "Removing Module $module"
Uninstall-module $module
}
Migrate Azure PowerShell from AzureRM to Az
2/4/2020 • 4 minutes to read • Edit Online

The Az module has feature parity with AzureRM, but uses shorter and more consistent cmdlet names. Scripts
written for the AzureRM cmdlets won't automatically work with the new module. To make the transition easier, Az
offers tools to allow you to run your existing scripts using AzureRM. No migration to a new command set is ever
convenient, but this article will help you get started on transitioning to the new module.
To see the full list of breaking changes between AzureRM and Az, see the full changes from AzureRM to Az.

Ensure existing scripts work with the latest AzureRM release


Before taking any migration steps, check which versions of AzureRM are installed on your system. Doing so
allows you to make sure scripts are already running on the latest release, and let you know which versions of
AzureRM must be uninstalled.
To check which version(s) of AzureRM you have installed, run the command:

Get-InstalledModule -Name AzureRM -AllVersions

The latest available release of AzureRM is 6.13.1. If you don't have this version installed, your existing scripts
may need additional modification to work with the Az module beyond what's described here and in the breaking
changes list.
If your scripts don't work with AzureRM 6.13.1, update them according to the AzureRM 5.x to 6.x migration guide.
If you use an earlier version of the AzureRM module, there are migration guides available for each major version.

Uninstall AzureRM
The Az module is not guaranteed to be compatible with any existing AzureRM installs in PowerShell 5.1 for
Windows. Before you install the Az module, uninstall AzureRM.

IMPORTANT
If you're not ready to remove the AzureRM module from your system, you can install the Az module for PowerShell Core 6.x
or later instead. PowerShell Core and PowerShell 5.1 for Windows use different module libraries, so there will be no conflicts.
You can still enable aliases in PowerShell Core.

Install the Azure PowerShell Az module


The first step is to install the Az module on your platform. When you install Az, it's recommended that you
uninstall AzureRM. In the following steps, you'll learn how to keep running your existing scripts and enable
compatibility for old cmdlet names.
To install the Azure PowerShell Az module, follow the instructions in Install the Az module.

NOTE
At this point, you might want to run the Uninstall-AzureRM cmdlet provided in the Az module, just to make sure that all
versions of AzureRM have been uninstalled and won't cause conflicts.
Enable AzureRM compatibility aliases
With AzureRM uninstalled and your scripts working with the latest AzureRM version, the next step is to enable
the compatibility mode for the Az module. Compatibility is enabled with the command:

Enable-AzureRmAlias -Scope CurrentUser

Aliases enable the ability to use old cmdlet names with the Az module installed. These aliases are written to the
profile for the selected scope. If no profile exists, one is created. When using a -Scope broader than CurrentUser ,
the appropriate permissions are required to create or update the corresponding profile file.

IMPORTANT
Only cmdlet names are aliased - module names aren't! If you're using #Requires , Import-Module , dependency lists in a
.psd1 , or fully-qualified cmdlet names, make sure that you migrate them at this point by following the process outlined in
the breaking changes list regarding module names.

WARNING
You can use a different -Scope for this command, but it's not recommended. Aliases are written to the user profile for the
selected scope, so keep enabling them to as limited a scope as possible. Enabling aliases system-wide can cause issues for
other users who have AzureRM installed in their local scope.

Once the alias mode is enabled, run your scripts again to confirm that they still function as expected. Some
parameter names have been changed, added, or made required by the Az module. Output types of cmdlets may
have changed as well. These changes are detailed in the breaking changes list.

Update cmdlets, modules, and parameters


With scripts updated and running under aliases, you can take your time to update them to use the new cmdlets
and take advantage of other changes like new features. For most scripts, you will only need to update cmdlet
names, following the new cmdlet naming scheme in Az. There may also be some other changes that you need to
make in order to have your scripts work, depending on what they do and which Azure PowerShell features they
take advantage of.
For example, the Blob Storage cmdlets have been completely reworked to use a new asynchronous model, so
scripts using them will take more work to update than those where the only relevant changes were cmdlet names.
Even if you've only had to make small, simple changes to your scripts up to this point - or they even work without
additional modification when aliases are enabled - read the full list of breaking changes in Az 1.0.0 to make sure
that you're not relying on 'transparent' behavior of aliases which could disappear after you change cmdlet names
and disable aliases.

Disable aliases
Once you've completed your migration and are no longer relying on aliasing behavior, it's recommended that you
disable aliases. This is done with the Disable-AzureRmAlias cmdlet.

IMPORTANT
When running this cmdlet, make sure that you invoke it for each -Scope that Enable-AzureRmAlias was invoked for,
otherwise there may still be scripts on your system relying on the aliasing behavior.
Breaking changes for Az 1.0.0
2/4/2020 • 8 minutes to read • Edit Online

This document provides detailed information on the changes between AzureRM 6.x and the new Az module,
version 1.x and later. The table of contents will help guide you through a full migration path, including module-
specific changes that may affect your scripts.
For general advice on getting started with a migration from AzureRM to Az, see Start migration from AzureRM
to Az.

IMPORTANT
There have been breaking changes between Az 1.0.0 and Az 2.0.0 as well. After following this guide for updating from
AzureRM to Az, see the Az 2.0.0 breaking changes to find out if you need to make additional changes.

Table of Contents
General breaking changes
Cmdlet noun prefix changes
Module name changes
Removed modules
Windows PowerShell 5.1 and .NET 4.7.2
Temporary removal of user login using PSCredential
Default device code login instead of web browser prompt
Module breaking changes
[Link] (previously [Link])
[Link] (previously [Link], [Link], and [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link] and AzureRM.DataFactoryV2)
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link], [Link], and
[Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link])
[Link] (previously [Link] and [Link])
[Link] (previously [Link])
General breaking changes
This section details the general breaking changes that are part of the redesign of the Az module.
Cmdlet Noun Prefix Changes
In the AzureRM module, cmdlets used either AzureRM or Azure as a noun prefix. Az simplifies and normalizes
cmdlet names, so that all cmdlets use 'Az' as their cmdlet noun prefix. For example:

Get-AzureRMVM
Get-AzureKeyVaultSecret

Has changed to:

Get-AzVM
Get-AzKeyVaultSecret

To make the transition to these new cmdlet names simpler, Az introduces two new cmdlets, Enable-AzureRmAlias
and Disable-AzureRmAlias. Enable-AzureRmAlias creates aliases for the older cmdlet names in AzureRM that
map to the newer Az cmdlet names. Using the -Scope argument with Enable-AzureRmAlias allows you to choose
where aliases are enabled.
For example, the following script in AzureRM:

#Requires -Modules [Link]


Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob

Can be run with minimal changes using Enable-AzureRmAlias :

#Requires -Modules [Link]


Enable-AzureRmAlias -Scope Process
Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob

Running Enable-AzureRmAlias -Scope CurrentUser will enable the aliases for all PowerShell sessions you open, so
that after executing this cmdlet, a script like this would not need to be changed at all:

Get-AzureRmStorageAccount | Get-AzureStorageContainer | Get-AzureStorageBlob

For complete details on the usage of the alias cmdlets, see the Enable-AzureRmAlias reference.
When you're ready to disable aliases, Disable-AzureRmAlias removes the created aliases. For complete details, see
the Disable-AzureRmAlias reference.

IMPORTANT
When disabling aliases, make sure that they are disabled for all scopes which had aliases enabled.

Module Name Changes


The module names have changed from AzureRM.* to Az.* , except for the following modules:

AZURERM MODULE AZ MODULE


AZURERM MODULE AZ MODULE

[Link] [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

AzureRM.DataFactoryV2 [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

[Link] [Link]

The changes in module names mean that any script that uses #Requires or Import-Module to load specific
modules will need to be changed to use the new module instead. For modules where the cmdlet suffix has not
changed, this means that although the module name has changed, the suffix indicating the operation space has
not.
Migrating #Requires and Import-Module Statements
Scripts that use #Requires or Import-Module to declare a dependency on AzureRM modules must be updated to
use the new module names. For example:

#Requires -Module [Link]

Should be changed to:

#Requires -Module [Link]

For Import-Module :

Import-Module -Name [Link]

Should be changed to:

Import-Module -Name [Link]

Migrating Fully-Qualified Cmdlet Invocations


Scripts that use module-qualified cmdlet invocations, such as:
[Link]\Get-AzureRmVM

Must be changed to use the new module and cmdlet names:

[Link]\Get-AzVM

Migrating module manifest dependencies


Modules that express dependencies on AzureRM modules through a module manifest (.psd1) file will need to
updated the module names in their RequiredModules section:

RequiredModules = @(@{ModuleName="[Link]"; ModuleVersion="5.8.2"})

Must be changed to:

RequiredModules = @(@{ModuleName="[Link]"; ModuleVersion="1.0.0"})

Removed modules
The following modules have been removed:
[Link]
[Link]
[Link]

The tools for these services are no longer actively supported. Customers are encouraged to move to alternative
services as soon as it is convenient.
Windows PowerShell 5.1 and .NET 4.7.2
Using Az with PowerShell 5.1 for Windows requires the installation of .NET Framework 4.7.2. Using PowerShell
Core 6.x or later does not require .NET Framework.
Temporary removal of User login using PSCredential
Due to changes in the authentication flow for .NET Standard, we are temporarily removing user login via
PSCredential. This capability will be re-introduced in the 1/15/2019 release for PowerShell 5.1 for Windows. This
is discussed in detail in this GitHub issue.
Default device code login instead of web browser prompt
Due to changes in the authentication flow for .NET Standard, we are using device login as the default login flow
during interactive login. Web browser based login will be re-introduced for PowerShell 5.1 for Windows as the
default in the 1/15/2019 release. At that time, users will be able to choose device login using a Switch parameter.

Module breaking changes


This section details specific breaking changes for individual modules and cmdlets.
[Link] (previously [Link])
Removed the following cmdlets:
New -AzureRmApiManagementHostnameConfiguration
Set-AzureRmApiManagementHostnames
Update-AzureRmApiManagementDeployment
Import-AzureRmApiManagementHostnameCertificate
Use Set-AzApiManagement cmdlet to set these properties instead
Removed the following properties:
Removed property PortalHostnameConfiguration , ProxyHostnameConfiguration ,
ManagementHostnameConfiguration and ScmHostnameConfiguration of type
PsApiManagementHostnameConfiguration from PsApiManagementContext . Instead use
PortalCustomHostnameConfiguration , ProxyCustomHostnameConfiguration ,
ManagementCustomHostnameConfiguration and ScmCustomHostnameConfiguration of type
PsApiManagementCustomHostNameConfiguration .
Removed property StaticIPs from PsApiManagementContext. The property has been split into
PublicIPAddresses and PrivateIPAddresses .
Removed required property Location from New -AzureApiManagementVirtualNetwork cmdlet.
[Link] (previously [Link], [Link], and [Link])
The InvoiceName parameter was removed from the Get-AzConsumptionUsageDetail cmdlet. Scripts will need to
use other identity parameters for the invoice.
[Link] (previously [Link])
Removed GetSkusWithAccountParamSetName parameter set from Get-AzCognitiveServicesAccountSkus cmdlet.
You must get Skus by Account Type and Location, instead of using ResourceGroupName and Account Name.
[Link] (previously [Link] )
IdentityIds are removed from Identity property in PSVirtualMachine and PSVirtualMachineScaleSet
objects Scripts should no longer use the value of this field to make processing decisions.
The type of InstanceView property of PSVirtualMachineScaleSetVM object is changed from
VirtualMachineInstanceView to VirtualMachineScaleSetVMInstanceView
AutoOSUpgradePolicy and AutomaticOSUpgrade properties are removed from UpgradePolicy property
The type of Sku property in PSSnapshotUpdate object is changed from DiskSku to SnapshotSku
VmScaleSetVMParameterSet is removed from Add-AzVMDataDisk cmdlet, you can no longer add a data disk
individually to a ScaleSet VM.
[Link] (previously [Link] and AzureRM.DataFactoryV2)
The GatewayName parameter has become mandatory in the New-AzDataFactoryEncryptValue cmdlet
Removed New-AzDataFactoryGatewayKey cmdlet
Removed LinkedServiceName parameter from Get-AzDataFactoryV2ActivityRun cmdlet Scripts should no
longer use the value of this field to make processing decisions.
[Link] (previously [Link])
Removed deprecated cmdlets: New-AzDataLakeAnalyticsCatalogSecret ,
Remove-AzDataLakeAnalyticsCatalogSecret , and Set-AzDataLakeAnalyticsCatalogSecret

[Link] (previously [Link] )


The following cmdlets have had the Encoding parameter changed from the type
FileSystemCmdletProviderEncoding to [Link] . This change removes the encoding values
String and Oem . All the other prior encoding values remain.

New -AzureRmDataLakeStoreItem
Add-AzureRmDataLakeStoreItemContent
Get-AzureRmDataLakeStoreItemContent
Removed deprecated Tags property alias from New-AzDataLakeStoreAccount and
Set-AzDataLakeStoreAccount cmdlets

Scripts using
New-AzureRMDataLakeStoreAccount -Tags @{TagName="TagValue"}

Should be changed to

New-AzDataLakeStoreAccount -Tag @{TagName="TagValue"}

Removed deprecated properties Identity , EncryptionState , EncryptionProvisioningState ,


EncryptionConfig , FirewallState , FirewallRules , VirtualNetworkRules , TrustedIdProviderState ,
TrustedIdProviders , DefaultGroup , NewTier , CurrentTier , FirewallAllowAzureIps from
PSDataLakeStoreAccountBasic object. Any script that uses the PSDatalakeStoreAccount returned from
Get-AzDataLakeStoreAccount should not reference these properties.

[Link] (previously [Link])


The PurgeDisabled property was removed from the PSKeyVaultKeyAttributes , PSKeyVaultKeyIdentityItem ,
and PSKeyVaultSecretAttributes objects Scripts should no longer reference the PurgeDisabled property to
make processing decisions.
[Link] (previously [Link])
Remove deprecated Tags property alias from New-AzMediaService cmdlet Scripts using

New-AzureRMMediaService -Tags @{TagName="TagValue"}

Should be changed to

New-AzMediaService -Tag @{TagName="TagValue"}

[Link] (previously [Link])


Removed plural names Categories and Timegrains parameter in favor of singular parameter names from
Set-AzDiagnosticSetting cmdlet Scripts using

Set-AzureRmDiagnosticSetting -Timegrains PT1M -Categories Category1, Category2

Should be changed to

Set-AzDiagnosticSetting -Timegrain PT1M -Category Category1, Category2

[Link] (previously [Link])


Removed deprecated ResourceId parameter from Get-AzServiceEndpointPolicyDefinition cmdlet
Removed deprecated EnableVmProtection property from PSVirtualNetwork object
Removed deprecated Set-AzVirtualNetworkGatewayVpnClientConfig cmdlet

Scripts should no longer make processing decisions based on the values fo these fields.
[Link] (previously [Link])
Default parameter set for Get-AzOperationalInsightsDataSource is removed, and ByWorkspaceNameByKind
has become the default parameter set
Scripts that listed data sources using
Get-AzureRmOperationalInsightsDataSource

Should be changed to specify a Kind

Get-AzOperationalInsightsDataSource -Kind AzureActivityLog

[Link] (previously [Link], [Link], and


[Link])
Removed Encryption parameter from New/Set-AzRecoveryServicesAsrPolicy cmdlet
TargetStorageAccountName parameter is now mandatory for managed disk restores in
Restore-AzRecoveryServicesBackupItem cmdlet
Removed StorageAccountName and StorageAccountResourceGroupName parameters in
Restore-AzRecoveryServicesBackupItem cmdlet
Removed Name parameter in Get-AzRecoveryServicesBackupContainer cmdlet
[Link] (previously [Link])
Removed Sku parameter from New/Set-AzPolicyAssignment cmdlet
Removed Password parameter from New-AzADServicePrincipal and New-AzADSpCredential cmdlet
Passwords are automatically generated, scripts that provided the password:

New-AzAdSpCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 -Password $secPassword

Should be changed to retrieve the password from the output:

$credential = New-AzAdSpCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476


$secPassword = $[Link]

[Link] (previously [Link])


The following cmdlet return types have been changed:
The property ServiceTypeHealthPolicies of type ApplicationHealthPolicy has been removed.
The property ApplicationHealthPolicies of type ClusterUpgradeDeltaHealthPolicy has been removed.
The property OverrideUserUpgradePolicy of type ClusterUpgradePolicy has been removed.
These changes affect the following cmdlets:
Add-AzServiceFabricClientCertificate
Add-AzServiceFabricClusterCertificate
Add-AzServiceFabricNode
Add-AzServiceFabricNodeType
Get-AzServiceFabricCluster
Remove-AzServiceFabricClientCertificate
Remove-AzServiceFabricClusterCertificate
Remove-AzServiceFabricNode
Remove-AzServiceFabricNodeType
Remove-AzServiceFabricSetting
Set-AzServiceFabricSetting
Set-AzServiceFabricUpgradeType
Update-AzServiceFabricDurability
Update-AzServiceFabricReliability
[Link] (previously [Link])
Removed State and ResourceId parameters from Set-AzSqlDatabaseBackupLongTermRetentionPolicy cmdlet
Removed deprecated cmdlets: Get/Set-AzSqlServerBackupLongTermRetentionVault ,
Get/Start/Stop-AzSqlServerUpgrade , Get/Set-AzSqlDatabaseAuditingPolicy , Get/Set-AzSqlServerAuditingPolicy ,
Remove-AzSqlDatabaseAuditing , Remove-AzSqlServerAuditing
Removed deprecated parameter Current from Get-AzSqlDatabaseBackupLongTermRetentionPolicy cmdlet
Removed deprecated parameter DatabaseName from Get-AzSqlServerServiceObjective cmdlet
Removed deprecated parameter PrivilegedLogin from Set-AzSqlDatabaseDataMaskingPolicy cmdlet
[Link] (previously [Link] and [Link] )
To support creating an Oauth storage context with only the storage account name, the default parameter set
has been changed to OAuthParameterSet
Example: $ctx = New-AzureStorageContext -StorageAccountName $accountName
The Location parameter has become mandatory in the Get-AzStorageUsage cmdlet
The Storage API methods now use the Task-based Asynchronous Pattern (TAP ), instead of synchronous API
calls. The following examples demonstrate the new asynchronous commands:
Blob Snapshot
AzureRM:

$b = Get-AzureStorageBlob -Container $containerName -Blob $blobName -Context $ctx


$[Link]()

Az:

$b = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx


$task = $[Link]()
$[Link]()
$snapshot = $[Link]

Share Snapshot
AzureRM:

$Share = Get-AzureStorageShare -Name $containerName -Context $ctx


$snapshot = $[Link]()

Az:

$Share = Get-AzStorageShare -Name $containerName -Context $ctx


$task = $[Link]()
$[Link]()
$snapshot = $[Link]

Undelete soft-deleted blob


AzureRM:

$b = Get-AzureStorageBlob -Container $containerName -Blob $blobName -IncludeDeleted -Context $ctx


$[Link]()

Az:
$b = Get-AzStorageBlob -Container $containerName -Blob $blobName -IncludeDeleted -Context $ctx
$task = $[Link]()
$[Link]()

Set Blob Tier


AzureRM:

$blockBlob = Get-AzureStorageBlob -Container $containerName -Blob $blockBlobName -Context $ctx


$[Link]("hot")

$pageBlob = Get-AzureStorageBlob -Container $containerName -Blob $pageBlobName -Context $ctx


$[Link]("P4")

Az:

$blockBlob = Get-AzStorageBlob -Container $containerName -Blob $blockBlobName -Context $ctx


$task = $[Link]("hot")
$[Link]()

$pageBlob = Get-AzStorageBlob -Container $containerName -Blob $pageBlobName -Context $ctx


$task = $[Link]("P4")
$[Link]()

[Link] (previously [Link])


Removed deprecated properties from the PSAppServicePlan , PSCertificate , PSCloningInfo , and PSSite
objects
Get started with Azure PowerShell
2/4/2020 • 3 minutes to read • Edit Online

Azure PowerShell is designed for managing and administering Azure resources from the command line. Use
Azure PowerShell when you want to build automated tools that use the Azure Resource Manager model. Try it out
in your browser with Azure Cloud Shell, or install on your local machine.
This article helps you get started with Azure PowerShell and teaches the core concepts behind it.

Install or run in Azure Cloud Shell


The easiest way to get started with Azure PowerShell is by trying it out in an Azure Cloud Shell environment. To
get up and running with Cloud Shell, see Quickstart for PowerShell in Azure Cloud Shell. Cloud Shell runs
PowerShell 6 on a Linux container, so Windows-specific functionality isn't available.
When you're ready to install Azure PowerShell on your local machine, follow the instructions in Install the Azure
PowerShell module.

Sign in to Azure
Sign in interactively with the Connect-AzAccount cmdlet. Skip this step if you use Cloud Shell: Your Azure Cloud
Shell session is already authenticated for the environment, subscription, and tenant that launched the Cloud Shell
session.

Connect-AzAccount

If you're in a non-US region, use the -Environment parameter to sign in. Get the name of the environment for your
region by using the Get-AzEnvironment cmdlet. For example, to sign in to Azure China 21Vianet:

Connect-AzAccount -Environment AzureChinaCloud

In PowerShell 5.1 environments, you'll get a sign-in dialog to provide a username and password for your Azure
account. On every other version of PowerShell, you'll get a token to use on [[Link]
Open this page in your browser and enter the token, then sign in with your Azure account credentials and
authorize Azure PowerShell.
After signing in, you'll see information indicating which of your Azure subscriptions is active. If you have multiple
Azure subscriptions in your account and want to select a different one, get your available subscriptions with Get-
AzSubscription and use the Set-AzContext cmdlet with your subscription ID. For more information about
managing your Azure subscriptions in Azure PowerShell, see Use multiple Azure subscriptions.
Once signed in, use the Azure PowerShell cmdlets to access and manage resources in your subscription. To learn
more about the sign-in process and authentication methods, see Sign in with Azure PowerShell.

Find commands
Azure PowerShell cmdlets follow a standard naming convention for PowerShell, VERB-NOUN . The verb describes
the action (examples include New , Get , Set , Remove ) and the noun describes the resource type (examples
include AzVM , AzKeyVaultCertificate , AzFirewall , AzVirtualNetworkGateway ). Nouns in Azure PowerShell always
start with the prefix Az . For the full list of standard verbs, see Approved verbs for PowerShell Commands.
Knowing the nouns, verbs, and the Azure PowerShell modules available help you find commands with the Get-
Command cmdlet. For example, to find all VM -related commands that use the Get verb:

Get-Command -Verb Get -Noun AzVM* -Module [Link]

To help you find common commands, this table lists the resource type, corresponding Azure PowerShell module,
and noun prefix to use with Get-Command :

RESOURCE TYPE AZURE POWERSHELL MODULE NOUN PREFIX

Resource group [Link] AzResourceGroup

Virtual machines [Link] AzVM

Storage accounts [Link] AzStorageAccount

Key Vault [Link] AzKeyVault

Web applications [Link] AzWebApp

SQL databases [Link] AzSqlDatabase

For a full list of the modules in Azure PowerShell, see the Azure PowerShell modules list hosted on GitHub.

Learn Azure PowerShell basics with quickstarts and tutorials


To get started with Azure PowerShell, try an in-depth tutorial for setting up virtual machines and learning how to
query them.
Create virtual machines with Azure PowerShell
There are also Azure PowerShell quickstarts for other popular Azure services:
Create a storage account
Transfer objects to/from Azure Blob storage
Create and retrieve secrets from Azure Key Vault
Create an Azure SQL database and firewall
Run a container in Azure Container Instances
Create a Virtual Machine Scale Set (VMSS )
Create a standard load balancer

Next steps
Sign in with Azure PowerShell
Manage Azure subscriptions with Azure PowerShell
Create service principals with Azure PowerShell
Get help from the community:
Azure forum on MSDN
Stack Overflow
Sign in with Azure PowerShell
2/4/2020 • 4 minutes to read • Edit Online

Azure PowerShell supports several authentication methods. The easiest way to get started is with Azure Cloud
Shell, which automatically logs you in. With a local install, you can sign in interactively through your browser.
When writing scripts for automation, the recommended approach is to use a service principal with the necessary
permissions. When you restrict sign-in permissions as much as possible for your use case, you help keep your
Azure resources secure.
After signing in, commands are run against your default subscription. To change your active subscription for a
session, use the Set-AzContext cmdlet. To change the default subscription used when logging in with Azure
PowerShell, use Set-AzDefault.

IMPORTANT
Your credentials are shared among multiple PowerShell sessions as long as you remain signed in. For more information, see
the article on Persistent Credentials.

Sign in interactively
To sign in interactively, use the Connect-AzAccount cmdlet.

Connect-AzAccount

When run, this cmdlet will present a token string. To sign in, copy this string and paste it into
[Link] in a browser. Your PowerShell session will be authenticated to connect to Azure.

IMPORTANT
Username/password credential authorization has been removed in Azure PowerShell due to changes in Active Directory
authorization implementations and security concerns. If you use credential authorization for automation purposes, instead
create a service principal.

Sign in with a service principal


Service principals are non-interactive Azure accounts. Like other user accounts, their permissions are managed
with Azure Active Directory. By granting a service principal only the permissions it needs, your automation scripts
stay secure.
To learn how to create a service principal for use with Azure PowerShell, see Create an Azure service principal with
Azure PowerShell.
To sign in with a service principal, use the -ServicePrincipal argument with the Connect-AzAccount cmdlet. You'll
also need the service principal's application ID, sign-in credentials, and the tenant ID associate with the service
principal. How you sign in with a service principal will depend on whether it's configured for password-based or
certificate-based authentication.
Password-based authentication
To get the service principal's credentials as the appropriate object, use the Get-Credential cmdlet. This cmdlet will
present a prompt for a username and password. Use the service principal ID for the username.

$pscredential = Get-Credential
Connect-AzAccount -ServicePrincipal -Credential $pscredential -Tenant $tenantId

For automation scenarios, you need to create credentials from a user name and secure string:

$passwd = ConvertTo-SecureString <use a secure password here> -AsPlainText -Force


$pscredential = New-Object [Link]('service principal name/id', $passwd)
Connect-AzAccount -ServicePrincipal -Credential $pscredential -Tenant $tenantId

Make sure that you use good password storage practices when automating service principal connections.
Certificate -based authentication
Certificate-based authentication requires that Azure PowerShell can retrieve information from a local certificate
store based on a certificate thumbprint.

Connect-AzAccount -ApplicationId $appId -Tenant $tenantId -CertificateThumbprint <thumbprint>

When using a service principal instead of a registered application, add the -ServicePrincipal argument and
provide the service principal's ID as the -ApplicationId parameter's value.

Connect-AzAccount -ServicePrincipal -ApplicationId $servicePrincipalId -Tenant $tenantId -


CertificateThumbprint <thumbprint>

In PowerShell 5.1, the certificate store can be managed and inspected with the PKI module. For PowerShell Core
6.x and later, the process is more complicated. The following scripts show you how to import an existing certificate
into the certificate store accessible by PowerShell.
Import a certificate in PowerShell 5.1

# Import a PFX
$credentials = Get-Credential -Message "Provide PFX private key password"
Import-PfxCertificate -FilePath <path to certificate> -Password $[Link] -CertStoreLocation
cert:\CurrentUser\My

Import a certificate in PowerShell Core 6.x and later

# Import a PFX
$storeName = [[Link]]::My
$storeLocation = [[Link]]::CurrentUser
$store = [[Link].X509Certificates.X509Store]::new($storeName, $storeLocation)
$certPath = <path to certificate>
$credentials = Get-Credential -Message "Provide PFX private key password"
$flag = [[Link].X509Certificates.X509KeyStorageFlags]::Exportable
$certificate = [[Link].X509Certificates.X509Certificate2]::new($certPath,
$[Link], $flag)
$[Link]([[Link]]::ReadWrite)
$[Link]($Certificate)
$[Link]()

Sign in using a managed identity


Managed identities are a feature of Azure Active Directory. Managed identities are service principals assigned to
resources that run in Azure. You can use a managed identity service principal for sign-in, and acquire an app-only
access token to access other resources. Managed identities are only available on resources running in an Azure
cloud.
This command connects using the managed identity of the host environment. For example, if executed on a
VirtualMachine with an assigned Managed Service Identity, this allows the code to sign in using that assigned
identity.

Connect-AzAccount -Identity

Sign in with a non-default tenant or as a Cloud Solution Provider (CSP)


If your account is associated with more than one tenant, sign-in requires the use of the -Tenant parameter when
connecting. This parameter will work with any sign-in method. When logging in, this parameter value can either be
the Azure object ID of the tenant (Tenant ID ) or the fully qualified domain name of the tenant.
If you're a Cloud Solution Provider (CSP ), the -Tenant value must be a tenant ID.

Connect-AzAccount -Tenant 'xxxx-xxxx-xxxx-xxxx'

Sign in to another Cloud


Azure cloud services offer environments compliant with regional data-handling laws. For accounts in a regional
cloud, set the environment when you sign in with the -Environment argument. This parameter will work with any
sign-in method. For example, if your account is in the China cloud:

Connect-AzAccount -Environment AzureChinaCloud

The following command gets a list of available environments:

Get-AzEnvironment | Select-Object Name


Create an Azure service principal with Azure
PowerShell
2/4/2020 • 5 minutes to read • Edit Online

Automated tools that use Azure services should always have restricted permissions. Instead of having applications
sign in as a fully privileged user, Azure offers service principals.
An Azure service principal is an identity created for use with applications, hosted services, and automated tools to
access Azure resources. This access is restricted by the roles assigned to the service principal, giving you control
over which resources can be accessed and at which level. For security reasons, it's always recommended to use
service principals with automated tools rather than allowing them to log in with a user identity.
This article shows you the steps for creating, getting information about, and resetting a service principal with
Azure PowerShell.

Create a service principal


Create a service principal with the New -AzADServicePrincipal cmdlet. When creating a service principal, you
choose the type of sign-in authentication it uses.

NOTE
If your account doesn't have permission to create a service principal, New-AzADServicePrincipal will return an error
message containing "Insufficient privileges to complete the operation." Contact your Azure Active Directory admin to create
a service principal.

There are two types of authentication available for service principals: Password-based authentication, and
certificate-based authentication.
Password-based authentication
Without any other authentication parameters, password-based authentication is used and a random password
created for you. If you want password-based authentication, this method is recommended.

$sp = New-AzADServicePrincipal -DisplayName ServicePrincipalName

The returned object contains the Secret member, which is a SecureString containing the generated password.
Make sure that you store this value somewhere secure to authenticate with the service principal. Its value won't
be displayed in the console output. If you lose the password, reset the service principal credentials.
The following code will allow you to export the secret:

$BSTR = [[Link]]::SecureStringToBSTR($[Link])
$UnsecureSecret = [[Link]]::PtrToStringAuto($BSTR)

For user-supplied passwords, the argument takes


-PasswordCredential
[Link] objects. These objects must have a valid
StartDate and EndDate , and take a plaintext Password . When creating a password, make sure you follow the
Azure Active Directory password rules and restrictions. Don't use a weak password or reuse a password.
Import-Module [Link] # Imports the PSADPasswordCredential object
$credentials = New-Object [Link] -Property @{
StartDate=Get-Date; EndDate=Get-Date -Year 2024; Password=<Choose a strong password>}
$sp = New-AzAdServicePrincipal -DisplayName ServicePrincipalName -PasswordCredential $credentials

The object returned from New-AzADServicePrincipal contains the Id and DisplayName members, either of which
can be used for sign in with the service principal.

IMPORTANT
Signing in with a service principal requires the tenant ID which the service principal was created under. To get the active
tenant when the service principal was created, run the following command immediately after service principal creation:

(Get-AzContext).[Link]

Certificate -based authentication


Service principals using certificate-based authentication are created with the -CertValue parameter. This
parameter takes a base64-encoded ASCII string of the public certificate. This is represented by a PEM file, or a
text-encoded CRT or CER. Binary encodings of the public certificate aren't supported. These instructions assume
that you already have a certificate available.

$cert = <public certificate as base64-encoded string>


$sp = New-AzADServicePrincipal -DisplayName ServicePrincipalName -CertValue $cert

You can also use the -KeyCredential parameter, which takes PSADKeyCredential objects. These objects must have
a valid StartDate , EndDate , and have the CertValue member set to a base64-encoded ASCII string of the public
certificate.

$cert = <public certificate as base64-encoded string>


$credentials = New-Object [Link] -Property @{
StartDate=Get-Date; EndDate=Get-Date -Year 2024; KeyId=New-Guid; CertValue=$cert}
$sp = New-AzADServicePrincipal -DisplayName ServicePrincipalName -KeyCredential $credentials

The object returned from New-AzADServicePrincipal contains the Id and DisplayName members, either of which
can be used for sign in with the service principal. Clients which sign in with the service principal also need access
to the certificate's private key.

IMPORTANT
Signing in with a service principal requires the tenant ID which the service principal was created under. To get the active
tenant when the service principal was created, run the following command immediately after service principal creation:

(Get-AzContext).[Link]

Get an existing service principal


A list of service principals for the currently active tenant can be retrieved with Get-AzADServicePrincipal. By
default this command returns all service principals in a tenant, so for large organizations, it may take a long time
to return results. Instead, using one of the optional server-side filtering arguments is recommended:
-DisplayNameBeginsWith requests service principals that have a prefix that match the provided value. The
display name of a service principal is the value set with -DisplayName during creation.
-DisplayName requests an exact match of a service principal name.

Manage service principal roles


Azure PowerShell has the following cmdlets to manage role assignments:
Get-AzRoleAssignment
New -AzRoleAssignment
Remove-AzRoleAssignment
The default role for a service principal is Contributor. This role has full permissions to read and write to an Azure
account. The Reader role is more restrictive, with read-only access. For more information on Role-Based Access
Control (RBAC ) and roles, see RBAC: Built-in roles.
This example adds the Reader role and removes the Contributor one:

New-AzRoleAssignment -ApplicationId <service principal application ID> -RoleDefinitionName "Reader"


Remove-AzRoleAssignment -ApplicationId <service principal application ID> -RoleDefinitionName "Contributor"

IMPORTANT
Role assignment cmdlets don't take the service principal object ID. They take the associated application ID, which is
generated at creation time. To get the application ID for a service principal, use Get-AzADServicePrincipal .

NOTE
If your account doesn't have permission to assign a role, you see an error message that your account "does not have
authorization to perform action '[Link]/roleAssignments/write'." Contact your Azure Active Directory
admin to manage roles.

Adding a role doesn't restrict previously assigned permissions. When restricting a service principal's permissions,
the Contributor role should be removed.
The changes can be verified by listing the assigned roles:

Get-AzRoleAssignment -ServicePrincipalName ServicePrincipalName

Sign in using a service principal


Test the new service principal's credentials and permissions by signing in. To sign in with a service principal, you
need the applicationId value associated with it, and the tenant it was created under.
To sign in with a service principal using a password:

# Use the application ID as the username, and the secret as password


$credentials = Get-Credential
Connect-AzAccount -ServicePrincipal -Credential $credentials -Tenant <tenant ID>

Certificate-based authentication requires that Azure PowerShell can retrieve information from a local certificate
store based on a certificate thumbprint.
Connect-AzAccount -ServicePrincipal -Tenant <tenant ID> -CertificateThumbprint <thumbprint>

For instructions on importing a certificate into a credential store accessible by PowerShell, see Sign in with Azure
PowerShell

Reset credentials
If you forget the credentials for a service principal, use New -AzADSpCredential to add a new credential. This
cmdlet takes the same credential arguments and types as New-AzADServicePrincipal . Without any credential
arguments, a new PasswordCredential with a random password is created.

IMPORTANT
Before assigning any new credentials, you may want to remove existing credentials to prevent sign in with them. To do so,
use the Remove-AzADSpCredential cmdlet:

Remove-AzADSpCredential -DisplayName ServicePrincipalName

$newCredential = New-AzADSpCredential -ServicePrincipalName ServicePrincipalName


Azure PowerShell context objects
2/4/2020 • 5 minutes to read • Edit Online

Azure PowerShell uses Azure PowerShell context objects (Azure contexts) to hold subscription and authentication
information. If you have more than one subscription, Azure contexts let you select the subscription to run Azure
PowerShell cmdlets on. Azure contexts are also used to store sign-in information across multiple PowerShell
sessions and run background tasks.
This article covers managing Azure contexts, not the management of subscriptions or accounts. If you're looking
to manage users, subscriptions, tenants, or other account information, see the Azure Active Directory
documentation. To learn about using contexts for running background or parallel tasks, see Use Azure PowerShell
cmdlets in PowerShell jobs after becoming familiar with Azure contexts.

Overview of Azure context objects


Azure contexts are PowerShell objects representing your active subscription to run commands against, and the
authentication information needed to connect to an Azure cloud. With Azure contexts, Azure PowerShell doesn't
need to reauthenticate your account each time you switch subscriptions. An Azure context consists of:
The account that was used to sign in to Azure with Connect-AzAccount. Azure contexts treat users, application
IDs, and service principals the same from an account perspective.
The active subscription, a service agreement with Microsoft to create and run Azure resources, which are
associated with a tenant. Tenants are often referred to as organizations in documentation or when working
with Active Directory.
A reference to a token cache, a stored authentication token for accessing an Azure cloud. Where this token is
stored and how long it persists for is determined by the context autosave settings.
For more information on these terms, see Azure Active Directory Terminology. Authentication tokens used by
Azure contexts are the same as other stored tokens that are part of a persistent session.
When you sign in with Connect-AzAccount , at least one Azure context is created for your default subscription. The
object returned by Connect-AzAccount is the default Azure context used for the rest of the PowerShell session.

Get Azure contexts


Available Azure contexts are retrieved with the Get-AzContext cmdlet. List all of the available contexts with
-ListAvailable :

Get-AzContext -ListAvailable

Or get a context by name:

$context = Get-AzContext -Name "mycontext"

Context names may be different from the name of the associated subscription.
IMPORTANT
The available Azure contexts aren't always your available subscriptions. Azure contexts only represent locally-stored
information. You can get your subscriptions with the Get-AzSubscription cmdlet.

Create a new Azure context from subscription information


The Set-AzContext cmdlet is used to both create new Azure contexts and set them as the active context. The
easiest way to create a new Azure context is to use existing subscription information. The cmdlet is designed to
take the output object from Get-AzSubscription as a piped value and configure a new Azure context:

Get-AzSubscription -SubscriptionName 'MySubscriptionName' | Set-AzContext -Name 'MyContextName'

Or give the subscription name or ID and the tenant ID if necessary:

Set-AzContext -Name 'MyContextName' -Subscription 'MySubscriptionName' -Tenant '.......'

If the argument is omitted, then the subscription's name and ID are used as the context name in the format
-Name
Subscription Name (subscription-id) .

Change the active Azure context


Both Set-AzContext and Select-AzContext can be used to change the active Azure context. As described in Create
a new Azure context, Set-AzContext creates a new Azure context for a subscription if one doesn't exist, and then
switches to use that context as the active one.
Select-AzContext is meant to be used with existing Azure contexts only and works similarly to using
Set-AzContext -Context , but is designed for use with piping:

Set-AzContext -Context $(Get-AzContext -Name "mycontext") # Set a context with an inline Azure context object
Get-AzContext -Name "mycontext" | Select-AzContext # Set a context with a piped Azure context object

Like many other account and context management commands in Azure PowerShell, Set-AzContext and
Select-AzContext support the -Scope argument so that you can control how long the context is active. -Scope
lets you change a single session's active context without changing the default:

Get-AzContext -Name "mycontext" | Select-AzContext -Scope Process

To avoid switching contexts for a whole PowerShell session, all Azure PowerShell commands can be run against a
given context with the -AzContext argument:

$context = Get-AzContext -Name "mycontext"


New-AzVM -Name ExampleVM -AzContext $context

The other main use of contexts with Azure PowerShell cmdlets is to run background commands. To learn more
about running PowerShell Jobs using Azure PowerShell, see Run Azure PowerShell cmdlets in PowerShell Jobs.

Save Azure contexts across PowerShell sessions


By default, Azure contexts are saved for use between PowerShell sessions. You change this behavior in the
following ways:
Sign in using -Scope Process with Connect-AzAccount .

Connect-AzAccount -Scope Process

The Azure context returned as part of this sign in is valid for the current session only and will not be
automatically saved, regardless of the Azure PowerShell context autosave setting.
Disable AzurePowershell's context autosave with the Disable-AzContextAutosave cmdlet. Disabling context
autosave doesn't clear any stored tokens. To learn how to clear stored Azure context information, see
Remove Azure contexts and credentials.
Explicitly enable Azure context autosave can be enabled with the Enable-AzContextAutosave cmdlet. With
autosave enabled, all of a user's contexts are stored locally for later PowerShell sessions.
Manually save contexts with Save-AzContext to be used in future PowerShell sessions, where they can be
loaded with Import-AzContext:

Save-AzContext -Path [Link] # Save the current context


Save-AzContext -Profile $profileObject -Path [Link] # Save a context object
Import-AzContext -Path [Link] # Load the context from a file and set it to the current
context

WARNING
Disabling context autosave doesn't clear any stored context information that was saved. To remove stored information, use
the Clear-AzContext cmdlet. For more on removing saved contexts, see Remove contexts and credentials.

Each of these commands supports the -Scope parameter, which can take a value of Process to only apply to the
current running process. For example, to ensure that newly created contexts aren't saved after exiting a
PowerShell session:

Disable-AzContextAutosave -Scope Process


$context2 = Set-AzContext -Subscription "sub-id" -Tenant "other-tenant"

Context information and tokens are stored in the $env:USERPROFILE\.Azure directory on Windows, and on
$HOME/.Azure on other platforms. Sensitive information such as subscription IDs and tenant IDs may still be
exposed in stored information, through logs or saved contexts. To learn how to clear stored information, see the
Remove contexts and credentials section.

Remove Azure contexts and stored credentials


To clear Azure contexts and credentials:
Sign out of an account with Disconnect-AzAccount. You can sign out of any account either by account or
context:

Disconnect-AzAccount # Disconnect active account


Disconnect-AzAccount -Username "user@[Link]" # Disconnect by account name

Disconnect-AzAccount -ContextName "subscription2" # Disconnect by context name


Disconnect-AzAccount -AzureContext $contextObject # Disconnect using context object information
Disconnecting always removes stored authentication tokens and clears saved contexts associated with the
disconnected user or context.
Use Clear-AzContext. This cmdlet is guaranteed to always remove stored contexts and authentication
tokens, and will also sign you out.
Remove a context with Remove-AzContext:

Remove-AzContext -Name "mycontext" # Remove by name


Get-AzContext -Name "mycontext" | Remove-AzContext # Remove by piping Azure context object

If you remove the active context, you will be disconnected from Azure and need to reauthenticate with
Connect-AzAccount .

See also
Run Azure PowerShell cmdlets in PowerShell Jobs
Azure Active Directory Terminology
[Link] reference
Query output of Azure PowerShell
2/4/2020 • 2 minutes to read • Edit Online

The results of each Azure PowerShell cmdlet are an Azure PowerShell object. Even cmdlets that aren't explicitly
Get- operations might return a value that can be inspected, to give information about a resource that was created
or modified. While most cmdlets return a single object, some return an array that should be iterated through.
In almost all cases, you query output from Azure PowerShell with the Select-Object cmdlet, often abbreviated to
select . Output can be filtered with Where-Object, or its alias where .

Select simple properties


In the default table format, Azure PowerShell cmdlets don't display all of their available properties. You can get the
full properties by using the Format-List cmdlet, or by piping output to Select-Object * :

Get-AzVM -Name TestVM -ResourceGroupName TestGroup | Select-Object *

ResourceGroupName : TESTGROUP
Id : /subscriptions/711d8ed1-b888-4c52-8ab9-
66f07b87eb6b/resourceGroups/TESTGROUP/providers/Micro
[Link]/virtualMachines/TestVM
VmId : 711d8ed1-b888-4c52-8ab9-66f07b87eb6b
Name : TestVM
Type : [Link]/virtualMachines
Location : westus2
LicenseType :
Tags : {}
AvailabilitySetReference :
DiagnosticsProfile :
Extensions : {}
HardwareProfile : [Link]
InstanceView :
NetworkProfile : [Link]
OSProfile : [Link]
Plan :
ProvisioningState : Succeeded
StorageProfile : [Link]
DisplayHint : Compact
Identity :
Zones : {}
FullyQualifiedDomainName :
AdditionalCapabilities :
RequestId : 711d8ed1-b888-4c52-8ab9-66f07b87eb6b
StatusCode : OK

Once you know the names of the properties that you're interested in, you can use those property names with
Select-Object to get them directly:

Get-AzVM -Name TestVM -ResourceGroupName TestGroup | Select-Object Name,VmId,ProvisioningState

Name VmId ProvisioningState


---- ---- -----------------
TestVM 711d8ed1-b888-4c52-8ab9-66f07b87eb6b Succeeded
Output from using Select-Object is always formatted to display the requested information. To learn about using
formatting as part of querying cmdlet results, see Format Azure PowerShell cmdlet output.

Select nested properties


Some properties in Azure PowerShell cmdlet output use nested objects, like the StorageProfile property of
Get-AzVM output. To get a value from a nested property, provide a display name and the full path to the value you
want to inspect as part of a dictionary argument to Select-Object :

Get-AzVM -ResourceGroupName TestGroup | `


Select-Object Name,@{Name="OSType"; Expression={$_.[Link]}}

Name OSType
---- ------
TestVM Linux
TestVM2 Linux
WinVM Windows

Each dictionary argument selects one property from the object. The property to extract must be part of an
expression.

Filter results
The Where-Object cmdlet allows you to filter the result based on any property value, including nested properties.
The next example shows how to use Where-Object to find the Linux VMs in a resource group.

Get-AzVM -ResourceGroupName TestGroup | `


Where-Object {$_.[Link] -eq "Linux"}

ResourceGroupName Name Location VmSize OsType NIC ProvisioningState Zone


----------------- ---- -------- ------ ------ --- ----------------- ----
TestGroup TestVM westus2 Standard_D2s_v3 Linux testvm299 Succeeded
TestGroup TestVM2 westus2 Standard_D2s_v3 Linux testvm2669 Succeeded

You can pipe the results of Select-Object and Where-Object to each other. For performance purposes, it's always
recommended to put the Where-Object operation before Select-Object :

Get-AzVM -ResourceGroupName TestGroup | `


Where-Object {$_.[Link] -eq "Linux"} | `
Select-Object Name,VmID,ProvisioningState

Name VmId ProvisioningState


---- ---- -----------------
TestVM 711d8ed1-b888-4c52-8ab9-66f07b87eb6 Succeeded
TestVM2 cbcee769-dd78-45e3-a14d-2ad11c647d0 Succeeded
Format Azure PowerShell cmdlet output
2/4/2020 • 3 minutes to read • Edit Online

By default each Azure PowerShell cmdlet formats output to be easy to read. PowerShell allows you to convert or
format cmdlet output by piping to one of the following cmdlets:

FORMATTING CONVERSION

Format-Custom ConvertTo-Csv

Format-List ConvertTo-Html

Format-Table ConvertTo-Json

Format-Wide ConvertTo-Xml

Formatting is used for display in a PowerShell terminal, and conversion is used for generating data to be
consumed by other scripts or programs.

Table output format


By default, Azure PowerShell cmdlets output in the table format. This format doesn't display all information of the
requested resource:

Get-AzVM

ResourceGroupName Name Location VmSize OsType NIC ProvisioningState Zone


----------------- ---- -------- ------ ------ --- ----------------- ----
QueryExample ExampleLinuxVM westus2 Basic_A0 Linux examplelinuxvm916 Succeeded
QueryExample RHELExample westus2 Standard_D2_v3 Linux rhelexample469 Succeeded
QueryExample WinExampleVM westus2 Standard_DS1_v2 Windows winexamplevm268 Succeeded

The amount of data displayed by Format-Table can be affected by the width of your PowerShell session window.
To restrict the output to specific properties and order them, property names can be provided as arguments to
Format-Table :

Get-AzVM -ResourceGroupName QueryExample | Format-Table Name,ResourceGroupName,Location

Name ResourceGroupName Location


---- ----------------- --------
ExampleLinuxVM QueryExample westus2
RHELExample QueryExample westus2
WinExampleVM QueryExample westus2

List output format


List output format produces two columns, property names followed by the value. For complex objects, the type of
the object is displayed instead.
Get-AzVM | Format-List

The following output has some fields removed.

ResourceGroupName : QueryExample
Id :
/subscriptions/.../resourceGroups/QueryExample/providers/[Link]/virtualMachines/ExampleLinuxVM
VmId : ...
Name : ExampleLinuxVM
Type : [Link]/virtualMachines
Location : westus2
...
HardwareProfile : [Link]
InstanceView :
NetworkProfile : [Link]
OSProfile : [Link]
...
StatusCode : OK

ResourceGroupName : QueryExample
Id :
/subscriptions/.../resourceGroups/QueryExample/providers/[Link]/virtualMachines/RHELExample
VmId : ...
Name : RHELExample
Type : [Link]/virtualMachines
Location : westus2
...

Like Format-Table , property names can be provided to order and restrict the output:

Get-AzVM | Format-List ResourceGroupName,Name,Location

ResourceGroupName : QueryExample
Name : ExampleLinuxVM
Location : westus2

ResourceGroupName : QueryExample
Name : RHELExample
Location : westus2

ResourceGroupName : QueryExample
Name : WinExampleVM
Location : westus2

Wide output format


Wide output format produces only one property name per query. Which property is displayed can be controlled by
giving a property as an argument.

Get-AzVM | Format-Wide

ExampleLinuxVM RHELExample
WinExampleVM
Get-AzVM | Format-Wide ResourceGroupName

QueryExample QueryExample
QueryExample

Custom output format


The Custom-Format output type is meant for formatting custom objects. Without any arguments, it behaves like
Format-List but displays the property names of custom classes.

Get-AzVM | Format-Custom

The following output has some fields removed.

ResourceGroupName : QueryExample
Id :
/subscriptions/.../resourceGroups/QueryExample/providers/[Link]/virtualMachines/ExampleLinuxVM
VmId : ...
Name : ExampleLinuxVM
Type : [Link]/virtualMachines
Location : westus2
Tags : {}
HardwareProfile : {VmSize}
NetworkProfile : {NetworkInterfaces}
OSProfile : {ComputerName, AdminUsername, LinuxConfiguration, Secrets,
AllowExtensionOperations}
ProvisioningState : Succeeded
StorageProfile : {ImageReference, OsDisk, DataDisks}
...

Giving property names as arguments to Custom-Format displays the property/value pairs for custom objects set as
values:

Get-AzVM | Format-Custom Name,ResourceGroupName,Location,OSProfile

The following output has some fields removed.


class PSVirtualMachineList
{
Name = ExampleLinuxVM
ResourceGroupName = QueryExample
Location = westus2
OSProfile =
class OSProfile
{
ComputerName = ExampleLinuxVM
AdminUsername = ...
AdminPassword =
CustomData =
WindowsConfiguration =
LinuxConfiguration =
class LinuxConfiguration
{
DisablePasswordAuthentication = False
Ssh =
ProvisionVMAgent = True
}
Secrets =
[
]

AllowExtensionOperations = True
}
}

...

class PSVirtualMachineList
{
Name = WinExampleVM
ResourceGroupName = QueryExample
Location = westus2
OSProfile =
class OSProfile
{
ComputerName = WinExampleVM
AdminUsername = ...
AdminPassword =
CustomData =
WindowsConfiguration =
class WindowsConfiguration
{
ProvisionVMAgent = True
EnableAutomaticUpdates = True
TimeZone =
AdditionalUnattendContent =
WinRM =
}
LinuxConfiguration =
Secrets =
[
]

AllowExtensionOperations = True
}
}

Conversion to other data formats


The ConvertTo-* family of cmdlets allows for converting the results of Azure PowerShell cmdlets to machine-
readable formats. To get only some properties from the Azure PowerShell results, use the Select-Object
command in a pipe before performing the conversion. The following examples demonstrate the different kinds of
output that each conversion produces.
Conversion to CSV

Get-AzVM | ConvertTo-CSV

#TYPE [Link]
"ResourceGroupName","Id","VmId","Name","Type","Location","LicenseType","Tags","AvailabilitySetReference","Diag
nosticsProfile","Extensions","HardwareProfile","InstanceView","NetworkProfile","OSProfile","Plan","Provisionin
gState","StorageProfile","DisplayHint","Identity","Zones","FullyQualifiedDomainName","AdditionalCapabilities",
"RequestId","StatusCode"
"QUERYEXAMPLE","/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/Exa
mpleLinuxVM","...","ExampleLinuxVM","[Link]/virtualMachines","westus2",,"[Link]
.Dictionary`2[[Link],[Link]]",,,"[Link]`1[[Link]
[Link]]","[Link]",,"Microsoft
.[Link]","[Link]",,"Succe
eded","[Link]","Compact",,"[Link]`1
[[Link]]",,,"...","OK"
"QUERYEXAMPLE","/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/RHE
LExample","...","RHELExample","[Link]/virtualMachines","westus2",,"[Link]
onary`2[[Link],[Link]]",,,"[Link]`1[[Link].
[Link]]","[Link]",,"[Link]
.[Link]","[Link]",,"Succeeded",
"[Link]","Compact",,"[Link]`1[Syste
[Link]]",,,"...","OK"
"QUERYEXAMPLE","/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/Win
ExampleVM","...","WinExampleVM","[Link]/virtualMachines","westus2",,"[Link]
tionary`2[[Link],[Link]]",,,"[Link]`1[[Link]
[Link]]","[Link]",,"[Link]
[Link]","[Link]",,"Succeeded
","[Link]","Compact",,"[Link]`1[Sys
[Link]]",,,"...","OK"

Conversion to JSON
JSON output doesn't expand all properties by default. To change the depth of properties expanded, use the
-Depth argument. By default, the expansion depth is 2 .

Get-AzVM|ConvertTo-JSON

The following output has some fields removed.


[
{
"ResourceGroupName": "QUERYEXAMPLE",
"Id":
"/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/ExampleLinuxVM",
"VmId": "...",
"Name": "ExampleLinuxVM",
"Type": "[Link]/virtualMachines",
"Location": "westus2",
...
"OSProfile": {
"ComputerName": "ExampleLinuxVM",
"AdminUsername": "...",
"AdminPassword": null,
"CustomData": null,
"WindowsConfiguration": null,
"LinuxConfiguration":
"[Link]",
"Secrets": "",
"AllowExtensionOperations": true
},
"Plan": null,
"ProvisioningState": "Succeeded",
"StorageProfile": {
"ImageReference": "[Link]",
"OsDisk": "[Link]",
"DataDisks": ""
},
"DisplayHint": 0,
"Identity": null,
"Zones": [

],
"FullyQualifiedDomainName": null,
"AdditionalCapabilities": null,
"RequestId": "...",
"StatusCode": 200
},
...
]

Conversion to XML
The ConvertTo-XML cmdlet converts the Azure PowerShell response object into a pure XML object, which can be
handled like any other XML object within PowerShell.

Get-AzVM | ConvertTo-XML

xml Objects
--- -------
version="1.0" encoding="utf-8" Objects

Conversion to HTML
Converting an object to HTML produces output that will be rendered as an HTML table. Rendering of the HTML
will depend on your browser behavior for rendering tables which contain no width information. No custom class
objects are expanded.

Get-AzVM | ConvertTo-HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[Link]
<html xmlns="[Link]
<head>
<title>HTML TABLE</title>
</head><body>
<table>
<colgroup><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/><col/>
<col/><col/><col/><col/><col/><col/><col/><col/><col/></colgroup>
<tr><th>ResourceGroupName</th><th>Id</th><th>VmId</th><th>Name</th><th>Type</th><th>Location</th>
<th>LicenseType</th><th>Tags</th><th>AvailabilitySetReference</th><th>DiagnosticsProfile</th>
<th>Extensions</th><th>HardwareProfile</th><th>InstanceView</th><th>NetworkProfile</th><th>OSProfile</th>
<th>Plan</th><th>ProvisioningState</th><th>StorageProfile</th><th>DisplayHint</th><th>Identity</th>
<th>Zones</th><th>FullyQualifiedDomainName</th><th>AdditionalCapabilities</th><th>RequestId</th>
<th>StatusCode</th></tr>
<tr><td>QUERYEXAMPLE</td>
<td>/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/ExampleLinuxVM<
/td><td>...</td><td>ExampleLinuxVM</td><td>[Link]/virtualMachines</td><td>westus2</td><td></td>
<td>[Link]`2[[Link],[Link]]</td><td></td><td></td>
<td>[Link]`1[[Link]]</td>
<td>[Link]</td><td></td>
<td>[Link]</td>
<td>[Link]</td><td></td><td>Succeeded</td>
<td>[Link]</td><td>Compact</td><td></td>
<td>[Link]`1[[Link]]</td><td></td><td></td><td>...</td><td>OK</td></tr>
<tr><td>QUERYEXAMPLE</td>
<td>/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/RHELExample</td
><td>...</td><td>RHELExample</td><td>[Link]/virtualMachines</td><td>westus2</td><td></td>
<td>[Link]`2[[Link],[Link]]</td><td></td><td></td>
<td>[Link]`1[[Link]]</td>
<td>[Link]</td><td></td>
<td>[Link]</td>
<td>[Link]</td><td></td><td>Succeeded</td>
<td>[Link]</td><td>Compact</td><td></td>
<td>[Link]`1[[Link]]</td><td></td><td></td><td>...</td><td>OK</td></tr>
<tr><td>QUERYEXAMPLE</td>
<td>/subscriptions/.../resourceGroups/QUERYEXAMPLE/providers/[Link]/virtualMachines/WinExampleVM</t
d><td>...</td><td>WinExampleVM</td><td>[Link]/virtualMachines</td><td>westus2</td><td></td>
<td>[Link]`2[[Link],[Link]]</td><td></td><td></td>
<td>[Link]`1[[Link]]</td>
<td>[Link]</td><td></td>
<td>[Link]</td>
<td>[Link]</td><td></td><td>Succeeded</td>
<td>[Link]</td><td>Compact</td><td></td>
<td>[Link]`1[[Link]]</td><td></td><td></td><td>...</td><td>OK</td></tr>
</table>
</body></html>
Use multiple Azure subscriptions
2/4/2020 • 2 minutes to read • Edit Online

Most Azure users will only ever have a single subscription. However, if you are part of more than one organization
or your organization has divided up access to certain resources across groupings, you may have multiple
subscriptions within Azure. The CLI supports selecting a subscription both globally and per command.
For detailed information on subscriptions, billing, and cost management, see the billing and cost management
documentation.

Tenants, users, and subscriptions


You might have some confusion over the difference between tenants, users, and subscriptions within Azure. A
tenant is the Azure Active Directory entity that encompasses a whole organization. This tenant has at least one
subscription and user. A user is an individual and is associated with only one tenant, the organization that they
belong to. Users are those accounts that sign in to Azure to create, manage, and use resources. A user may have
access to multiple subscriptions, which are the agreements with Microsoft to use cloud services, including Azure.
Every resource is associated with a subscription.
To learn more about the differences between tenants, users, and subscriptions, see the Azure cloud terminology
dictionary. To learn how to add a new subscription to your Azure Active Directory tenant, see How to add an Azure
subscription to Azure Active Directory. To learn how to sign in to a specific tenant, see Sign in with Azure
PowerShell.

Change the active subscription


In Azure PowerShell, accessing the resources for a subscription requires changing the subscription associated with
your current Azure session. This is done by modifying the active session context, the information about which
tenant, subscription, and user cmdlets should be run against. In order to change subscriptions, an Azure
PowerShell Context object first needs to be retrieved with Get-AzSubscription and then the current context
changed with Set-AzContext.
The next example shows how to get a subscription in the currently active tenant, and set it as the active session:

$context = Get-AzSubscription -SubscriptionId ...


Set-AzContext $context

To learn more about Azure PowerShell contexts, including how to save them and quickly switch between them for
working with multiple subscriptions easily, see Persist credentials with Azure PowerShell contexts.
Run Azure PowerShell cmdlets in PowerShell Jobs
2/4/2020 • 2 minutes to read • Edit Online

Azure PowerShell depends on connecting to an Azure cloud and waiting for responses, so most of these cmdlets
block your PowerShell session until they get a response from the cloud. Powershell Jobs let you run cmdlets in the
background or do multiple tasks on Azure at once, from inside a single PowerShell session.
This article is a brief overview of how to run Azure PowerShell cmdlets as PowerShell Jobs and check for
completion. Running commands in Azure PowerShell requires the use of Azure PowerShell contexts, which are
covered in detail in Azure contexts and sign-in credentials. To learn more about PowerShell Jobs, see About
PowerShell Jobs.

Azure contexts with PowerShell jobs


PowerShell Jobs are run as separate processes without an attached PowerShell session, so your Azure credentials
must be shared with them. Credentials are passed as Azure context objects, using one of these methods:
Automatic context persistence. Context persistence is enabled by default and preserves your sign-in
information across multiple sessions. With context persistence enabled, the current Azure context is passed
to the new process:

Enable-AzContextAutosave # Enables context autosave if not already on


$creds = Get-Credential
$job = Start-Job { param($vmadmin) New-AzVM -Name MyVm -Credential $vmadmin } -ArgumentList $creds

Use the -AzContext parameter with any Azure PowerShell cmdlets to provide an Azure context object:

$context = Get-AzContext -Name 'mycontext' # Get an Azure context object


$creds = Get-Credential
$job = Start-Job { param($context, $vmadmin) New-AzVM -Name MyVm -AzContext $context -Credential
$vmadmin} -ArgumentList $context,$creds }

If context persistence is disabled, the -AzContext argument is required.


Use the -AsJob switch provided by some Azure PowerShell cmdlets. This switch automatically starts the
cmdlet as a PowerShell Job, using the currently active Azure context:

$creds = Get-Credential
$job = New-AzVM -Name MyVm -Credential $creds -AsJob

To see if a cmdlet supports -AsJob , check its reference documentation. The -AsJob switch doesn't require
context autosave to be enabled.
You can check the status of a running job with the Get-Job cmdlet. To get the output from a job so far, use the
Receive-Job cmdlet.
To check an operation's progress remotely on Azure, use the Get- cmdlets associated with the type of resource
being modified by the job:
$creds = Get-Credential
$context = Get-AzContext -Name 'mycontext'
$vmName = "MyVm"

$job = Start-Job { param($context, $vmName, $vmadmin) New-AzVM -Name $vmName -AzContext $context -Credential
$vmadmin} -ArgumentList $context,$vmName,$creds }

Get-Job $job
Get-AzVM -Name $vmName

See Also
Azure PowerShell contexts
About PowerShell Jobs
Get-Job reference
Receive-Job reference
Azure PowerShell release notes
2/4/2020 • 57 minutes to read • Edit Online

3.4.0 - February 2020


Highlights since the last major release
[Link] initial version 0.1.0 released
[Link] ConnectionMonitor V2 support added
[Link]
Disable context auto saving when [Link] not available
Update the reference to Azure Powershell Common to 1.3.5-preview
[Link]
Get-AzApiManagementApiSchema Fixed getting Open-Api Schema associated with an API
[Link]
New-AzApiManagementProduct* and Set-AzApiManagementProduct
Fix documentation for [Link]
Set-AzApiManagementApi Added example to show how to update the ServiceUrl using the cmdlet
[Link]
Limit the number of VM status to 100 to avoid throttling when Get-AzVM -Status is performed without VM
name.
Add Update-AzDiskEncryptionSet cmdlet
Add EncryptionType and DiskEncryptionSetId parameters to the following cmdlets:
New -AzDiskUpdateConfig, New -AzSnapshotUpdateConfig
Add ColocationStatus parameter to Get-AzProximityPlacementGroup cmdlet.
[Link]
Update ADF .Net SDK version to 4.7.0
[Link]
Adds LIST operations for resources
Adds capability for performing operations on Health Check steps
[Link]
Fix document error of New -AzHDInsightCluster.
[Link]
Add Name alias to VaultName attribute to make Remove-AzureKeyVault consistent with New -AzureKeyVault.
[Link]
New example added to [Link] to demonstrate Traffic Analytics disable
scenario.
Add support for assigning management IP configuration to Azure Firewall - a dedicated subnet and Public IP
that the firewall will use for its management traffic
Updated New -AzFirewall cmdlet:
Added parameter -ManagementPublicIpAddress (not mandatory) which accepts a Public IP
Address object
Added method SetManagementIpConfiguration on firewall object - requires a subnet and a Public
IP address as input - subnet name must be 'AzureFirewallManagementSubnet'
Corrected Get-AzNetworkSecurityGroup examples to show examples for NSG's instead of network interfaces.
Fixed typo in New -AzVpnSite command that was preventing resource id completer from completing a
parameter.
Added support for Url Confiugration in Rewrite Rules Action Set in the Application Gateway
New cmdlets added:
New -AzApplicationGatewayRewriteRuleUrlConfiguration
Cmdlets updated with optional parameter - UrlConfiguration
New -AzApplicationGatewayRewriteRuleActionSet
Add suppport for NetworkWatcher ConnectionMonitor version 2 resources
[Link]
Support evaluating compliance prior to determining what resource to remediate
Add '-ResourceDiscoverMode' parameter to Start-AzPolicyRemediation
Add Get-AzPolicyMetadata cmdlet for getting policy metadata resources
Updated Get-AzPolicyState and Get-AzPolicyStateSummary for API version 2019-10-01
[Link]
Azure Site Recovery support for removing a replicated disk.
Azure Backup added support for adding tags while creating a Recovery Services Vault.
[Link]
Make -Scope optional in *-AzPolicyAssignment cmdlets with default to context subscription
Add examples of creating ADServicePrincipal with password and key credential
[Link]
Fix New -AzSqlDatabaseSecondary cmdlet to check for PartnerDatabaseName existence instead of DatabaseName
existence.
[Link]
Support set Table/Queue Encryption Keytype in Create Storage Account
New -AzStorageAccount
Show RequestId when StorageException don't have ExtendedErrorInformation
Fix the Example 6 of cmdlet Start-AzStorageBlobCopy
[Link]
Set-AzWebapp and Set-AzWebappSlot supports AlwaysOn, MinTls and FtpsState properties
Fixing issue where setting HttpsOnly along with changing AppservicePlan at the same time using the single
Set-AzWebApp Command, was resetting HttpsOnly to default value

3.3.0 - January 2020


[Link]
Updated Add-AzEnvironment and Set-AzEnvironment to accept parameters
AzureAttestationServiceEndpointResourceId and AzureAttestationServiceEndpointSuffix
[Link]
Display error response detail in New -AzCdnEndpoint cmdlet
[Link]
Fix Set-AzVMCustomScriptExtension cmdlet for a VM with managed OD disk which does not have OS profile.
[Link]
Fixed parameter names used by example of New -AzContainerGroup
[Link]
Added cmdlet 'Get-AzDataBoxEdgeStorageContainer'
Get the Edge Storage Container
Added cmdlet 'New -AzDataBoxEdgeStorageContainer'
Create new Edge Strorage Container
Added cmdlet 'Remove-AzDataBoxEdgeStorageContainer'
Remove the Edge Storage Container
Added cmdlet 'Invoke-AzDataBoxEdgeStorageContainer'
Invoke action to refresh data on Edge Storage Container
Added cmdlet 'Get-AzDataBoxEdgeStorageAccount'
Get the Edge Storage Account
Added cmdlet 'New -AzDataBoxEdgeStorageAccount'
Create new Edge Storage Account
Added cmdlet 'Remove-AzDataBoxEdgeStorageAccount'
Remove the Edge Storage Account
Invoke cmdlet 'Invoke-AzDataBoxEdgeShare'
Invoke action to refresh data on share
Added cmdlet 'Set-AzDataBoxEdgeStorageAccountCredential'
Set the az databoxedge storage account credential
[Link]
Add AutoUpdateETA, LatestVersion, PushedVersion, TaskQueueId and VersionStatus properties for Get-
AzDataFactoryV2IntegrationRuntime cmd
Update ADF .Net SDK version to 4.6.0
Add parameter 'PublicIPs' for 'Set-AzureRmDataFactoryV2IntegrationRuntime' cmd to enable create Azure-
SSIS IR with static public IP addresses.
[Link]
Remove the broken link in [Link]
[Link]
Fix for issue 10634 : Fix the null Object reference for remove eventhubnamespace
[Link]
Fix [Link] error.
[Link]
Removed below cmdlets because MachineLearningCompute is not available any longer
Get-AzMlOpCluster
Get-AzMlOpClusterKey
New -AzMlOpCluster
Remove-AzMlOpCluster
Set-AzMlOpCluster
Test-AzMlOpClusterSystemServicesUpdateAvailability
Update-AzMlOpClusterSystemService
[Link]
Upgrade dependency of [Link] from 1.36-preview to 1.37-preview
[Link]
Azure Site Recovery change support for managed disk vms encrypted at rest with customer managed keys for
Azure to Azure provider.
Azure Site Recovery support to input disk encryption Set Id as optional input at enabling protection for Vmware
to Azure.
Azure Site Recovery support to input disk encryption Set Id as optional input at disk level to enable protection
for Vmware to Azure.
Azure Site Recovery support to update replication protected item with disk encryption set Map for HyperV to
Azure.
[Link]
Fix an error in help document of 'Remove-AzTag'.
[Link]
Fix vulnerability assessment set baseline cmdlets functionality to work on master db for azure database and
limit it on managed instance system databases.
Fix an error when creating SQL instance failover group
[Link]
Add DR as a new valid License type
[Link]
Add breaking change warning message for DefaultAction Value change in a future release
Update-AzStorageAccountNetworkRuleSet
Support Get last sync time of Storage account by run get-AzureRMStorageAccount with parameter -
IncludeGeoReplicationStats
Get-AzureRMStorageAccount

3.2.0 - December 2019


General
Update references in .psd1 to use relative path for all modules
[Link]
Set correct UserAgent for client-side telemetry for Az 4.0 preview
Display user friendly error message when context is null in Az 4.0 preview
[Link]
Fix issue #10602, where New-AzBatchPool did not properly send
'[Link]' or '[Link]' to the
server.
[Link]
Update ADF .Net SDK version to 4.5.0
[Link]
Added WAF managed rules exclusion support
Add SocketAddr to auto-complete
[Link]
Exception Handling
[Link]
Fixed error accessing value that is potentially not set
Elliptic Curve Cryptography Certificate Managment
Added support to specify the Curve for Certificate Policies
[Link]
Adding optional argument to the Add Diagnostic Settings command. A switch argument that if present
indicates that the export to Log Analytics must be to a fixed schema (a.k.a. dedicated, data type)
[Link]
Support for IpGroups in AzureFirewall Application,Nat & Network Rules.
[Link]
Fix an issue where template deployment fails to read a template parameter if its name conflicts with some built-
in parameter name.
Updated policy cmdlets to use new api version 2019-09-01 that introduces grouping support within policy set
definitions.
[Link]
Upgraded storage creation in Vulnerability Assessment auto enablement to StorageV2
[Link]
Support generate Blob/Constainer Idenity based SAS token with Storage Context based on Oauth
authentication
New -AzStorageContainerSASToken
New -AzStorageBlobSASToken
Support revoke Storage Account User Delegation Keys, so all Idenity SAS tokens are revoked
Revoke-AzStorageAccountUserDelegationKeys
Upgrade to [Link] 14.2.0, to support new API version 2019-06-01.
Support of QuotaGiB (Share Quota in Gibibye) for values of more than 5120 in the Management plane of File
Share cmdlets and added the 'Quota' parameter alias to the 'QuotaGiB' parameter.
New -AzRmStorageShare
Update-AzRmStorageShare
Add parameter alias 'QuotaGiB' to parameter 'Quota'
Set-AzStorageShareQuota
Fix the issue that Set-AzStorageContainerAcl can clean up the stored Access Policy
Set-AzStorageContainerAcl

3.1.0 - November 2019


Highlights since the last major release
[Link] 1.0.0 released
[Link] 1.0.0 released
[Link]
VM Reapply feature
Add Reapply parameter to Set-AzVM cmdlet
VM Scale Set AutomaticRepairs feature:
Add EnableAutomaticRepair, AutomaticRepairGracePeriod, and
AutomaticRepairMaxInstanceRepairsPercent parameters to the following cmdlets: New -AzVmssConfig
Update-AzVmss
Cross tenant gallery image support for New -AzVM
Add 'Spot' to the argument completer of Priority parameter in New -AzVM, New -AzVMConfig and New -
AzVmss cmdlets
Add DiskIOPSReadWrite and DiskMBpsReadWrite parameters to Add-AzVmssDataDisk cmdlet
Change SourceImageId parameter of New -AzGalleryImageVersion cmdlet to optional
Add OSDiskImage and DataDiskImage parameters to New -AzGalleryImageVersion cmdlet
Add HyperVGeneration parameter to New -AzGalleryImageDefinition cmdlet
Add SkipExtensionsOnOverprovisionedVMs parameters to New -AzVmss, New -AzVmssConfig and Update-
AzVmss cmdlets
[Link]
Added cmdlet Get-AzDataBoxEdgeOrder
Get the Order
Added cmdlet New-AzDataBoxEdgeOrder
Create new Order
Added cmdlet Remove-AzDataBoxEdgeOrder
Remove the Order
Change in cmdlet New-AzDataBoxEdgeShare
Now creates Local Share
Added cmdlet Set-AzDataBoxEdgeRole
Now IotRole can be mapped to Share
Added cmdlet Invoke-AzDataBoxEdgeDevice
Invoke scan update, download update, install updates on the device
Added cmdlet Get-AzDataBoxEdgeTrigger
Gets the information about Triggers
Added cmdlet New-AzDataBoxEdgeTrigger
Create new Triggers
Added cmdlet Remove-AzDataBoxEdgeTrigger
Remove the Triggers
[Link]
Update ADF .Net SDK version to 4.4.0
Add parameter 'ExpressCustomSetup' for 'Set-AzureRmDataFactoryV2IntegrationRuntime' cmd to enable
setup configurations and 3rd party components without custom setup script.
[Link]
Update documentation of Get-AzDataLakeStoreDeletedItem and Restore-AzDataLakeStoreDeletedItem
[Link]
Fix for issue 10301 : Fix the SAS Token date format
[Link]
Add MinimumTlsVersion parameter to Enable-AzFrontDoorCustomDomainHttps and New -
AzFrontDoorFrontendEndpointObject
Add HealthProbeMethod and EnabledState parameters to New -AzFrontDoorHealthProbeSettingObject
Add new cmdlet to create BackendPoolsSettings objec to pass into creation/update of Front Door
New -AzFrontDoorBackendPoolsSettingObject
[Link]
Change '[Link]' and 'Start-
[Link]' FilterData option examples.
[Link]
Updated PrivateDns .net sdk to version 1.0.0
[Link]
Azure Site Recovery support to select disk type at enabling protection.
Azure Site Recovery bug fix for recovery plan action edit.
Azure Backup SQL Restore support to accept filestream DBs.
[Link]
Added 'MinimumTlsVersion' parameter in 'New -AzRedisCache' and 'Set-AzRedisCache' cmdlets. Also, added
'MinimumTlsVersion' in the output of 'Get-AzRedisCache' cmdlet.
Added validation on '-Size' parameter for 'Set-AzRedisCache' and 'New -AzRedisCache' cmdlets
[Link]
Updated policy cmdlets to use new api version 2019-06-01 that has new EnforcementMode property in policy
assignment.
Updated create policy definition help example
Fix bug Remove-AZADServicePrincipal -ServicePrincipalName, throw null reference when service principal
name not found.
Fix bug New -AZADServicePrincipal, throw null reference when tenant doesn't have any subscription.
Change New -AzAdServicePrincipal to add credentials only to associated application.
[Link]
Added support for database ReadReplicaCount.
Fixed Set-AzSqlDatabase when zone redundancy not set

3.0.0 - November 2019


General
[Link] 1.0.0 released
[Link]
Add a deprecation message for 'Resolve-Error' alias.
[Link]
Added new category 'Operational Excellence' to Get-AzAdvisorRecommendation cmdlet.
[Link]
Renamed CoreQuota on BatchAccountContext to DedicatedCoreQuota . There is also a new LowPriorityCoreQuota .
This impacts Get-AzBatchAccount.
New-AzBatchTask -ResourceFile parameter now takes a collection of PSResourceFile objects, which can be
constructed using the new New-AzBatchResourceFile cmdlet.
New New-AzBatchResourceFile cmdlet to help create PSResourceFile objects. These can be supplied to
New-AzBatchTask on the -ResourceFile parameter.
This supports two new kinds of resource file in addition to the existing HttpUrl way:
AutoStorageContainerName based resource files download an entire auto-storage container to the
Batch node.
StorageContainerUrl based resource files download the container specified in the URL to the
Batch node.
Removed ApplicationPackages property of PSApplication returned by Get-AzBatchApplication.
The specific packages inside of an application now can be retrieved using Get-
AzBatchApplicationPackage. For example:
Get-AzBatchApplication -AccountName myaccount -ResourceGroupName myresourcegroup -ApplicationId
myapplication
.
Renamed ApplicationId to ApplicationName on Get-AzBatchApplicationPackage, New-
AzBatchApplicationPackage, Remove-AzBatchApplicationPackage, Get-AzBatchApplication, New-
AzBatchApplication, Remove-AzBatchApplication, and Set-AzBatchApplication.
ApplicationId now is an alias of ApplicationName .
Added new PSWindowsUserConfiguration property to PSUserAccount .
Renamed Version to Name on PSApplicationPackage .
Renamed BlobSource to HttpUrl on PSResourceFile .
Removed OSDisk property from PSVirtualMachineConfiguration .
Removed Set-AzBatchPoolOSVersion. This operation is no longer supported.
Removed TargetOSVersion from PSCloudServiceConfiguration .
Renamed CurrentOSVersion to OSVersion on PSCloudServiceConfiguration .
Removed DataEgressGiB and DataIngressGiB from PSPoolUsageMetrics .
Removed Get-AzBatchNodeAgentSku and replaced it with Get-AzBatchSupportedImage.
Get-AzBatchSupportedImage returns the same data as Get-AzBatchNodeAgentSku but in a more
friendly format.
New non-verified images are also now returned. Additional information about Capabilities and
BatchSupportEndOfLife for each image is also included.
Added ability to mount remote file-systems on each node of a pool via the new MountConfiguration parameter
of New-AzBatchPool.
Now support network security rules blocking network access to a pool based on the source port of the traffic.
This is done via the SourcePortRanges property on PSNetworkSecurityGroupRule .
When running a container, Batch now supports executing the task in the container working directory or in the
Batch task working directory. This is controlled by the WorkingDirectory property on PSTaskContainerSettings .
Added ability to specify a collection of public IPs on PSNetworkConfiguration via the new PublicIPs property.
This guarantees nodes in the Pool will have an IP from the list user provided IPs.
When not specified, the default value of WaitForSuccess on PSSTartTask is now $True (was $False ).
When not specified, the default value of Scope on PSAutoUserSpecification is now Pool (was Task on
Windows and Pool on Linux).
[Link]
Introduced UrlRewriteAction and CacheKeyQueryStringAction to RulesEngine.
Fixed several bugs like missing 'Selector' Input in New -AzDeliveryRuleCondition cmdlet.
[Link]
Disk Encryption Set feature
New cmdlets: New -AzDiskEncryptionSetConfig New -AzDiskEncryptionSet Get-AzDiskEncryptionSet
Remove-AzDiskEncryptionSet
DiskEncryptionSetId parameter is added to the following cmdlets: Set-AzImageOSDisk Set-
AzVMOSDisk Set-AzVmssStorageProfile
Add-AzImageDataDisk New -AzVMDataDisk Set-AzVMDataDisk Add-AzVMDataDisk Add-
AzVmssDataDisk Add-AzVmssVMDataDisk
DiskEncryptionSetId and EncryptionType parameters are added to the following cmdlets: New -
AzDiskConfig New -AzSnapshotConfig
Add PublicIPAddressVersion parameter to New -AzVmssIPConfig
Move FileUris of custom script extension from public setting to protected setting
Add ScaleInPolicy to New -AzVmss, New -AzVmssConfig and Update-AzVmss cmdlets
Breaking changes
UploadSizeInBytes parameter is used instead of DiskSizeGB for New -AzDiskConfig when CreateOption
is Upload
[Link] is replaced with [Link] in
GalleryImageVersion object
[Link]
Update ADF .Net SDK version to 4.3.0
[Link]
Update ADLS SDK version ([Link] -
alpha/[Link]#version-123-alpha), brings following fixes
Avoid throwing exception while unable to deserialize the creationtime of the trash or directory entry.
Expose setting per request timeout in adlsclient
Fix passing the original syncflag for badoffset recovery
Fix EnumerateDirectory to retrieve continuation token once response is checked
Fix Concat Bug
[Link]
Fixed miscellaneous typos across module
[Link]
Fixed the bug that customer will get 'Not a valid Base-64 string' error when using Get-AzHDInsightCluster to
get the cluster with ADLSGen1 storage.
Add a parameter named 'ApplicationId' to three cmdlets Add-AzHDInsightClusterIdentity, New -
AzHDInsightClusterConfig and New -AzHDInsightCluster so that customer can provide the service principal
application id for accessing Azure Data Lake.
Changed [Link] from 2.1.0 to 5.1.0
Removed five cmdlets:
Get-AzHDInsightOMS
Enable-AzHDInsightOMS
Disable-AzHDInsightOMS
Grant-AzHDInsightRdpServicesAccess
Revoke-AzHDInsightRdpServicesAccess
Added three cmdlets:
Get-AzHDInsightMonitoring to replace Get-AzHDInsightOMS.
Enable-AzHDInsightMonitoring to replace Enable-AzHDInsightOMS.
Disable-AzHDInsightMonitoring to replace Disable-AzHDInsightOMS.
Fixed cmdlet Get-AzHDInsightProperties to support get capabilities information from a specific location.
Removed parameter sets('Spark1', 'Spark2') from Add-AzHDInsightConfigValue.
Add examples to the help documents of cmdlet Add-AzHDInsightSecurityProfile.
Changed output type of the following cmdlets:
Changed the output type of Get-AzHDInsightProperties from CapabilitiesResponse to
AzureHDInsightCapabilities.
Changed the output type of Remove-AzHDInsightCluster from ClusterGetResponse to bool.
Changed the output type of Set-AzHDInsightGatewaySettings HttpConnectivitySettings to
GatewaySettings.
Added some scenario test cases.
Remove some alias: 'Add-AzHDInsightConfigValues', 'Get-AzHDInsightProperties'.
[Link]
Breaking changes:
The cmdlet 'Add-AzIotHubEventHubConsumerGroup' no longer supports the parameter
'EventHubEndpointName' and no alias was found for the original parameter name.
The parameter set '__AllParameterSets' for cmdlet 'Add-AzIotHubEventHubConsumerGroup' has been
removed.
The cmdlet 'Get-AzIotHubEventHubConsumerGroup' no longer supports the parameter
'EventHubEndpointName' and no alias was found for the original parameter name.
The parameter set '__AllParameterSets' for cmdlet 'Get-AzIotHubEventHubConsumerGroup' has been
removed.
The property 'OperationsMonitoringProperties' of type
'[Link]' has been removed.
The property 'OperationsMonitoringProperties' of type
'[Link]' has been removed.
The cmdlet 'New -AzIotHubExportDevice' no longer supports the alias 'New -AzIotHubExportDevices'.
The cmdlet 'New -AzIotHubImportDevice' no longer supports the alias 'New -AzIotHubImportDevices'.
The cmdlet 'Remove-AzIotHubEventHubConsumerGroup' no longer supports the parameter
'EventHubEndpointName' and no alias was found for the original parameter name.
The parameter set '__AllParameterSets' for cmdlet 'Remove-AzIotHubEventHubConsumerGroup' has
been removed.
The cmdlet 'Set-AzIotHub' no longer supports the parameter 'OperationsMonitoringProperties' and no
alias was found for the original parameter name.
The parameter set 'UpdateOperationsMonitoringProperties' for cmdlet 'Set-AzIotHub' has been
removed.
[Link]
Azure Site Recovery support to configure networking resources like NSG, public IP and internal load balancers
for Azure to Azure.
Azure Site Recovery Support to write to managed disk for vMWare to Azure.
Azure Site Recovery Support to NIC reduction for vMWare to Azure.
Azure Site Recovery Support to accelerated networking for Azure to Azure.
Azure Site Recovery Support to agent auto update for Azure to Azure.
Azure Site Recovery Support to Standard SSD for Azure to Azure.
Azure Site Recovery Support to Azure Disk Encryption two pass for Azure to Azure.
Azure Site Recovery Support to protect newly added disk for Azure to Azure.
Added SoftDelete feature for VM and added tests for softdelete
[Link]
Update dependency assembly [Link] from 1.1.1 to 2.2
[Link]
Change all cmdlets for PrivateEndpointConnection to support generic service provider.
Updated cmdlet:
Approve-AzPrivateEndpointConnection
Deny-AzPrivateEndpointConnection
Get-AzPrivateEndpointConnection
Remove-AzPrivateEndpointConnection
Set-AzPrivateEndpointConnection
Add new cmdlet for PrivateLinkResource and it also support generic service provider.
New cmdlet:
Get-AzPrivateLinkResource
Add new fields and parameter for the feature Proxy Protocol V2.
Add property EnableProxyProtocol in PrivateLinkService
Add property LinkIdentifier in PrivateEndpointConnection
Updated New -AzPrivateLinkService to add a new optional parameter EnableProxyProtocol.
Fix incorrect parameter description in 'New -AzApplicationGatewaySku' reference documentation
New cmdlets to support the azure firewall policy
Add support for child resource RouteTables of VirtualHub
New cmdlets added:
Add-AzVirtualHubRoute
Add-AzVirtualHubRouteTable
Get-AzVirtualHubRouteTable
Remove-AzVirtualHubRouteTable
Set-AzVirtualHub
Add support for new properties Sku of VirtualHub and VirtualWANType of VirtualWan
Cmdlets updated with optional parameters:
New -AzVirtualHub : added parameter Sku
Update-AzVirtualHub : added parameter Sku
New -AzVirtualWan : added parameter VirtualWANType
Update-AzVirtualWan : added parameter VirtualWANType
Add support for EnableInternetSecurity property for HubVnetConnection, VpnConnection and
ExpressRouteConnection
New cmdlets added:
Update-AzureRmVirtualHubVnetConnection
Cmdlets updated with optional parameters:
New -AzureRmVirtualHubVnetConnection : added parameter EnableInternetSecurity
New -AzureRmVpnConnection : added parameter EnableInternetSecurity
Update-AzureRmVpnConnection : added parameter EnableInternetSecurity
New -AzureRmExpressRouteConnection : added parameter EnableInternetSecurity
Set-AzureRmExpressRouteConnection : added parameter EnableInternetSecurity
Add support for Configuring TopLevel WebApplicationFirewall Policy
New cmdlets added:
New -AzApplicationGatewayFirewallPolicySetting
New -AzApplicationGatewayFirewallPolicyExclusion
New -AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride
New -AzApplicationGatewayFirewallPolicyManagedRuleOverride
New -AzApplicationGatewayFirewallPolicyManagedRule
New -AzApplicationGatewayFirewallPolicyManagedRuleSet
Cmdlets updated with optional parameters:
New -AzApplicationGatewayFirewallPolicy : added parameter PolicySetting, ManagedRule
Added support for Geo-Match operator on CustomRule
Added GeoMatch to the operator on the FirewallCondition
Added support for perListener and perSite Firewall policy
Cmdlets updated with optional parameters:
New -AzApplicationGatewayHttpListener : added parameter FirewallPolicy, FirewallPolicyId
New -AzApplicationGatewayPathRuleConfig : added parameter FirewallPolicy, FirewallPolicyId
Fix required subnet with name AzureBastionSubnet in 'PSBastion' can be case insensitive
Support for Destination FQDNs in Network Rules and Translated FQDN in NAT Rules for Azure Firewall
Add support for top level resource RouteTables of IpGroup
New cmdlets added:
New -AzIpGroup
Remove-AzIpGroup
Get-AzIpGroup
Set-AzIpGroup
[Link]
Remove Add-AzServiceFabricApplicationCertificate cmdlet as this scenario is covered by Add-AzVmssSecret.
[Link]
Added support for restore of dropped databases on Managed Instances.
Deprecated from code old auditing cmdlets.
Removed deprecated aliases:
Get-AzSqlDatabaseIndexRecommendations (use Get-AzSqlDatabaseIndexRecommendation instead)
Get-AzSqlDatabaseRestorePoints (use Get-AzSqlDatabaseRestorePoint instead)
Remove Get-AzSqlDatabaseSecureConnectionPolicy cmdlet
Remove aliases for deprecated Vulnerability Assessment Settings cmdlets
Deprecate Advanced Threat Detection Settings cmdlets
Adding cmdlets to Disable and enable sensitivity recommendations on columns in a database.
[Link]
Support enable Large File share when create or update Storage account
New -AzStorageAccount
Set-AzStorageAccount
When close/get File handle, skip check the input path is File directory or File, to avoid failure with object in
DeletePending status
Get-AzStorageFileHandle
Close-AzStorageFileHandle

2.8.0 - October 2019


General
[Link] 1.0.0 release
[Link]
Update telemetry and url rewriting for generated modules, fix windows unit tests.
[Link]
Set-AzApiManagementApi - Added support for Updating Api into ApiVersionSet
Fix for issue [Link]
[Link]
Fixed New -AzureAutomationSoftwareUpdateConfiguration cmdlet for Linux reboot setting parameter.
[Link]
Get-AzBatchNodeAgentSku is deprecated and will be replaced by Get-AzBatchSupportImage in version
2.0.0.
[Link]
Add Priority, EvictionPolicy, and MaxPrice parameters to New -AzVM and New -AzVmss cmdlets
Fix warning message and help document for Add-AzVMAdditionalUnattendContent and Add-
AzVMSshPublicKey cmdlets
Fix -skipVmBackup exception for Linux VMs with managed disks for Set-AzVMDiskEncryptionExtension.
Fix bug in update encryption settings in Set-AzVMDiskEncryptionExtension, two pass scenario.
[Link]
Adding CRUD commands for ADF V2 data flow: Set-AzDataFactoryV2DataFlow, Remove-
AzDataFactoryV2DataFlow, and Get-AzDataFactoryV2DataFlow.
Adding action commands for ADF V2 data flow debug Session: Start-AzDataFactoryV2DataFlowDebugSession,
Get-AzDataFactoryV2DataFlowDebugSession, Add-AzDataFactoryV2DataFlowDebugSessionPackage, Invoke-
AzDataFactoryV2DataFlowDebugSessionCommand and Stop-AzDataFactoryV2DataFlowDebugSession.
Update ADF .Net SDK version to 4.2.0
[Link]
Fix account validation so that accounts with '-' can be passed without domain
[Link]
Updated the powershell version to 1.0.0
Updated the SDK version to 1.0.2
Update in tests to refer to new SDK version
Updated the output structure from nested to flattened.
[Link]
Add new routing source: DigitalTwinChangeEvents
Minor bug fix: Get-AzIothub not returning subscriptionId
[Link]
New action group receivers added for action group -ItsmReceiver -VoiceReceiver -ArmRoleReceiver -
AzureFunctionReceiver -LogicAppReceiver -AutomationRunbookReceiver -AzureAppPushReceiver
Use common alert schema enabled for the receivers. This is not applicable for SMS, Azure App push , ITSM and
Voice recievers
Webhooks now supports Azure active directory authentication .
[Link]
Add new cmdlet Get-AzAvailableServiceAlias which can be called to get the aliases that can be used for Service
Endpoint Policies.
Added support for the adding traffic selectors to Virtual Network Gateway Connections
New cmdlets added:
New -AzureRmTrafficSelectorPolicy
Cmdlets updated with optional parameter -TrafficSelectorPolicies -New -
AzureRmVirtualNetworkGatewayConnection -Set-AzureRmVirtualNetworkGatewayConnection
Add support for ESP and AH protocols in network security rule configurations
Updated cmdlets:
Add-AzNetworkSecurityRuleConfig
New -AzNetworkSecurityRuleConfig
Set-AzNetworkSecurityRuleConfig
Improve handling of exceptions in Cortex cmdlets
New Generations and SKUs for VirtualNetworkGateways
Introduce new Generations for VirtualNetworkGateways.
Introduce new high throughput SKUs for VirtualNetworkGateways.
[Link]
Updated 'Set-AzRedisCache' reference documentation to include missing values for '-Size' parameter
[Link]
Add support for setting Active Directory Administrator on Managed Instance
[Link]
Upgrade Storage Client Library to 11.1.0
List containers with Management plane API, will list with NextPageLink
Get-AzRmStorageContainer
List Storage accounts from subscription, will list with NextPageLink
Get-AzStorageAccount
[Link]
Fix Issue 9810 in Reset-AzStorageSyncServerCertificate.
[Link]
Set-AzWebApp updating ASP of an app was failing

2.7.0 - September 2019


[Link]
Update '-Format' parameter description in 'Set-AzApiManagementPolicy' reference documentation
Removed references of deprecated cmdlet 'Update-AzApiManagementDeployment' from reference
documentation. Use 'Set-AzApiManagement' instead.
[Link]
Fixed example typo in reference documentation for 'Register-AzAutomationDscNode'
Added clarification on OS restriction to Register-AzAutomationDSCNode
Fixed Start-AzAutomationRunbook cmdlet Null reference exception for -Wait option.
[Link]
Add UploadSizeInBytes parameter tp New -AzDiskConfig
Add Incremental parameter to New -AzSnapshotConfig
Add a low priority virtual machine feature:
MaxPrice, EvictionPolicy and Priority parameters are added to New -AzVMConfig.
MaxPrice parameter is added to New -AzVmssConfig, Update-AzVM and Update-AzVmss cmdlets.
Fix VM reference issue for Get-AzAvailabilitySet cmdlet when it lists all availability sets in the subscription.
Fix the null exception for Get-AzRemoteDesktopFile.
Fix VHD Seek method for end-relative position.
Fix UltraSSD issue for New -AzVM and Update-AzVM.
[Link]
Adding 3 new commands for ADF V2 - Add-AzDataFactoryV2TriggerSubscription, Remove-
AzDataFactoryV2TriggerSubscription, and Get-AzDataFactoryV2TriggerSubscriptionStatus
Updated ADF .Net SDK version to 4.1.3
[Link]
Call out breaking changes
[Link]
Add support to invoke failover for an IotHub to the geo-paired disaster recovery region.
Add support to manage message enrichment for an IotHub. New cmdlets are:
Add-AzIotHubMessageEnrichment
Get-AzIotHubMessageEnrichment
Remove-AzIotHubMessageEnrichment
Set-AzIotHubMessageEnrichment
[Link]
Pointing to the most recent Monitor SDK, i.e. 0.24.1-preview
Adds non-braking changes to the Metrics cmdlets, i.e. the Unit enumeration supports several new values.
These are read-only cmdlets, so there would be no change in the input of the cmdlets.
The api-version of the ActionGroups requests is now 2019-06-01, before it was 2018-03-01. The
scenario tests have been updated to accommodate for this change.
The constructors for the classes EmailReceiver and WebhookReceiver added one new mandatory
argument, i.e. a Boolean value called useCommonAlertSchema. Currently, the value is fixed to false to
hide this breaking change from the cmdlets. NOTE: this is a temporary change that must be validated by
the Alerts team.
The order of the arguments for the constructor of the class Source (related to the
ScheduledQueryRuleSource class) changed from the previous SDK. This change required two unit
tests to the be fixed: they compiled, but failed to pass the tests.
The order of the arguments for the constructor of the class AlertingAction (related to the
ScheduledQueryRuleSource class) changed from the previous SDK. This change required two unit
tests to the be fixed: they compiled, but failed to pass the tests.
Support Dynamic Threshold criteria for metric alert V2
New -AzMetricAlertRuleV2Criteria: now creats dynamic threshold criteria also
Add-AzMetricAlertRuleV2: now accept dynamic threshold criteria also
Improvements in Scheduled Query Rule cmdlets (SQR )
Cmdlets will accept 'Location' paramater in both formats, either the location (e.g. eastus) or the location display
name (e.g. East US )
Illustrated 'Enabled' parameter in help files properly
Added examples for 'ActionGroup' optional parameter
Overall improved help files
Fix bug in determining scope type for 'Set-AzActionRule'
[Link]
Fix incorrect example in 'New -AzApplicationGateway' reference documentation
Add note in 'Get-AzNetworkWatcherPacketCapture' reference documentation about retrieving all properties for
a packet capture
Fixed example in 'Test-AzNetworkWatcherIPFlow' reference documentation to correctly enumerate NICs
Improved cloud exception parsing to display additional details if they are present
Improved cloud exception parsing to handle additional type of SDK exception
Fixed incorrect mapping of Security Rule models
Added properties to network interface for private ip feature
Added property 'PrivateEndpoint' as type of PSResourceId to PSNetworkInterface
Added property 'PrivateLinkConnectionProperties' as type of
PSIpConfigurationConnectivityInformation to PSNetworkInterfaceIPConfiguration
Added new model class PSIpConfigurationConnectivityInformation
Added new ApplicationRuleProtocolType 'mssql' for Azure Firewall resource
MultiLink support in Virtual WAN
New cmdlets
New -AzVpnSiteLink
New -AzVpnSiteLinkConnection
Updated cmdlet:
New -VpnSite
Update-VpnSite
New -VpnConnection
Update-VpnConnection
Fixed documents for some PowerShell examples to use Az cmdlets instead of AzureRM cmdlets
[Link]
Update AzureVMpolicy Object with ProtectedItemsCount Attribute
Added Tests for VM policy and Original Storage Account Restore
[Link]
Fix bug where New -AzRoleAssignment could not be called without parameter Scope.
[Link]
Fixed typo in example for 'Update-AzServiceFabricReliability' reference documentation
Adding new cmdlets to manage appliaction and services:
New -AzServiceFabricApplication
New -AzServiceFabricApplicationType
New -AzServiceFabricApplicationTypeVersion
New -AzServiceFabricService
Update-AzServiceFabricApplication
Get-AzServiceFabricApplication
Get-AzServiceFabricApplicationType
Get-AzServiceFabricApplicationTypeVersion
Get-AzServiceFabricService
Remove-AzServiceFabricApplication
Remove-AzServiceFabricApplicationType
Remove-AzServiceFabricApplicationTypeVersion
Remove-AzServiceFabricServic
Upgraded Service Fabric SDK to version 1.2.0 which uses service fabric resource provider api-version 2019-03-
01.
[Link]
Add Update, Restart, CheckNameAvailability, GetUsage Cmdlets
[Link]
Update example in reference documentation for 'Get-AzSqlElasticPool'
Added vCore example to creating an elastic pool (New -AzSqlElasticPool).
Remove the validation of EmailAddresses and the check that EmailAdmins is not false in case EmailAddresses is
empty in Set-AzSqlServerAdvancedThreatProtectionPolicy and Set-
AzSqlDatabaseAdvancedThreatProtectionPolicy
Enabled removal of server/database auditing settings when multiple diagnostic settings that enable audit
category exist.
Fix email addresses validation in multiple Sql Vulnerability Assessment cmdlets (Update-
AzSqlDatabaseVulnerabilityAssessmentSetting, Update-AzSqlServerVulnerabilityAssessmentSetting, Update-
AzSqlInstanceDatabaseVulnerabilityAssessmentSetting and Update-
AzSqlInstanceVulnerabilityAssessmentSetting).
[Link]
Updated example in reference documentation for 'Get-AzStorageAccountKey'
In upload/Downalod Azure File,support perserve the source File SMB properties (File Attributtes, File Creation
Time, File Last Write Time) in the destination file
Set-AzStorageFileContent
Get-AzStorageFileContent
Fix Upload block blob with properties/metadate fail on container enabled ImmutabilityPolicy.
Set-AzStorageBlobContent
Support manage Azure File shares with Management plane API
New -AzRmStorageShare
Get-AzRmStorageShare
Update-AzRmStorageShare
Remove-AzRmStorageShare
[Link]
Fixing issue where webapp Tags were getting deleted when migrating App to new ASPwhere webapp Tags
were getting deleted when migrating App to new ASP
Fixing the Publish-AzureWebapp to work across Linux and windows
Update example in 'Get-AzWebAppPublishingProfile' reference documentation

2.6.0 - August 2019


General
Fixed miscellaneous typos across numerous modules
[Link]
Support user-assigned MSI in Azure Functiosn Authentication (#9479)
[Link]
Fix issue with output for 'Get-AzAks'
More information here: [Link]
[Link]
Fix for issue [Link]
Update .net nuget version, which does not enforce restrictions on productId, apiId, groupId and userId
Get-AzApiManagementProduct - Added support for querying products using Api.
[Link]
New-AzApiManagementApiRevision - Fix for issue where ApiRevisionDescription was not being set when
creating new api revision [Link]
Fixed typo in model 'PsApiManagementOAuth2AuthrozationServer' to
'PsApiManagementOAuth2AuthorizationServer'
[Link]
Fixed typo in help message and documentation to capitalize Windows
[Link]
Fixed a typo in CDN module conversion helper
[Link]
Add VmssId to New -AzVMConfig cmdlet
Add TerminateScheduledEvents and TerminateScheduledEventNotBeforeTimeoutInMinutes parameters to
New -AzVmssConfig and Update-AzVmss
Add HyperVGeneration property to VM image object
Add Host and HostGroup features
New cmdlets: New -AzHostGroup New -AzHost Get-AzHostGroup Get-AzHost Remove-AzHostGroup
Remove-AzHost
HostId parameter is added to New -AzVMConfig and New -AzVM
Update example in 'Invoke-AzVMRunCommand' documentation to use correct parameter name
Update '-VolumeType' description in 'Set-AzVMDiskEncryptionExtension' and 'Set-
AzVmssDiskEncryptionExtension' reference documentation
[Link]
Fix typo to capitalize 'Windows' in 'New -AzDataFactoryEncryptValue' documentation
Updated ADF .Net SDK version to 4.1.2
Add parameter 'DataProxyIntegrationRuntimeName', 'DataProxyStagingLinkedServiceName' and
'DataProxyStagingPath' for 'Set-AzureRmDataFactoryV2IntegrationRuntime' cmd to enable set up Self-Hosted
Integration Runtime as a proxy for SSIS Integration Runtime
Updated PSTriggerRun to show the triggered pipelines, message and properties, and PSActivityRun to show
the activity type
[Link]
Fix hanging of Get-DataLakeStoreDeletedItem for any errors or remote exceptions.
[Link]
Fix for issue #9658 : Typo VirtualNteworkRule parameter in Set-AzEventHubNetworkRuleSet
Fix for issue #9558 : Set-AzEventHubNamespace is using PATCH instead of PUT
added EnableKafka parameter to Set-AzEventHubNamespace cmdlet
Fix for issue #9786 : cannot create a rule with Listen only rights
[Link]
Fixed documentation typo where 'Azure' was all lowercase letters
[Link]
Fixed incorrect parameter name in help documentation
[Link]
Updated New -AzPrivateLinkServiceIpConfig
Deprecated the paramster 'PublicIpAddress' since this is never used in the server side.
Added one optional parameter 'Primary' that indicate the current ip configuration is primary one or not.
Improved handling of request error exception from SDK -Fixes the issue that previously SDK exceptions aren't
handled correctly which results in key error details not being displayed
Adjusted validation logic for Ipv6 IP Prefix to check for correct IPv6 prefix length.
Updated Get-AzVirtualNetworkSubnetConfig: Added parameter set to get by subnet resource id.
Updated description of Location parameter for AzNetworkServiceTag
[Link]
Updated documentation for 'New -AzOperationalInsightsLinuxSyslogDataSource'
Added example
Updated description for '-Name' parameter
Added an example for New -AzOperationalInsightsWindowsEventDataSource
Changed the description of the -Name parameter for New -AzOperationalInsightsWindowsEventDataSource
[Link]
Update '[Link]'
[Link]
Add support for new api version 2019-05-10 for [Link]
Add support for '[Link] = 0' for variables, resources and properties
Resources with 'condition = false' or '[Link] = 0' will be deleted in complete mode
Add an example of assigning policy at subscription level to help doc
[Link]
Fix for issue #9658 : Typo VirtualNetworkRule parameter in Set-AzServiceBusNetworkRuleSet
Fix for issue #9786 : cannot create a rule with Listen only rights
Added new command 'Test-AzServiceBusNameAvailability' to check the name availability for queue and topic
[Link]
Fix add node type cmdlet bugs:
NullReferenceException bug when resource group had other vmss not related to the service fabric
cluster. Fixes issue: [Link]
Fix bug where cmdlet failed if virtualNetwork was in a different resource group that the cluster. fixes
issue: [Link]
Deprecating Add-AzServiceFabricApplicationCertificate cmdlet
[Link]
Update documentation of old Auditing cmdlets.
[Link]
Update help for Get/Close-AzStorageFileHandle, by add more scenarios to cmdlet examples and update
parameter descriptions
Support StandardBlobTier in upload blob and copy blob
Set-AzStorageBlobContent
Start-AzStorageBlobCopy
Support Rehydrate Priority in copy blob
Start-AzStorageBlobCopy
[Link]
Add clarification around -AppSettings parameter in Set-AzWebApp and Set-AzWebAppSlot

2.5.0 - July 2019


[Link]
Update common code to use latest version of ClientRuntime
[Link]
Fix example typo in 'Remove-AzApplicationInsightsApiKey' documentation
[Link]
Fix typo in resource string
[Link]
Added NetworkRuleSet support.
[Link]
Add missing properties (ComputerName, OsName, OsVersion and HyperVGeneration) of VM instance view
object.
[Link]
Fix typo in Remove-AzContainerRegistryReplication for Replication parameter
More information here [Link]
[Link]
Updated ADF .Net SDK version to 4.1.0
Fix typo in documentation for 'Get-AzDataFactoryV2PipelineRun'
[Link]
Added new cmmdlet added for generating SAS token : New -AzEventHubAuthorizationRuleSASToken
added verification and error message for authorizationrules rights if only 'Manage' is assigned
[Link]
Added support to specify the KeySize for Certificate Policies
[Link]
Fix for Get-AzIntegrationAccountMap to list all map types
Added new MapType parameter for filtering
[Link]
Added support for api version 2019-06-01 (GA)
[Link]
Add support for private endpoint and private link service
New cmdlets
Set-AzPrivateEndpoint
Set-AzPrivateLinkService
Approve-AzPrivateEndpointConnection
Deny-AzPrivateEndpointConnection
Get-AzPrivateEndpointConnection
Remove-AzPrivateEndpointConnection
Test-AzPrivateLinkServiceVisibility
Get-AzAutoApprovedPrivateLinkService
Updated below commands for feature: PrivateEndpointNetworkPolicies/PrivateLinkServiceNetworkPolicies flag
on Subnet in Virtualnetwork
Updated New -AzVirtualNetworkSubnetConfig/Set-AzVirtualNetworkSubnetConfig/Add-
AzVirtualNetworkSubnetConfig
Added optional parameter -PrivateEndpointNetworkPoliciesFlag that configures whether to apply
network policies on private endpoint in this subnet.
Added optional parameter -PrivateLinkServiceNetworkPoliciesFlag that configures whether to
apply network policies network policies on private link service in this subnet.
AzPrivateLinkService's cmdlet parameter 'ServiceName' was renamed to 'Name' with an alias 'ServiceName'
for backward compatibility
Enable ICMP protocol for network security rule configurations
Updated cmdlets
Add-AzNetworkSecurityRuleConfig
New -AzNetworkSecurityRuleConfig
Set-AzNetworkSecurityRuleConfig
Add ConnectionProtocolType (Ikev1/Ikev2) as a configurable parameter for New -
AzVirtualNetworkGatewayConnection
Add PrivateIpAddressVersion in LoadBalancerFrontendIpConfiguration
Updated cmdlet:
New -AzLoadBalancerFrontendIpConfig
Add-AzLoadBalancerFrontendIpConfig
Set-AzLoadBalancerFrontendIpConfig
Application Gateway New -AzApplicationGatewayProbeConfig command update for supporting custom port in
Probe
Updated New -AzApplicationGatewayProbeConfig: Added optional parameter Port which is used for
probing backend server. This parameter is applicable for Standard_V2 and WAF_V2 SKU.
[Link]
Updated default version for saved searches to be 1.
Fixed custom log null regex handling
[Link]
Update '[Link]'
Update '[Link]'
Update '[Link]'
Update '[Link]'
Update '[Link]'
Update '[Link]'
Update '[Link]'
Update '[Link]'
Updated service call for Unregistering container for Azure File Share
Update '[Link]'
[Link]
Remove missing cmdlet referenced in 'New -AzResourceGroupDeployment' documentation
Updated policy cmdlets to use new api version 2019-01-01
[Link]
Added new cmmdlet added for generating SAS token : New -AzServiceBusAuthorizationRuleSASToken
added verification and error message for authorizationrules rights if only 'Manage' is assigned
[Link]
Fix missing examples for Set-AzSqlDatabaseSecondary cmdlet
Fix set Vulnerability Assessment recurring scans without providing any email addresses
Fix a small typo in a warining message.
[Link]
Update example in reference documentation for 'Get-AzStorageAccount' to use correct parameter name
[Link]
Adding Invoke-AzStorageSyncChangeDetection cmdlet.
Fix Issue 9551 for honoring TierFilesOlderThanDays
[Link]
Fixing a bug where some SiteConfig properties were not returned by Get-AzWebApp and Set-AzWebApp
Adds a new Location parameter to Get-AzDeletedWebApp and Restore-AzDeletedWebApp
Fixes a bug with cloning web app slots using New -AzWebApp -IncludeSourceWebAppSlots

2.4.0 - July 2019


[Link]
Add support for profile cmdlets
Add support for environments and data planes in generated cmdlets
Fix bug where incorrect endpoint was being used in some cases for data plane cmdlets in Windows PowerShell
[Link]
GA release of [Link]
This module is now included as a part of the roll-up Az module
[Link]
Fix for issue [Link]
Get-AzApiManagementSubscription
Added support for querying subscriptions by User and Product
Added support for querying using Scope '/', '/apis', '/apis/echo-api'
Fix for issue [Link] and [Link]
powershell/issues/8432
Import-AzApiManagementApi
Added support for specifying 'ApiVersion' and 'ApiVersionSetId' when importing Apis
[Link]
Fixed Set-AzAutomationConnectionFieldValue cmdlet bug to handle string value.
[Link]
Add HyperVGeneration parameter to New -AzImageConfig
[Link]
Updating the output of get activity runs, get pipeline runs, and get trigger runs ADF cmdlets to support Select-
Object pipe.
[Link]
Fix typo in 'New -AzEventGridSubscription' documentation
[Link]
Add support to regenerate authorization policy keys.
[Link]
Added 'RoutingPreference' to public ip tags
Improve examples for 'Get-AzNetworkServiceTag' reference documentation
[Link]
Fix null reference issue in Get-AzPolicyState
More information here: [Link]
[Link]
Fixed CustomLog datasource model returned in Get-AzOperationalInsightsDataSource
[Link]
Fix for get-policy command for IaaSVMs
[Link]

- Fix help text for Get-AzPolicyState -Top parameter


- Add client-side paging support for Get-AzPolicyAlias
- Add new parameters for Set-AzPolicyAssignment, -PolicyParameters and -PolicyParametersObject
- Handful of doc and example updates for Policy cmdlets

[Link]
Fix for issue #4938 - New -AzureRmServiceBusQueue returns BadRequest when setting MaxSizeInMegabytes
[Link]
Add Instance Failover Group cmdlets from preview release to public release
Support Azure SQL Server\Database Auditing with new cmdlets.
Set-AzSqlServerAudit
Get-AzSqlServerAudit
Remove-AzSqlServerAudit
Set-AzSqlDatabaseAudit
Get-AzSqlDatabaseAudit
Remove-AzSqlDatabaseAudit
Remove email constraints from Vulnerability Assessment settings
[Link]
Change 2 parameters '-IndexDocument' and '-ErrorDocument404Path' from required to optional in cmdlet:
Enable-AzStorageStaticWebsite
Update help of Get-AzStorageBlobContent by add an example
Show more error information when cmdlet failed with StorageException
Support create or update Storage account with Azure Files AAD DS Authentication
New -AzStorageAccount
Set-AzStorageAccount
Support list or close file handles of a file share, file directory or a file
Get-AzStorageFileHandle
Close-AzStorageFileHandle
[Link]
This module is now included as a part of the roll-up Az module

2.3.2 - June 2019


[Link]
Fix bug with incorrect URL being used in some cases for Functions calls
More information here: [Link]
Fix Issue with aliases from AzureRM to Az cmdlets
Set-AzureRmVMBootDiagnostics -> Set-AzVMBootDiagnostic
Export-AzureRMLogAnalyticThrottledRequests -> Export-AzLogAnalyticThrottledRequest
[Link]
New -AzVm and New -AzVmss simple parameter sets now accept the 'ProximityPlacementGroup' parameter.
Fix typo in 'New -AzVM' reference documentation
[Link]
Fixed a typo in 'Set-AzDnsZone' help examples.
[Link]
Updated to use the 2019-06-01 API version.
New cmdlets:
New -AzureRmEventGridDomain
Creates a new Azure Event Grid Domain.
Get-AzureRmEventGridDomain
Gets the details of an Event Grid Domain, or gets a list of all Event Grid Domains in the current
Azure subscription.
Remove-AzureRmEventGridDomain
Removes an Azure Event Grid Domain.
New -AzureRmEventGridDomainKey
Regenerates the shared access key for an Azure Event Grid Domain.
Get-AzureRmEventGridDomainKey
Gets the shared access keys used to publish events to an Event Grid Domain.
New -AzureRmEventGridDomainTopic:
Creates a new Azure Event Grid Domain Topic.
Get-AzureRmEventGridDomainTopic
Gets the details of an Event Grid Domain Topic, or gets a list of all Event Grid Domain Topics
under specific Event Grid Domain in the current Azure
Remove-AzureRmEventGridDomainTopic:
Removes an existing Azure Event Grid Domain Topic.
Updated cmdlets:
New -AzureRmEventGridSubscription/Update-AzureRmEventGridSubscription:
Add new mandatory parameters to support piping for the new Event Grid Domain and Event Grid
Domain Topic to allow creating new event subscription under these resources.
Add new mandatory parameters for specifying the new Event Grid Domain name and/or Event
Grid Domain Topic name to allow creating new event subscription under these resources.
Add new Parameter sets for domains and domain topics to allow reusing existing parameters (e.g.,
EndPointType, SubjectBeginsWith, etc).
Add new optional parameters for specifying:
Event subscription expiration date,
Advanced filtering parameters.
Add new enum for servicebusqueue as destination.
Disallow usage of 'All' in -IncludedEventType option and replace it with
Get-AzEventGridTopic, Get-AzEventGridDomain, Get-AzEventGridDomainTopic, Get-
AzEventGridSubscription:
Add new optional parameters (Top, ODataQuery and NextLink) to support results pagination and
filtering.
Remove-AzureRmEventGridSubscription
Add new mandatory parameters to support piping for Event Grid Domain and Event Grid Domain
Topic to allow removing existing event subscription under these resources.
Add new mandatory parameters for specifying the Event Grid Domain name and/or Event Grid
Domain Topic name to allow removing existing event subscription under these resources.
[Link]
New -AzFrontDoorWafMatchConditionObject
Add transforms support and new operator auto-complete value (RegEx)
New -AzFrontDoorWafManagedRuleObject
Add new auto-complete values
[Link]
Add support for Virtual Network Gateway Resource
New cmdlets
Get-AzVirtualNetworkGatewayVpnClientConnectionHealth
Add AvailablePrivateEndpointType
New cmdlets
Get-AzAvailablePrivateEndpointType
Add PrivatePrivateLinkService
New cmdlets
Get-AzPrivateLinkService
New -AzPrivateLinkService
Remove-AzPrivateLinkService
New -AzPrivateLinkServiceIpConfig
Set-AzPrivateEndpointConnection
Add PrivateEndpoint
New cmdlets
Get-AzPrivateEndpoint
New -AzPrivateEndpoint
Remove-AzPrivateEndpoint
New -AzPrivateLinkServiceConnection
Updated below commands for feature: UseLocalAzureIpAddress flag on VpnConnection
Updated New -AzVpnConnection: Added optional parameter -UseLocalAzureIpAddress to indicate that
local azure ip address should be used as source address while initiating connection.
Updated Set-AzVpnConnection: Added optional parameter -UseLocalAzureIpAddress to indicate that
local azure ip address should be used as source address while initiating connection.
Added readonly field PeeredConnections in ExpressRoute peering.
Added readonly field GlobalReachEnabled in ExpressRoute.
Added breaking change attribute to call out deprecation of AllowGlobalReach field in ExpressRouteCircuit
model
Fixed Issue 8756 Error using TargetListenerID with AzApplicationGatewayRedirectConfiguration cmdlets
Fixed bug in New -AzApplicationGatewayPathRuleConfig that prevented the rewrite ruleset from being set.
Fixed displaying of VirtualNetworkTaps in NetworkInterfaceIpConfiguration
Fixed Cortex Get cmdlets for list all part
Fixed VirtualHub reference creation for ExpressRouteGateways, VpnGateway
Added support for Availability Zones in AzureFirewall and NatGateway
Added cmdlet Get-AzNetworkServiceTag
Add support for multiple public IP addresses for Azure Firewall
Updated New -AzFirewall cmdlet:
Added parameter -PublicIpAddress which accepts one or more Public IP Address objects
Added parameter -VirtualNetwork which accepts a Virtual Network object
Added methods AddPublicIpAddress and RemovePublicIpAddress on firewall object - these
accept a Public IP Address object as input
Deprecated parameters -PublicIpName and -VirtualNetworkName
Updated below commands for feature: Set VpnClient AAD authentication options to Virtual network gateway
resource.
Updated New -AzVirtualNetworkGateway: Added optional parameters
AadTenantUri,AadAudienceId,AadIssuerUri to set VpnClient AAD authentication options on Gateway.
Updated Set-AzVirtualNetworkGateway: Added optional parameter
AadTenantUri,AadAudienceId,AadIssuerUri to set VpnClient AAD authentication options on Gateway.
Updated Set-AzVirtualNetworkGateway: Added optional switch parameter RemoveAadAuthentication to
remove VpnClient AAD authentication options from Gateway.
[Link]
Enable pergb2018 pricing tier in 'New -AzureRmOperationalInsightsWorkspace' command
[Link]
Support for additional Template Export options
Add '-SkipResourceNameParameterization' parameter to Export-AzResourceGroup
Add '-SkipAllParameterization' parameter to Export-AzResourceGroup
Add '-Resource' parameter to Export-AzResourceGroup for exported resource filtering
[Link]
Fix add certificate ByExistingKeyVault getting the wrong thumbprint in some cases
[Link]
Fix Advanced Threat Protection storage endpoint suffix
Fix Advanced Data Security enable overrides Advanced Threat Protection policy
New Cmdlets for [Link] to allow customers to add TDE keys and set TDE protector for managed
instances
Add-AzSqlInstanceKeyVaultKey
Get-AzSqlInstanceKeyVaultKey
Remove-AzSqlInstanceKeyVaultKey
Get-AzSqlInstanceTransparentDataEncryptionProtector
Set-AzSqlInstanceTransparentDataEncryptionProtector
[Link]
Support Kind FileStorage and SkuName Premium_ZRS when create Storage account
New -AzStorageAccount
Clarified description of blob immutability cmdlet
Remove-AzRmStorageContainerImmutabilityPolicy
[Link]
Optimizes Get-AzWebAppCertificate to filter by resource group on the server instead of the client
Adds -UseDisasterRecovery switch parameter to Get-AzWebAppSnapshot

2.2.0 - June 2019


[Link]
Updated cmdlets to support rulesEngine feature based on API version 2019-04-15.
[Link]
Added NoWait parameter that starts the operation and returns immediately, before the operation is completed.
Updated cmdlets: Export-AzLogAnalyticRequestRateByInterval Export-AzLogAnalyticThrottledRequest
Remove-AzVM Remove-AzVMAccessExtension Remove-AzVMAEMExtension Remove-
AzVMChefExtension Remove-AzVMCustomScriptExtension Remove-AzVMDiagnosticsExtension
Remove-AzVMDiskEncryptionExtension Remove-AzVMDscExtension Remove-
AzVMSqlServerExtension Restart-AzVM Set-AzVM Set-AzVMAccessExtension Set-
AzVMADDomainExtension Set-AzVMAEMExtension Set-AzVMBginfoExtension Set-
AzVMChefExtension Set-AzVMCustomScriptExtension Set-AzVMDiagnosticsExtension Set-
AzVMDscExtension Set-AzVMExtension Start-AzVM Stop-AzVM Update-AzVM
[Link]
Fix for #9231 - Get-AzEventHubNamespace does not return tags
Fix for #9230 - Get-AzEventHubNamespace returns ResourceGroup instead of ResourceGroupName
[Link]
Update ResourceId and InputObject for Nat Gateway
Add alias for ResourceId and InputObject
[Link]
Fix Null reference issue in Get-AzPolicyEvent
[Link]
IaaSVM policy minimum retention in days changed to 7 from 1
[Link]
Fix for issue #9182 - Get-AzServiceBusNamespace returns ResourceGroup instead of ResourceGroupName
[Link]
Fix typo in error message for 'Update-AzServiceFabricReliability'
Fix missing character in Service Fabric cmdlines
[Link]
Add DnsZonePartner Parameter for New -AzureSqlInstance cmdlet to support AutoDr for Managed Instance.
Deprecating Get-AzSqlDatabaseSecureConnectionPolicy cmdlet
Rename Threat Detection cmdlets to Advanced Threat Protection
New -AzSqlInstance -StorageSizeInGB and -LicenseType parameters are now optional.
[Link]
fixes the issue where using Set-AzWebApp and Set-AzWebAppSlot with -WebApp property was removing the
tags

2.1.0 - May 2019


[Link]
Created new Cmdlets for managing diagnostics at the global and API Scope
Get-AzApiManagementDiagnostic - Get the diagnostics configured a global or api Scope
New-AzApiManagementDiagnostic - Create new diagnostics at the global scope or api Scope
New-AzApiManagementHttpMessageDiagnostic - Create diagnostic setting for which Headers to
log and the size of Body Bytes
New-AzApiManagementPipelineDiagnosticSetting - Create Diagnostic settings for
incoming/outgoing HTTP messages to the Gateway.
New-AzApiManagementSamplingSetting - Create Sampling Setting for the requests/response for a
diagnostic
Remove-AzApiManagementDiagnostic - Remove a diagnostic entity at global or api scope
Set-AzApiManagementDiagnostic - Update a diagnostic Entity at global or api scope
Created new Cmdlets for managing Cache in ApiManagement service
Get-AzApiManagementCache - Get the details of the Cache specified by identifier or all caches
New-AzApiManagementCache - Create a new 'default' Cache or Cache in a particular azure 'region'
Remove-AzApiManagementCache - Remove a cache
Update-AzApiManagementCache - Update a cache
Created new Cmdlets for managing API Schema
New-AzApiManagementSchema - Create a new Schema for an API
Get-AzApiManagementSchema - Get the schemas configured in the API
Remove-AzApiManagementSchema - Remove the schema configured in the API
Set-AzApiManagementSchema - Update the schema configured in the API
Created new Cmdlet for generating a User Token.
New-AzApiManagementUserToken - Generate a new User Token valid for 8 hours by [Link]
for the 'GIT' user can be generated using this cmdlet./
Created a new cmdlet to retrieving the Network Status
Get-AzApiManagementNetworkStatus - Get the Network status connectivity of resources on which
API Management service depends on. This is useful when deploying ApiManagement service into a
Virtual Network and validing whether any of the dependencies are broken.
Updated cmdlet New-AzApiManagement to manage ApiManagement service
Added support for the new 'Consumption' SKU
Added support to turn the 'EnableClientCertificate' flag on for 'Consumption' SKU
The new cmdlet New-AzApiManagementSslSetting allows configuring 'TLS/SSL' setting on the
'Backend' and 'Frontend'. This can also be used to configure 'Ciphers' like '3DES' and 'ServerProtocols'
like 'Http2' on the 'Frontend' of an ApiManagement service.
Added support for configuring the 'DeveloperPortal' hostname on ApiManagement service.
Updated cmdlets Get-AzApiManagementSsoToken to take 'PsApiManagement' object as input
Updated the cmdlet to display Error Messages inline

PS D:\github\azure-powershell> Set-AzApiManagementPolicy -Context -PolicyFilePath


C:\[Link] -ApiId httpbin Set-AzApiManagementPolicy : Error Code: ValidationError Error
Message: One or more fields contain incorrect values: Error Details: [Code=ValidationError,
Message=Error in element 'log-to-eventhub' on line 3, column 10: Logger not found, Target=log-to-
eventhub]

Updated cmdlet Export-AzApiManagementApi to export APIs in 'OpenApi 3.0' format


Updated cmdlet Import-AzApiManagementApi
To import Api from 'OpenApi 3.0' document specification
To override the 'PsApiManagementSchema' property specified in any ('Swagger', 'Wadl', 'Wsdl',
'OpenApi') document.
To override the 'ServiceUrl' property specified in any document.
Updated cmdlet Get-AzApiManagementPolicy to return policy in Non-Xml escaped 'format' using 'rawxml'
Updated cmdlet Set-AzApiManagementPolicy to accept policy in Non-Xml escaped 'format' using 'rawxml'
and Xml escaped using 'xml'
Updated cmdlet New-AzApiManagementApi
To configure API with 'OpenId' authorization server.
To create an API in an 'ApiVersionSet'
To clone an API using 'SourceApiId' and 'SourceApiRevision'.
Ability to configure 'SubscriptionRequired' at the Api scope.
Updated cmdlet Set-AzApiManagementApi
To configure API with 'OpenId' authorization server.
To updated an API into an 'ApiVersionSet'
Ability to configure 'SubscriptionRequired' at the Api scope.
Updated cmdlet New-AzApiManagementRevision
To clone (copy tags, products, operations and policies) an existing revision using 'SourceApiRevision'. The
new Revision assumes the 'ApiId' of the parent.
To provide an 'ApiRevisionDescription'
To override the 'ServiceUrl' when cloning an API.
Updated cmdlet New-AzApiManagementIdentityProvider
To configure 'AAD' or 'AADB2C' with an 'Authority'
To setup 'SignupPolicy', 'SigninPolicy', 'ProfileEditingPolicy' and 'PasswordResetPolicy'
Updated cmdlet New-AzApiManagementSubscription
To account for the new SubscriptonModel using 'Scope' and 'UserId'
To account for the old subscription model using 'ProductId' and 'UserId'
Add support to enable 'AllowTracing' at the subscription level.
Updated cmdlet Set-AzApiManagementSubscription
To account for the new SubscriptonModel using 'Scope' and 'UserId'
To account for the old subscription model using 'ProductId' and 'UserId'
Add support to enable 'AllowTracing' at the subscription level.
Updated following cmdlets to accept 'ResourceId' as input
'New -AzApiManagementContext'

New -AzApiManagementContext -ResourceId


/subscriptions/subid/resourceGroups/rgName/providers/[Link]/service/con
toso

'Get-AzApiManagementApiRelease'

Get-AzApiManagementApiRelease -ResourceId
/subscriptions/subid/resourceGroups/rgName/providers/[Link]/service/con
toso/apis/echo-api/releases/releaseId

'Get-AzApiManagementApiVersionSet'

Get-AzApiManagementApiVersionSet -ResourceId
/subscriptions/subid/resourceGroups/rgName/providers/[Link]/service/con
stoso/apiversionsets/pathversionset

'Get-AzApiManagementAuthorizationServer'
'Get-AzApiManagementBackend'

Get-AzApiManagementBackend -ResourceId
/subscriptions/subid/resourceGroups/rgName/providers/[Link]/service/con
toso/backends/servicefabric

'Get-AzApiManagementCertificate'
'Remove-AzApiManagementApiVersionSet'
'Remove-AzApiManagementSubscription'
[Link]
Updated Get-AzAutomationJobOutputRecord to handle JSON and Text record values.
Fix for issue [Link]
Fix for issue [Link]
Changed behavior for Start-AzAutomationDscCompilationJob to just start the job instead of waiting for its
completion.
Fix for issue [Link]
Fix for Get-AzAutomationDscNode when using -Name returns all node. Now it returns matching node only.
[Link]
Add ProtectFromScaleIn and ProtectFromScaleSetAction parameters to Update-AzVmssVM cmdlet.
New -AzVM wimple parameter set now uses by default an available location if 'East US' is not supported
[Link]
Update the ADLS sdk to use httpclient, integrate dataplane testing with azure framework
[Link]
Fixed incorrect parameter names in help examples
[Link]
Add DisableBgpRoutePropagation flag to Effective Route Table output
Updated cmdlet:
Get-AzEffectiveRouteTable
Fix double dash in New -AzApplicationGatewayTrustedRootCertificate documentation
[Link]
Add new cmdlet Get-AzureRmDenyAssignment for retrieving deny assignments
[Link]
Rename Advanced Threat Protection cmdlets to Advanced Data Security and enable Vulnerability Assessment
by default

2.0.0 - May 2019


[Link]
Update Authentication Library to fix ADFS issues with username/password auth
[Link]
Only display Bing disclaimer for Bing Search Services.
Improve error when create account failed.
[Link]
Proximity placement group feature.
The following new cmdlets are added: New -AzProximityPlacementGroup Get-
AzProximityPlacementGroup Remove-AzProximityPlacementGroup
The new parameter, ProximityPlacementGroupId, is added to the following cmdlets: New -
AzAvailabilitySet New -AzVMConfig New -AzVmssConfig
StorageAccountType parameter is added to New -AzGalleryImageVersion.
TargetRegion of New -AzGalleryImageVersion can contain StorageAccountType.
SkipShutdown switch parameter is added to Stop-AzVM and Stop-AzVmss
Breaking changes
Set-AzVMBootDiagnostics is changed to Set-AzVMBootDiagnostic.
Export-AzLogAnalyticThrottledRequests is changed to Export-AzLogAnalyticThrottledRequests.
[Link]
First Generally Available release of Azure Deployment Manager cmdlets
[Link]
Automatic DNS NameServer Delegation
Create DNS zone cmdlet accepts parent zone name as additional optional parameter.
Adds NS records in the parent zone for newly created child zone.
[Link]
First Generally Available Release of Azure FrontDoor cmdlets
Rename WAF cmdlets to include 'Waf'
Get-AzFrontDoorFireWallPolicy --> Get-AzFrontDoorWafPolicy
New-AzFrontDoorCustomRuleObject --> New-AzFrontDoorWafCustomRuleObject
New-AzFrontDoorFireWallPolicy --> New-AzFrontDoorWafPolicy
New-AzFrontDoorManagedRuleObject --> New-AzFrontDoorWafManagedRuleObject
New-AzFrontDoorManagedRuleOverrideObject --> New-AzFrontDoorWafManagedRuleOverrideObject
New-AzFrontDoorMatchConditionObject --> New-AzFrontDoorWafMatchConditionObject
New-AzFrontDoorRuleGroupOverrideObject --> New-AzFrontDoorWafRuleGroupOverrideObject
Remove-AzFrontDoorFireWallPolicy --> Remove-AzFrontDoorWafPolicy
Update-AzFrontDoorFireWallPolicy --> Update-AzFrontDoorWafPolicy

[Link]
Removed two cmdlets:
Grant-AzHDInsightHttpServicesAccess
Revoke-AzHDInsightHttpServicesAccess
Added a new cmdlet Set-AzHDInsightGatewayCredential to replace Grant-AzHDInsightHttpServicesAccess
Update cmdlet Get-AzHDInsightJobOutput to distinguish reader role and hdinsight operator role:
Users with reader role need to specify 'DefaultStorageAccountKey' parameter explicitly, otherwise error
occurs.
Users with hdinsight operator role will not be affected.
[Link]
New cmdlets for SQR API (Scheduled Query Rule)
New -AzScheduledQueryRuleAlertingAction
New -AzScheduledQueryRuleAznsActionGroup
New -AzScheduledQueryRuleLogMetricTrigger
New -AzScheduledQueryRuleSchedule
New -AzScheduledQueryRuleSource
New -AzScheduledQueryRuleTriggerCondition
New -AzScheduledQueryRule
Get-AzScheduledQueryRule
Set-AzScheduledQueryRule
Update-AzScheduledQueryRule
Remove-AzScheduledQueryRule
More information about SQR API
Updated [Link] to include cmdlets for GenV2(non classic) metric-based alert rule
[Link]
Add support for Nat Gateway Resource
New cmdlets
New -AzNatGateway
Get-AzNatGateway
Set-AzNatGateway
Remove-AzNatGateway
Updated cmdlets - New -AzureVirtualNetworkSubnetConfigCommand - Add-
AzureVirtualNetworkSubnetConfigCommand
Updated below commands for feature: Custom routes set/remove on Brooklyn Gateway.
Updated New -AzVirtualNetworkGateway: Added optional parameter -CustomRoute to set the address
prefixes as custom routes to set on Gateway.
Updated Set-AzVirtualNetworkGateway: Added optional parameter -CustomRoute to set the address
prefixes as custom routes to set on Gateway.
[Link]
Support for querying policy evaluation details.
Add '-Expand' parameter to Get-AzPolicyState. Support '-Expand PolicyEvaluationDetails'.
[Link]
Support for Cross subscription Azure to Azure site recovery.
Marking upcoming breaking changes for Azure Site Recovery.
Fix for Azure Site Recovery recovery plan end action plan.
Fix for Azure Site Recovery Update network mapping for Azure to Azure.
Fix for Azure Site Recovery update protection direction for Azure to Azure for managed disk.
Other minor fixes.
[Link]
Fix typos in customer-facing messages
[Link]
Added new cmdlets for NetworkRuleSet of Namespace
[Link]
Upgrade to Storage Client Library 10.0.1 (the namespace of all objects from this SDK change from
'[Link].' to '[Link].')
Upgrade to [Link] 11.0.0, to support new API version 2019-04-01.
The default Storage account Kind in Create Storage account change from 'Storage' to 'StorageV2'
New -AzStorageAccount
Change the Storage account cmdlet output [Link] to be aligned with input SkuName by add '-', like
'StandardLRS' change to 'Standard_LRS'
New -AzStorageAccount
Get-AzStorageAccount
Set-AzStorageAccount
[Link]
'Kind' property will now be set for PSSite objects returned by Get-AzWebApp
Get-AzWebApp*Metrics and Get-AzAppServicePlanMetrics marked deprecated

1.8.0 - April 2019


Highlights since the last major release
General availability of Az module
For more information about the Az module, please visit the following: [Link]
Added Location, ResourceGroup, and ResourceName completers: [Link]
in-azure-powershell/
Added wildcard support to Get cmdlets for [Link] and [Link]
Added interactive and username/password authentication for Windows PowerShell 5.1 only
Added support for Python 2 runbooks in [Link]
[Link]: New cmdlets for Integration Account Assemblies and Batch Configuration
[Link]
Update Uninstall-AzureRm to correctly delete modules in Mac
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Fix issue with AEM installation if resource ids of disks had lowercase resourcegroups in resource id
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Fix documentation for wildcards
[Link]
Add SsisProperties if NodeCount not null for managed integration runtime.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated the help text for endpoint to indicate that resources should be created before using the create/update
event subscription cmdlets.
[Link]
Added new cmdlets for NetworkRuleSet of Namespace
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Fix documentation for wildcards
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
New cmdlets for GenV2(non classic) metric-based alert rule
New -AzMetricAlertRuleV2DimensionSelection
New -AzMetricAlertRuleV2Criteria
Remove-AzMetricAlertRuleV2
Get-AzMetricAlertRuleV2
Add-AzMetricAlertRuleV2
Updated Monitor SDK to version 0.22.0-preview
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Fix documentation for wildcards
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Updated table format for SQL in azure VM
Added alternate method to fetch location in AzureFileShare
Updated ScheduleRunDays in SchedulePolicy object according to timezone
[Link]
Updated cmdlets with plural nouns to singular, and deprecated plural names.
[Link]
Fix documentation for wildcards
[Link]
Replace dependency on Monitor SDK with common code
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Enhanced process of multiple columns classification.
Include sku properties (sku name, family, capacity) in response from Get-AzSqlServerServiceObjective and
format as table by default.
Ability to Get-AzSqlServerServiceObjective by location without needing a preexisting server in the region.
Support for time zone parameter in Managed Instance create.
Fix documentation for wildcards
[Link]
fixes the Set-AzWebApp and Set-AzWebAppSlot to not remove the tags on execution
Updated cmdlets with plural nouns to singular, and deprecated plural names.
Updated the WebSites SDK.
Removed the AdminSiteName property from PSAppServicePlan.

1.7.0 - April 2019


Highlights since the last major release
General availability of Az module
For more information about the Az module, please visit the following: [Link]
Added Location, ResourceGroup, and ResourceName completers: [Link]
in-azure-powershell/
Added wildcard support to Get cmdlets for [Link] and [Link]
Added interactive and username/password authentication for Windows PowerShell 5.1 only
Added support for Python 2 runbooks in [Link]
[Link]: New cmdlets for Integration Account Assemblies and Batch Configuration
[Link]
Updated Add-AzEnvironment and Set-AzEnvironment to accept parameter
AzureAnalysisServicesEndpointResourceId
[Link]
Using ServiceClient in dataplane cmdlets and removing the original authentication logic
Making Add-AzureASAccount a wrapper of Connect-AzAccount to avoid a breaking change
[Link]
Fixed New -AzAutomationSoftwareUpdateConfiguration cmdlet bug for Inclusions. Now parameter
IncludedKbNumber and IncludedPackageNameMask should work.
Bug fix for azure automation update management dynamic group
[Link]
Add HyperVGeneration parameter to New -AzDiskConfig and New -AzSnapshotConfig
Allow VM creation with galley image from other tenants.
[Link]
Fixed issue in the -Command parameter of New -AzContainerGroup which added a trailing empty argument
[Link]
Updated ADF .Net SDK version to 3.0.2
Updated Set-AzDataFactoryV2 cmdlet with extra parameters for RepoConfiguration related settings.
[Link]
Improve handling of providers for 'Get-AzResource' when providing '-ResourceId' or '-ResourceGroupName',
'-Name' and '-ResourceType' parameters
Improve error handling for 'Test-AzDeployment' and 'Test-AzResourceGroupDeployment'
Handle errors thrown outside of deployment validation and include them in output of command instead
More information here: [Link]
Add '-IgnoreDynamicParameters' switch parameter to set of deployment cmdlets to skip prompt in script and
job scenarios
More information here: [Link]
[Link]
Support Database Data Classification.
[Link]
Report detail error when create Storage context with parameter -UseConnectedAccount, but without login
Azure account
New -AzStorageContext
Support Manage Blob Service Properties of a specified Storage account with Management plane API
Update-AzStorageBlobServiceProperty
Get-AzStorageBlobServiceProperty
Enable-AzStorageBlobDeleteRetentionPolicy
Disable-AzStorageBlobDeleteRetentionPolicy
-AsJob support for Blob and file upload and download cmdlets
Get-AzStorageBlobContent
Set-AzStorageBlobContent
Get-AzStorageFileContent
Set-AzStorageFileContent

1.6.0 - March 2019


Highlights since the last major release
General availability of Az module
For more information about the Az module, please visit the following: [Link]
Added Location, ResourceGroup, and ResourceName completers: [Link]
in-azure-powershell/
Added wildcard support to Get cmdlets for [Link] and [Link]
Added interactive and username/password authentication for Windows PowerShell 5.1 only
Added support for Python 2 runbooks in [Link]
[Link]: New cmdlets for Integration Account Assemblies and Batch Configuration
[Link]
Azure automation update management change to support the following new features :
Dynamic grouping
Pre-Post script
Reboot Setting
[Link]
Fix issue with path resolution in Get-AzVmBootDiagnosticsData
Update Compute client library to 25.0.0.
[Link]
Added wildcard support to KeyVault cmdlets
[Link]
Add Threat Intelligence support for Azure Firewall
Add Application Gateway Firewall Policy top level resource and Custom Rules
[Link]
Added SnapshotRetentionInDays in Azure VM policy to support Instant RP
Added pipe support for unregister container
[Link]
Update wildcard support for Get-AzResource and Get-AzResourceGroup
Update credentials used when making generic calls to ARM
[Link]
changed Threat Detection's cmdlets param (ExcludeDetectionType) from DetectionType to string[] to make it
future proof when new DetectionTypes are added and to support autocomplete as well.
[Link]
Support Get/Set/Remove Management Policy on a Storage account
Set-AzStorageAccountManagementPolicy
Get-AzStorageAccountManagementPolicy
Remove-AzStorageAccountManagementPolicy
Add-AzStorageAccountManagementPolicyAction
New -AzStorageAccountManagementPolicyFilter
New -AzStorageAccountManagementPolicyRule
[Link]
Fix ARM template bug that breaks cloning all slots using 'New -AzWebApp -IncludeSourceWebAppSlots'

1.5.0 - March 2019


[Link]
Add 'Register-AzModule' command to support AutoRest generated cmdlets
Update examples for Connect-AzAccount
[Link]
Fixed issue when retreiving certain monthly schedules in several Azure Automation cmdlets
Fix Get-AzAutomationDscNode returning just top 20 nodes. Now it returns all nodes
[Link]
Added new Powershell cmdlets for Enable/Disable Custom Domain Https and deprecated the old ones
[Link]
Add wildcard support to Get cmdlets
[Link]
Updated ADF .Net SDK version to 3.0.1
[Link]
Fix for ListWorkflows only retrieving the first page of results
[Link]
Add wildcard support to Network cmdlets
[Link]
Added Sql server in Azure VM support
SDK Update
Removed VMappContainer check in Get-ProtectableItem
Added Name and ServerName as parameters for Get-ProtectableItem
[Link]
Add -TemplateObject parameter to deployment cmdlets
More information here: [Link]
Fix issue when piping the result of Get-AzResource to Set-AzResource
More information here: [Link]
Fix issue with JSON data type change when running Set-AzResource
More information here: [Link]
[Link]
Updating AuditingEndpointsCommunicator.
Fixing the behavior of an edge case while creating new diagnostic settings.
[Link]
Support Kind BlockBlobStorage when create Storage account - New -AzStorageAccount

1.4.0 - February 2019


[Link]
Deprecated AddAzureASAccount cmdlet
[Link]
Update help for Import-AzAutomationDscNodeConfiguration
Added configuration name validation to Import-AzAutomationDscConfiguration cmdlet
Improved error handling for Import-AzAutomationDscConfiguration cmdlet
[Link]
Added CustomSubdomainName as a new optional parameter for New -AzCognitiveServicesAccount which is
used to specify subdomain for the resource.
[Link]
Fix issue with ID parameter sets
Update Get-AzVMExtension to list all installed extension if Name parameter is not provided
Add Tag and ResourceId parameters to Update-AzImage cmdlet
Get-AzVmssVM without instance ID and with InstanceView can list VMSS VMs with instance view.
[Link]
Add cmdlets for ADL deleted item enumerate and restore
[Link]
Added new boolean property SkipEmptyArchives to Skip Empty Archives in CaptureDescription class of
Eventhub
[Link]
Fix tagging on Set-AzKeyVaultSecret
[Link]
Add in Basic sku for Integration Accounts
Add in XSLT 2.0, XSLT 3.0 and Liquid Map Types
New cmdlets for Integration Account Assemblies
Get-AzIntegrationAccountAssembly
New -AzIntegrationAccountAssembly
Remove-AzIntegrationAccountAssembly
Set-AzIntegrationAccountAssembly
New cmdlets for Integration Account Batch Configuration
Get-AzIntegrationAccountBatchConfiguration
New -AzIntegrationAccountBatchConfiguration
Remove-AzIntegrationAccountBatchConfiguration
Set-AzIntegrationAccountBatchConfiguration
Update Logic App SDK to version 4.1.0
[Link]
Update help for Get-AzMetric
[Link]
Update help example for Add-AzApplicationGatewayCustomError
[Link]
Additional support for New and Get ApplicationInsights data source.
Added new 'ApplicationInsights' kind to support Get specific and Get all ApplicationInsights data sources
for given workspace.
Added New -AzOperationalInsightsApplicationInsightsDataSource cmdlet for creating data source by
given Application-Insights resource parameters: subscription Id, resourceGroupName and name.
[Link]
Fix for issue [Link]
Fix for issue [Link]
Fix for issue [Link]
Fix bug preventing repeat creation of KeyCredentials
[Link]
Add support for SQL DB Hyperscale tier
Fixed bug where restore could fail due to setting unnecessary properties in restore request
[Link]
Correct example in Get-AzWebAppSlotMetrics

1.3.0 - February 2019


[Link]
Update to latest version of ClientRuntime
[Link]
General availability for [Link] module.
[Link]
AEM extension: Add support for UltraSSD and P60,P70 and P80 disks
Update help description for Set-AzVMBootDiagnostics
Update help description and example for Update-AzImage
[Link]
General availability for [Link] module.
[Link]
Fix tagging for resource groups
More information here: [Link]
Fix issue where Get-AzureRmRoleAssignment doesn't respect -ErrorAction
More information here: [Link]
[Link]
Add Get/Set AzSqlDatabaseBackupShortTermRetentionPolicy
Fix issue where not being logged into Azure account would result in nullref exception when executing SQL
cmdlets
Fixed null ref exception in Get-AzSqlCapability

1.2.1 - January 2019


[Link]
Release with correct version of Authentication
[Link]
Release with updated Authentication dependency
[Link]
Release with updated Authentication dependency

1.2.0 - January 2019


[Link]
Add interactive and username/password authentication for Windows PowerShell 5.1 only
Update incorrect online help URLs
Add warning message in PS Core for Uninstall-AzureRm
[Link]
Update incorrect online help URLs
[Link]
Added support for Python 2 runbooks
Update incorrect online help URLs
[Link]
Update incorrect online help URLs
[Link]
Add Invoke-AzVMReimage cmdlet
Add TempDisk parameter to Set-AzVmss
Fix the warning message of New -AzVM
[Link]
Update incorrect online help URLs
[Link]
Updated ADF .Net SDK version to 3.0.0
[Link]
Fix issue with ADLS endpoint when using MSI
More information here: [Link]
Update incorrect online help URLs
[Link]
Add Encoding format to Add-IotHubRoutingEndpoint cmdlet.
[Link]
Update incorrect online help URLs
[Link]
Update incorrect online help URLs
[Link]
Fix incorrect examples in 'New -AzADAppCredential' and 'New -AzADSpCredential' reference documentation
Fix issue where path for '-TemplateFile' parameter was not being resolved before executing resource group
deployment cmdlets
[Link]: Correct documentation for New -AzureRmPolicyDefinition -Mode default value
[Link]: Fix for issue [Link]
[Link]: Fix for issue [Link]
Fix formatting issue with 'PSResourceGroupDeployment' object
More information here: [Link]
[Link]
Rollback when a certificate is added to VMSS model but an exception is thrown this is to fix bug:
[Link]
Fix some error messages.
Fix create cluster with default ARM template for New -AzServiceFabriCluster which was not working with
migration to Az.
Fix add cluster/application certificate to only add to VM Scale Sets that correspond to the cluster by checking
cluster id in the extension.
[Link]
Update incorrect online help URLs
[Link]
Update incorrect online help URLs
Updated parameter description for LicenseType parameter with possible values
Fix for updating managed instance identity not working when it is the only updated property
Support for custom collation on managed instance
[Link]
Update incorrect online help URLs
Give detail error message when get/set classic Logging/Metric on Premium Storage Account, since Premium
Storage Account not supoort classic Logging/Metric.
Get/Set-AzStorageServiceLoggingProperty
Get/Set-AzStorageServiceMetricsProperty
[Link]
Update incorrect online help URLs
[Link]
Update incorrect online help URLs
Fixes 'New -AzWebAppSSLBinding' to upload the certificate to the correct resourcegroup+location if the app is
hosted on an ASE.
Fixes 'New -AzWebAppSSLBinding' to not overwrite the tags on binding an SSL certificate to an app

1.1.0 - January 2019


[Link]
Add 'Local' Scope to Enable-AzureRmAlias
[Link]
Name is now optional in ID parameter set for Restart/Start/Stop/Remove/Set-AzVM and Save-AzVMImage
Updated the description of ID in help files
Fix backward compatibility issue with [Link] module
[Link]
Update the sdk version of dataplane to 1.1.14 for SDK fixes.
Fix handling of negative acesstime and modificationtime for getfilestatus and liststatus, Fix async
cancellation token
[Link]
Updated to use the 2019-01-01 API version.
Update the following cmdlets to support new scenario in 2019-01-01 API version
New -AzureRmEventGridSubscription: Add new optional parameters for specifying:
Event Time-To-Live,
Maximum number of delivery attempts for the events,
Dead letter endpoint.
Update-AzureRmEventGridSubscription: Add new optional parameters for specifying:
Event Time-To-Live,
Maximum number of delivery attempts for the events,
Dead letter endpoint.
Add new enum values (namely, storageQueue and hybridConnection) for EndpointType option in New -
AzureRmEventGridSubscription and Update-AzureRmEventGridSubscription cmdlets.
Show warning message if creating or updating the event subscription is expected to entail manual action from
user.
[Link]
Updated to the latest version of the IotHub SDK
[Link]
Get-AzLogicApp lists all without specified Name
[Link]
Fix parameter set issue when providing '-ODataQuery' and '-ResourceId' parameters for 'Get-AzResource'
More information here: [Link]
Fix handling of the -Custom parameter in New/Set-AzPolicyDefinition
Fix typo in New -AzDeployment documentation
Made '-MailNickname' parameter mandatory for 'New -AzADUser'
More information here: [Link]
[Link]
Fix backward compatibility issue with [Link] module
[Link]
Converted the Storage management client dependency to the common SDK implementation.
[Link]
Set the StorageAccountName of Storage context as the real Storage Account Name, when it's created with Sas
Token, OAuth or Anonymous
New -AzStorageContext
Create Sas Token of Blob Snapshot Object with '-FullUri' parameter, fix the returned Uri to be the sanpshot Uri
New -AzStorageBlobSASToken
[Link]
Fixed a date parsing bug in 'Get-AzDeletedWebApp'
Fix backward compatibility issue with [Link] module

1.0.0 - December 2018


General
General Availability of Az Module
Online help for each module
For more details and a roadmap, see the Az Announcement page
See the Migration Guide for information on migrating from AzureRM
[Link]
Changed from [Link]
Fixed table formats for profile and context types
[Link]
Fixes for #7002
Minor breaking changes, see the Migration Guide for details
[Link]
Added the ability to see what version of the Azure Batch Node Agent is running on each of the VMs in a pool,
via the new NodeAgentInformation property on PSComputeNode .
The Caching default for PSDataDisk is now ReadWrite instead of None .
Minor breaking changes, see the Migration Guide for details
[Link]
Combines Billing, Consumption, and UsageAggregates cmdlets, see the Migration Guide for details
[Link]
Add completers for SkuName and Typem available on New -AzureRmCognitiveServicesAccount operation
Removed GetSkusWithAccountParamSetName parameter set from Get-AzCognitiveServicesAccountSkus
[Link]
Added ManagedIdentity support
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Renamed [Link] to [Link] and other minor breaking changes, see the Migration Guide for details
[Link]
Removed the deprecated 'PurgeDisabled' property from output types
[Link]
Included cmdlets from [Link] module
[Link]
Remove deprecated -Tags alias from New -AzMediaService
[Link]
Added support for the configuring RewriteRuleSets in the Application Gateway - New cmdlets added: - Add-
AzureRmApplicationGatewayRewriteRuleSet - Get-AzureRmApplicationGatewayRewriteRuleSet - New -
AzureRmApplicationGatewayRewriteRuleSet - Remove-AzureRmApplicationGatewayRewriteRuleSet - Set-
AzureRmApplicationGatewayRewriteRuleSet - New -AzureRmApplicationGatewayRewriteRule - New -
AzureRmApplicationGatewayRewriteRuleActionSet - New -
AzureRmApplicationGatewayRewriteRuleHeaderConfiguration - Cmdlets updated with optional parameter -
RewriteRuleSet - New -AzureRmApplicationGateway - New -AzureRmApplicationGatewayRequestRoutingRule -
Add-AzureRmApplicationGatewayRequestRoutingRule - New -AzureRmApplicationGatewayPathRuleConfig -
Add-AzureRmApplicationGatewayUrlPathMapConfig - New -AzureRmApplicationGatewayUrlPathMapConfig
Added KeyVault Support to Application Gateway using Identity. - Cmdlets updated with optonal parameter -
KeyVaultSecretId, -KeyVaultSecret - Add-AzApplicationGatewaySslCertificate - New -
AzApplicationGatewaySslCertificate - Set-AzApplicationGatewaySslCertificate - New -AzApplicationGateway
cmdlet updated with optional parameter -UserAssignedIdentity
Minor breaking changes, see the Migration Guide for details
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Changed module name to [Link]
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Support specfying certificate by common name and thumbprint
Mnor breaking changes, see the Migration Guide for details
[Link]
General Availability for PowerShell cmdlets for SIgnalR
[Link]
Added new Data_Exfiltration and Unsafe_Action detection types to Threat Detection's cmdlets
Updated documentation examples for Sql Auditing cmdlets
Minor breaking changes, see the Migration Guide for details
[Link]
Minor breaking changes, see the Migration Guide for details
[Link]
Minor breaking changes, see the Migration Guide for details

0.7.0 - December 2018


General
Minor changes for upcoming AzureRM to Az transition
[Link]
Add support for UltraSSD and Gallery Images in the simple param sets for New-AzVm(ss) cmdlets.
[Link]
Fix the trailing slash of the domain of adls account
[Link]
Fixed some broken links
In the New -AzureRmFrontDoor and Set-AzureRmFrontDoor articles, fixed the link to the New -
AzureRmFrontDoorHealthProbeSettingObject cmdlet article.
In the New -AzureRmFrontDoorManagedRuleObject article, fixed the link to the New -
AzureRmFrontDoorRuleGroupOverrideObject cmdlet article.
[Link]
Added client side validations for Azure File Share restore operations.
Made storageAccountName and storageAccountResourceGroupName optional for afs restore.
[Link]
Fix for [Link]
Update Get-AzureRmRoleAssignment to use the subscription scope if it is provided when requesting
classic administrators.
[Link]
Minor changes for upcoming AzureRM to Az transition
Fixed issue with using Get-AzureRmSqlDatabaseVulnerabilityAssessment with DotNet core
Modified documentation of help messages related to SQL Auditing cmdlets.
[Link]
Add -EnableHierarchicalNamespace to New -AzureRmStorageAccount
Fix issue that Copy File cmdlet can't reuse source context in destination when not input -DestContext
Start-AzureStorageFileCopy
Support Static Website configuration
Enable-AzureStorageStaticWebsite
Disable-AzureStorageStaticWebsite
[Link]
Set-AzureRmWebApp and Set-AzureRmWebAppSlot
New parameter (-AzureStoragePath) added to specify Azure Storage paths to be mounted in Windows
and Linux container apps. Use the output of the new cmdlet New -AzureRmWebAppAzureStoragePath as
a parameter to set the Azure Storage paths.

0.6.1 - November 2018


[Link]
Update dependencies for type mapping issue
[Link]
Swagger based Azure Automation cmdlets
Added Update Management cmdlets
Added Source Control cmdlets
Added Remove-AzureRmAutomationHybridWorkerGroup cmdlet
Fixed the DSC Register Node command
[Link]
Fixed identity issue for SystemAssigned identity
Update dependencies for type mapping issue
[Link]
Update dependencies for type mapping issue
[Link]
update the examples description for marketplace cmdlets
[Link]
Added cmdlet New -AzureRmApplicationGatewayCustomError, Add-
AzureRmApplicationGatewayCustomError, Get-AzureRmApplicationGatewayCustomError, Set-
AzureRmApplicationGatewayCustomError, Remove-AzureRmApplicationGatewayCustomError, Add-
AzureRmApplicationGatewayHttpListenerCustomError, Get-
AzureRmApplicationGatewayHttpListenerCustomError, Set-
AzureRmApplicationGatewayHttpListenerCustomError, Remove-
AzureRmApplicationGatewayHttpListenerCustomError
Added ICMP back to supported AzureFirewall Network Protocols
Update cmdlet Test-AzureRmNetworkWatcherConnectivity, add validation on destination id, address and port.
Fix issues with memory usage in VirtualNetwork map
[Link]
Fix for modifying policy for a protected file share.
Converted policy timezone to uppercase.
[Link]
Corrected example in New -AzureRmRecoveryServicesAsrProtectableItem
Update dependencies for type mapping issue
[Link]
Added optional Parameter -KeyValue to New -AzureRmRelayKey cmdlet, which enables user to provide
KeyValue.
[Link]
Update help documentation for resource identity related parameters in New-AzureRmPolicyAssignment and
Set-AzureRmPolicyAssignment
Add an example for New -AzureRmPolicyDefinition that uses -Metadata
Fix to allow case preservation in Tag keys in NetStandard: #7678 #7703
[Link]
Add deprecation messages for upcoming breaking changes
[Link]
Added new cmdlets for CRUD operations on Azure Sql Database Managed Instance and Azure Sql Managed
Database
Get-AzureRmSqlInstance
New -AzureRmSqlInstance
Set-AzureRmSqlInstance
Remove-AzureRmSqlInstance
Get-AzureRmSqlInstanceDatabase
New -AzureRmSqlInstanceDatabase
Restore-AzureRmSqlInstanceDatabase
Remove-AzureRmSqlInstanceDatabase
Enabled Extended Auditing Policy management on a server or a database.
New parameter (PredicateExpression) was added to enable filtering of audit logs.
Cmdlets were modified to use SQL clients instead of Legacy clients.
Set-AzureRmSqlServerAuditing.
Get-AzureRmSqlServerAuditing.
Set-AzureRmSqlDatabaseAuditing.
Get-AzureRmSqlDatabaseAuditing.
Fixed issue with using Update-AzureRmSqlDatabaseVulnerabilityAssessmentSettings with storage account
name parameter set

0.5.0 - November 2018


General
Added Resource Completers to many core cmdlets - these alloow you to tab through existing resource names
when invoking cmdlets interactively
[Link]
Update common code to use latest version of ClientRuntime
Rename param TenantId in cmdlet Connect-AzAccount to Tenant and add an alias for TenantId
Updated TenantId description for Connect-AzAccount
Fix error message for failed login when providing tenant domain
[Link]
Fix issue with context name clashing for accounts with no subscriptions in tenant
[Link]
Fix issue with DataLake endpoints when using MSI
[Link]
Fix issue where 'Disconnect-AzAccount' would throw if not connected
[Link]
[Link]
Add Get-AzCognitiveServicesAccountSkus operation.
[Link]
Add Add-AzVmssVMDataDisk and Remove-AzVmssVMDataDisk cmdlets
Get-AzVMImage shows AutomaticOSUpgradeProperties
Fixed SetAzVMChefExtension -BootstrapOptions and -JsonAttribute option values are not setting in json
format.
[Link]
Update the DataLake package to 1.1.10.
Add default Concurrency to multithreaded operations.
[Link]
Fixed issue #7267 (Autoscale area)
Issues with creating a new autoscale rule not properly setting enumerated parameters (would always set
them to the default value).
Fixed issue #7513 [Insights] Set-AzDiagnosticSetting requires explicit specification of categories during creation
of setting
Now the cmdlet does not require explicit indication of the categories to enable during creation, i.e. it
works as it is documented
[Link]
Changed PeeringType to be a mandatory parameter for the following cmdlets:-
Get-AzExpressRouteCircuitRouteTable
Get-AzExpressRouteCircuitARPTable
Get-AzExpressRouteCircuitRouteTableSummary
Get-AzExpressRouteCrossConnectionArpTable
Get-AzExpressRouteCrossConnectionRouteTable
Get-AzExpressRouteCrossConnectionRouteTableSummary
[Link]
Added policy remediation cmdlets
[Link]
Fix for [Link]
Allow listing resources using the '-ResourceId' parameter for 'Get-AzResource'
[Link]
Added MigrationState read-only property to PSServiceBusMigrationConfigurationAttributes which will help to
know the Migration state.
[Link]
Fix add certificate to Linux Vmss.
Fix 'Add-AzServiceFabricClusterCertificate'
Using correct thumbprint from new certificate (Azure/service-fabric-issues#932).
Display exception correctly (Azure/service-fabric-issues#1054).
Fix 'Update-AzServiceFabricDurability' to update cluster configuration before starting Vmss CreateOrUpdate
operation.

0.4.0 - October 2018


[Link]
Fix issue with Get-AzSubscription in CloudShell
Update common code to use latest version of ClientRuntime
[Link]
Added new sizes to the whitelist of VM sizes for which accelerated networking will be turned on when using the
simple param set for 'New -AzVm'
Added ResourceName argument completer to all cmdlets.
[Link]
Adding support for Virtual Network Rules
Get-AzDataLakeStoreVirtualNetworkRule: Gets or Lists Azure Data Lake Store virtual network rule.
Add-AzDataLakeStoreVirtualNetworkRule: Adds a virtual network rule to the specified Data Lake Store
account.
Set-AzDataLakeStoreVirtualNetworkRule: Modifies the specified virtual network rule in the specified
Data Lake Store account.
Remove-AzDataLakeStoreVirtualNetworkRule: Deletes an Azure Data Lake Store virtual network rule.
[Link]
Update cmdlet Test-AzNetworkWatcherConnectivity, pass the protocol value to backend.
Added ResourceName argument completer to all cmdlets.
[Link]
Fix isssue where Get-AzRoleDefinition throws an unintelligible exception (when the default profile has no
subscription in it and no scope is specified) by adding a meaningful exception in the scenario. Also set the
default param set to 'RoleDefinitionNameParameterSet'.

0.3.0 - October 2018


[Link]
Fix Copy Blob/File won't copy metadata when destination has metadata issue
Start-AzureStorageBlobCopy
Start-AzureStorageFileCopy
Support get the Storage resource usage of a specific location, and add warning message for get global Storage
resource usage is obsolete.
Get-AzStorageUsage
[Link]
Support Get-AzCognitiveServicesAccountSkus without an existing account.
[Link]
Fix Get-AzVM -ResourceGroupName to return more than 50 results if needed
Added an example of the 'SimpleParameterSet' to New -AzVmss cmdlet help.
Fixed a typo in the Azure Disk Encryption progress message
Az.DataFactoryV2
Updated the ADF .Net SDK version to 2.3.0.
[Link]
Added NetworkProfile functionality. new cmdlets added
Get-AzNetworkProfile
New -AzNetworkProfile
Remove-AzNetworkProfile
Set-AzNetworkProfile
New -AzContainerNicConfig
New -AzContainerNicConfigIpConfig
Added service association link on Subnet Model
Added cmdlet New -AzVirtualNetworkTap, Get-AzVirtualNetworkTap, Set-AzVirtualNetworkTap, Remove-
AzVirtualNetworkTap
Added cmdlet Set-AzNEtworkInterfaceTapConfig, Get-AzNEtworkInterfaceTapConfig, Remove-
AzNEtworkInterfaceTapConfig
[Link]
Allow any string as Size parameter going forward. Add P5 in PSArgumentCompleter popup
[Link]
Add missing -Mode parameter to Set-AzPolicyDefinition
Fix Get-AzProviderOperation commandlet bug for operations with Origin containing User
[Link]
Fixed issue where some backup cmdlets would not recognize the current azure subscription
[Link]
New Cmdlet Get-AzWebAppContainerContinuousDeploymentUrl - Gets the Container Continuous
Deployment Webhook URL
New Cmdlets New -AzWebAppContainerPSSession and Enter-WebAppContainerPSSession - Initiates a
PowerShell remote session into a windows container app

0.2.0 - September 2018


Initial Release
Migration Guide for Az 2.0.0
2/4/2020 • 5 minutes to read • Edit Online

This document describes the changes between the 1.0.0 and 2.0.0 versions of Az

Table of Contents
Module breaking changes
[Link]
[Link]
[Link]

Module breaking changes


[Link]
Removed Managed Parameter from New-AzAvailabilitySet and Update-AzAvailabilitySet cmdlets in favor
of using Sku = Aligned
Before

Update-AzAvailabilitySet -Managed

After

Update-AzAvailabilitySet -Sku Aligned

For consistency, removed Image parameter from 'ByName' and 'ByResourceId' parameter sets in
Update-AzImage

Before
Note that the below code is functional, but the passed-in ImageName is not used, so removing this
parameter has no functional impact.

Update-AzImage -ResourceGroupName $Rg -ImageName $Name -Image $Image -Tag $tags

Update-AzImage -ResourceId $Id -Image $Image -Tag $tags

After

Update-AzImage -ResourceGroupName $Rg -ImageName $Name -Tag $tags

Update-AzImage -ResourceId $Id -Tag $tags

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in
Restart-AzVM

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.
Restart-AzVM -InputObject $VM -Name $Name

Restart-AzVM -ResourceId $Id -Name $Name

After

Restart-AzVM -InputObject $VM

Restart-AzVM -ResourceId $Id

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in
Start-AzVM

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.

Start-AzVM -InputObject $VM -Name $Name

Start-AzVM -ResourceId $Id -Name $Name

After

Start-AzVM -InputObject $VM

Start-AzVM -ResourceId $Id

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in
Stop-AzVM

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.

Stop-AzVM -InputObject $VM -Name $Name

Stop-AzVM -ResourceId $Id -Name $Name

After

Stop-AzVM -InputObject $VM

Stop-AzVM -ResourceId $Id

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in
Remove-AzVM

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.

Remove-AzVM -InputObject $VM -Name $Name

Remove-AzVM -ResourceId $Id -Name $Name


After

Remove-AzVM -InputObject $VM

Remove-AzVM -ResourceId $Id

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in Set-AzVM

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.

Set-AzVM -InputObject $VM -Name $Name ...

Set-AzVM -ResourceId $Id -Name $Name ...

After

Set-AzVM -InputObject $VM ...

Set-AzVM -ResourceId $Id ...

For consistency, removed Name parameter from 'ByObject' and 'ByResourceId' parameter sets in
Save-AzVMImage

Before
Note that the below code is functional, but the passed-in Name is not used, so removing this parameter has
no functional impact.

Save-AzVMImage -InputObject $VM -Name $Name ...

Save-AzVMImage -ResourceId $Id -Name $Name ...

After

Save-AzVMImage -InputObject $VM ...

Save-AzVMImage -ResourceId $Id ...

Added ProtectionPolicy property to encapsulate ProtectFromScaleIn property in


PSVirtualMachineScaleSetVM

Before

$vmss = Get-AzVMssVM ...


$[Link] = $true

$vmss = Update-AzVMssVM ...


$[Link] = $true

$vmss = Remove-AzVMssVMDataDisk ...


$[Link] = $true

After
$vmss = Get-AzVMssVM ...
$[Link] = $true

$vmss = Update-AzVMssVM ...


$[Link] = $true

$vmss = Remove-AzVMssVMDataDisk ...


$[Link] = $true

Added EncryptionSettingsCollection Property to enclose EncryptionSettings property in PSDisk

Before

$disk = New-AzDisk ... | Set-AzDiskDiskEncrytionKey ...


$[Link]

$disk = New-AzDisk ... | Set-AzDiskKeyEncrytionKey ...


$[Link]

$update = New-AzDiskUpdateConfig | Set-AzDiskUpdateDiskEncryptionKey ...


$[Link]

$update = New-AzDiskUpdateConfig | Set-AzDiskUpdateKeyEncryptionKey ...


$[Link]

After

$disk = New-AzDisk ... | Set-AzDiskDiskEncrytionKey ...


$[Link]

$disk = New-AzDisk ... | Set-AzDiskKeyEncrytionKey ...


$[Link]

$update = New-AzDiskUpdateConfig | Set-AzDiskUpdateDiskEncryptionKey ...


$[Link]

$update = New-AzDiskUpdateConfig | Set-AzDiskUpdateKeyEncryptionKey ...


$[Link]

Added EncryptionSettingsCollection Property to enclose EncryptionSettings property in PSSnapshot

Before

$snap = New-AzSnapshotConfig ... | Set-AzSnapshotDiskEncryptionKey ...


$[Link]

$snap = New-AzSnapshotConfig ... | Set-AzSnapshotKeyEncryptionKey ...


$[Link]

$update = New-AzSnapshotUpdateConfig ... | Set-AzSnapshotUpdateDiskEncryptionKey ...


$[Link]

$update = New-AzSnapshotUpdateConfig ... | Set-AzSnapshotUpdateKeyEncryptionKey ...


$[Link]

After
$snap = New-AzSnapshotConfig ... | Set-AzSnapshotDiskEncryptionKey ...
$[Link]

$snap = New-AzSnapshotConfig ... | Set-AzSnapshotKeyEncryptionKey ...


$[Link]

$update = New-AzSnapshotUpdateConfig ... | Set-AzSnapshotUpdateDiskEncryptionKey ...


$[Link]

$update = New-AzSnapshotUpdateConfig ... | Set-AzSnapshotUpdateKeyEncryptionKey ...


$[Link]

Removed VirtualMachineProfile property from PSVirtualMachineScaleSet

Before

$vmss = New-AzVMSSConfig ...


$[Link] = $true

After

$vmss = New-AzVMSSConfig ...


$[Link] = $true

Cmdlet Set-AzVMBootDiagnostic removed alias to Set-AzVMBootDiagnostics

Before
Using deprecated alias

Set-AzVMBootDiagnostics

After

Set-AzVMBootDIagnostic

Cmdlet Export-AzLogAnalyticThrottledRequest removed alias to Export-AzLogAnalyticThrottledRequests

Before
Using deprectaed alias

Export-AzLogAnalyticThrottledRequests

After

Export-AzLogAnalyticThrottledRequest

[Link]
Removed the Grant-AzHDInsightHttpServicesAccess and Revoke-AzHDInsightHttpServicesAccess cmdlets. These
are no longer necessary because HTTP access is always enabled on all HDInsight clusters.
Added a new Set-AzHDInsightGatewayCredential cmdlet. Use this cmdlet to change the gateway HTTP username
and password (replaces Grant-AzHDInsightHttpServicesAccess ).
Updated the Get-AzHDInsightJobOutput cmdlet to support granular role-based access to the storage key.
Users with HDInsight Cluster Operator, Contributor, or Owner roles will not be affected.
Users with only the Reader role will need to specify DefaultStorageAccountKey parameter explicitly.
For more information about these role-based access changes, see [Link]/hdi-config-update
Before

Grant-AzHDInsightHttpServicesAccess -ClusterName $cluster -HttpCredential $credential

After

Set-AzHDInsightGatewayCredential -ClusterName $cluster -HttpCredential $credential

Users with only Reader role for cmdlet Get-AzHDInsightJobOutput


Before

Get-AzHDInsightJobOutput -ClusterName $clusterName -JobId $jobId

After

Get-AzHDInsightJobOutput -ClusterName $clusterName -JobId $jobId -DefaultStorageAccountKey $storageAccountKey

[Link]
Namespaces for types returned from Blob, Queue, and File cmdlets have changed their namespace from
[Link] to [Link] . While this is not technically a breaking change
according to the breaking change policy, it may require some changes in code that uses the methods from
the Storage .Net SDK to interact with the objects returned from these cmdlets.
Example 1: Add a message to a Queue (change CloudQueueMessage object namespace)
Before:

$queue = Get-AzStorageQueue –Name $queueName –Context $ctx


$queueMessage = New-Object -TypeName
"[Link],$($[Link]().[Link])
" -ArgumentList "This is message 1"
$[Link]($QueueMessage)

After:

$queue = Get-AzStorageQueue –Name $queueName –Context $ctx


$queueMessage = New-Object -TypeName
"[Link],$($[Link]().[Link])" -
ArgumentList "This is message 1"
$[Link]($QueueMessage)

Example 2: Fetch Blob/File Attributes with AccessCondition (change AccessCondition object namespace)
Before:

$accessCondition= New-Object [Link]

$blob = Get-AzureStorageBlob -Container $containerName -Blob $blobName


$[Link]($accessCondition)

$file = Get-AzureStorageFile -ShareName $shareName -Path $filepath


$[Link]($accessCondition)

After:
$accessCondition= New-Object [Link]

$blob = Get-AzureStorageBlob -Container $containerName -Blob $blobName


$[Link]($accessCondition)

$file = Get-AzureStorageFile -ShareName $shareName -Path $filepath


$[Link]($accessCondition)

While not technically a breaking change, you will notice output differences in the [Link] property of
Storage Accounts returned from New/Get/Set-AzStorageAccount changes are as follows. (After the change,
output and input SkuName are aligned.)
"StandardLRS" -> "Standard_LRS";
"StandardGRS" -> "Standard_GRS";
"StandardRAGRS" -> "Standard_RAGRS";
"StandardZRS" -> "Standard_ZRS";
"PremiumLRS" -> "Premium_LRS";
The default service behavior when creating a storage account withous specifying a Kind has changed. In
previous versions, when a storage account was created with no Kind specified, the Storage account Kind of
Storage was used, in the new version StorageV2 is the default Kind value. If you need to create a V1
Storage account with Kind 'Storage', add parameter '-Kind Storage'
Example : Create a storage Account (Default Kind change)
Before:

PS c:\> New-AzStorageAccount -ResourceGroupName groupname -Name accountname -SkuName Standard_LRS -


Location "westus"

StorageAccountName ResourceGroupName Location SkuName Kind AccessTier CreationTime


ProvisioningState EnableHttpsTrafficOnly
------------------ ----------------- -------- ------- ---- ---------- ------------ ---
-------------- ----------------------
accountname groupname westus StandardLRS Storage Hot 4/17/2018 [Link] AM
Succeeded False

After:

PS c:\> New-AzStorageAccount -ResourceGroupName groupname -Name accountname -SkuName Standard_LRS -


Location "westus"

StorageAccountName ResourceGroupName Location SkuName Kind AccessTier CreationTime


ProvisioningState EnableHttpsTrafficOnly
------------------ ----------------- -------- ------- ---- ---------- ------------ -
---------------- ----------------------
accountname groupname westus Standard_LRS StorageV2 Hot 4/17/2018 [Link] AM
Succeeded False
Migration Guide for Az 3.0.0
2/4/2020 • 11 minutes to read • Edit Online

This document describes the changes between the 2.0.0 and 3.0.0 versions of Az
Migration Guide for Az 3.0.0
Batch
Get-AzBatchNodeAgentSku
Incompatibility with previous versions of [Link]
Compute
New-AzDiskConfig
HDInsight
Get-AzHDInsightJobOutput
Add-AzHDInsightConfigValues
Disable-AzHDInsightMonitoring
Enable-AzHDInsightMonitoring
Get-AzHDInsightMonitoring
Get-AzHDInsightProperty
Grant-AzHDInsightRdpServicesAccess
Remove-AzHDInsightCluster
Revoke-AzHDInsightRdpServicesAccess
Set-AzHDInsightGatewayCredential
IotHub
New-AzIotHubImportDevices
New-AzIotHubExportDevices
Add-AzIotHubEventHubConsumerGroup
Get-AzIotHubEventHubConsumerGroup
Remove-AzIotHubEventHubConsumerGroup
Set-AzIotHub
RecoveryServices
Edit-AzRecoveryServicesAsrRecoveryPlan
Get-AzRecoveryServicesAsrRecoveryPlan
New-AzRecoveryServicesAsrReplicationProtectedItem
Resources
Incompatibility with previous versions of [Link]
ServiceFabric
Add-ServiceFabricApplicationCertificate
Sql
Get-AzSqlDatabaseSecureConnectionPolicy
Get-AzSqlDatabaseIndexRecommendations
Get-AzSqlDatabaseRestorePoints
Get-AzSqlDatabaseAuditing
Set-AzSqlDatabaseAuditing
Get-AzSqlServerAuditing
Set-AzSqlServerAuditing
Get-AzSqlServerAdvancedThreatProtectionSettings
Clear-AzSqlServerAdvancedThreatProtectionSettings
Update-AzSqlServerAdvancedThreatProtectionSettings
Get-AzSqlDatabaseAdvancedThreatProtectionSettings
Update-AzSqlDatabaseAdvancedThreatProtectionSettings
Clear-AzSqlDatabaseAdvancedThreatProtectionSettings
Update-AzSqlDatabaseVulnerabilityAssessmentSettings
Get-AzSqlDatabaseVulnerabilityAssessmentSettings
Clear-AzSqlDatabaseVulnerabilityAssessmentSettings
Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings
Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings
Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings
Update-AzSqlInstanceVulnerabilityAssessmentSettings
Get-AzSqlInstanceVulnerabilityAssessmentSettings
Clear-AzSqlInstanceVulnerabilityAssessmentSettings
Update-AzSqlServerVulnerabilityAssessmentSettings
Get-AzSqlServerVulnerabilityAssessmentSettings
Clear-AzSqlServerVulnerabilityAssessmentSettings
Get-AzSqlServerAdvancedThreatProtectionPolicy
Get-AzSqlServerThreatDetectionPolicy
Remove-AzSqlServerThreatDetectionPolicy
Set-AzSqlServerThreatDetectionPolicy
Get-AzSqlDatabaseThreatDetectionPolicy
Set-AzSqlDatabaseThreatDetectionPolicy
Remove-AzSqlDatabaseThreatDetectionPolicy

Batch
Get-AzBatchNodeAgentSku

Removed Get-AzBatchNodeAgentSkuand replaced it with Get-AzBatchSupportedImage .


Get-AzBatchSupportedImage returns the same data as Get-AzBatchNodeAgentSku but in a more friendly format.
New non-verified images are also now returned. Additional information about Capabilities and
BatchSupportEndOfLife for each image is also included.

Before

$Context = Get-AzBatchAccountKeys -AccountName "ContosoBatchAccount"


Get-AzBatchNodeAgentSku -BatchContext $Context

After

$Context = Get-AzBatchAccountKey -AccountName "ContosoBatchAccount"


Get-AzBatchSupportedImage -BatchContext $Context

Previous Version Incompatibility with [Link] Module


Version 2.0.1 of the ‘[Link]’ module is incompatible with earlier versions (version 1.7.0 or earlier) of the
‘[Link]’ module. This will result in being unable to import version 1.7.0 of the ‘[Link]’ module when
version 2.0.1 of the ‘[Link]’ module is imported. To fix this issue, simply update the ‘[Link]’ module to
version 1.7.1 or greater, or simply install the latest version of the ‘Az’ module.

Compute
New-AzDiskConfig

UploadSizeInBytes parameter is used instead of DiskSizeGB for New-AzDiskConfig when CreateOption is Upload
Before

$diskconfig = New-AzDiskConfig -Location 'Central US' -DiskSizeGB 1023 -SkuName Standard_LRS -OsType Windows -
CreateOption Upload -DiskIOPSReadWrite 500 -DiskMBpsReadWrite 8

After

$diskconfig = New-AzDiskConfig -Location 'Central US' -UploadSizeInBytes 1023 * 1024 * 1024 * 1024 -SkuName
Standard_LRS -OsType Windows -CreateOption Upload -DiskIOPSReadWrite 500 -DiskMBpsReadWrite 8

HDInsight
Get-AzHDInsightJobOutput

Updated the Get-AzHDInsightJobOutput cmdlet to support granular role-based access to the storage key.
Users with HDInsight Cluster Operator, Contributor, or Owner roles will not be affected.
Users with only the Reader role will need to specify DefaultStorageAccountKey parameter explicitly.
Before

Get-AzHDInsightJobOutput -ClusterName $clusterName -JobId $jobId

After

Get-AzHDInsightJobOutput -ClusterName $clusterName -JobId $jobId -DefaultStorageAccountKey $storageAccountKey

Add-AzHDInsightConfigValues

Cmdlet Add-AzHDInsightConfigValue removed alias to Add-AzHDInsightConfigValues .


Before
Using deprecated alias

Add-AzHDInsightConfigValues

After

Add-AzHDInsightConfigValue

Disable-AzHDInsightMonitoring

Added a new Disable-AzHDInsightMonitoring cmdlet. Use this cmdlet to disable monitoring in a HDInsight cluster
(replaces Disable-AzHDInsightOperationsManagementSuite and Disable-AzHDInsightOMS ).
Before
Disable-AzHDInsightOMS -Name testcluster

Disable-AzHDInsightOperationsManagementSuite -Name testcluster

After

Disable-AzHDInsightMonitoring -Name testcluster

Enable-AzHDInsightMonitoring

Added a new Enable-AzHDInsightMonitoring cmdlet. Use this cmdlet to enable monitoring in a HDInsight cluster
(replaces Enable-AzHDInsightOperationsManagementSuite and Enable-AzHDInsightOMS ).
Before

Enable-AzHDInsightOMS Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId 1d364e89-bb71-4503-aa3d-


a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>

Enable-AzHDInsightOperationsManagementSuite Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId


1d364e89-bb71-4503-aa3d-a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>

After

Enable-AzHDInsightMonitoring Enable-AzHDInsightMonitoring -Name testcluster -WorkspaceId 1d364e89-bb71-4503-


aa3d-a23535aea7bd -PrimaryKey <key for workspace 1d364e89-bb71-4503-aa3d-a23535aea7bd>

Get-AzHDInsightMonitoring

Added a new Get-AzHDInsightMonitoring cmdlet. Use this cmdlet to get the status of monitoring installation in an
Azure HDInsight cluster (replaces Get-AzHDInsightOperationsManagementSuite and Get-AzHDInsightOMS ).
Before

Get-AzHDInsightOMS -Name testcluster

Get-AzHDInsightOperationsManagementSuite -Name testcluster

After

Get-AzHDInsightMonitoring -Name testcluster

Get-AzHDInsightProperty

Cmdlet Get-HDInsightProperty removed alias to Get-AzHDInsightProperties .


Before
Using deprecated alias

Get-AzHDInsightProperties -Location "East US 2"

After
Get-AzHDInsightProperty -Location "East US 2"

Grant-AzHDInsightRdpServicesAccess

Removed the Grant-AzHDInsightRdpServicesAccess and Revoke-AzHDInsightRdpServicesAccess cmdlets. These are no


longer necessary because clusters using Windows OS type are not supported. Please create a cluster using Linux
OS type instead.
Remove-AzHDInsightCluster

The output type of Remove-AzHDInsightCluster changed from


[Link] to bool .
Before

$cluster = Remove-AzHDInsightCluster -ClusterName "your-hadoop-001"

After

Remove-AzHDInsightCluster -ClusterName "your-hadoop-001" -PassThru


True

Revoke-AzHDInsightRdpServicesAccess

The cmdlet is deprecated. There is no replacement for it.


Set-AzHDInsightGatewayCredential

The output type of Set-AzHDInsightGatewayCredential changed from HttpConnectivitySettings to


AzureHDInsightGatewaySettings .

IotHub
New-AzIotHubImportDevices

This alias is removed, please use New-AzIotHubImportDevice instead.


Before

New-AzIotHubImportDevices -ResourceGroupName "myresourcegroup" -Name "myiothub" -InputBlobContainerUri


"[Link]
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T[Link]Z&st=2016-10-
26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -OutputBlobContainerUri
"[Link]
27T[Link]Z&st=2016-10-26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D"

After

New-AzIotHubImportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -InputBlobContainerUri


"[Link]
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T[Link]Z&st=2016-10-
26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -OutputBlobContainerUri
"[Link]
27T[Link]Z&st=2016-10-26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D"

New-AzIotHubExportDevices

This alias is removed, please use New-AzIotHubExportDevice instead.


Before
New-AzIotHubExportDevices -ResourceGroupName "myresourcegroup" -Name "myiothub" -ExportBlobContainerUri
"[Link]
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T[Link]Z&st=2016-10-
26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -ExcludeKeys

After

New-AzIotHubExportDevice -ResourceGroupName "myresourcegroup" -Name "myiothub" -ExportBlobContainerUri


"[Link]
05&ss=bfqt&sr=c&srt=sco&sp=rwdl&se=2016-10-27T[Link]Z&st=2016-10-
26T[Link]Z&spr=https&sig=QqpIhHsIMF8hNuFO%3D" -ExcludeKeys

Add-AzIotHubEventHubConsumerGroup

Parameter EventHubEndPointName is deprecated without being replaced as IotHub comes with only one built-in
endpoint("events") which could handle system and device messages.
Before

Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubConsumerGroupName "myconsumergroup" -EventHubEndpointName "/EventHubEndpointName"

After

Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubConsumerGroupName "myconsumergroup"

Get-AzIotHubEventHubConsumerGroup

Parameter EventHubEndPointName is deprecated without being replaced as IotHub comes with only one built-in
endpoint("events") which could handle system and device messages.
Before

Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubEndpointName


"/EventHubEndpointName"

After

Get-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub"

Remove-AzIotHubEventHubConsumerGroup

Parameter EventHubEndPointName is deprecated without being replaced as IotHub comes with only one built-in
endpoint("events") which could handle system and device messages.
Before

Remove-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubConsumerGroupName myconsumergroup -EventHubEndpointName "/EventHubEndpointName"

After

Remove-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -


EventHubConsumerGroupName myconsumergroup

Set-AzIotHub
Parameter OperationsMonitoringProperties is deprecated without being replaced as IotHub is no longer using
built-in endpoint("operationsMonitoringEvents").

RecoveryServices
Edit-AzRecoveryServicesAsrRecoveryPlan

[Link] , [Link] and


[Link] is removed from output.
Get-AzRecoveryServicesAsrRecoveryPlan

[Link] , [Link] and


[Link] is removed from output.
New-AzRecoveryServicesAsrReplicationProtectedItem

Parameter IncludeDiskId is changed to support directly writing to a managed disk in Azure Site Recovery.
Before

$job = New-AzRecoveryServicesAsrReplicationProtectedItem -RecoveryAzureStorageAccountId


$recoveryAzureStorageAccountId -IncludeDiskId $includeDiskId -VMwareToAzure -Account
$[Link][0] -RecoveryResourceGroupId $RecoveryResourceGroupId -
RecoveryAzureNetworkId $RecoveryAzureNetworkId -name $name -ProcessServer
$[Link][0] -ProtectableItem $protectableItem -ProtectionContainerMapping
$pcm -RecoveryAzureSubnetName $RecoveryAzureSubnetName -RecoveryVmName $RecoveryVmName -LogStorageAccountId
$LogStorageAccountId

After

$disk1 = New-AzRecoveryServicesAsrInMageAzureV2DiskInput -DiskId $diskId -LogStorageAccountId


$logStorageAccountId -DiskType $diskType
$disk2 = New-AzRecoveryServicesAsrInMageAzureV2DiskInput -DiskId $diskId2 -LogStorageAccountId
$logStorageAccountId -DiskType $diskType2
$job = New-AzRecoveryServicesAsrReplicationProtectedItem -VMwareToAzure -Account
$[Link][0] -RecoveryResourceGroupId $RecoveryResourceGroupId -
RecoveryAzureNetworkId $RecoveryAzureNetworkId -name $name -ProcessServer
$[Link][0] -ProtectableItem $protectableItem -ProtectionContainerMapping
$pcm -RecoveryAzureSubnetName $RecoveryAzureSubnetName -RecoveryVmName $RecoveryVmName -LogStorageAccountId
$LogStorageAccountId -InMageAzureV2DiskInput $disk1,$disk2

Resources
Previous Version Incompatibility with [Link] Module
Version 1.7.1 of the ‘[Link]’ module is incompatible with earlier versions (version 1.1.2 or earlier) of the
‘[Link]’ module. This will result in being unable to import version 1.1.2 of the ‘[Link]’ module when version
1.7.1 of the ‘[Link]’ module is imported. To fix this issue, update the ‘[Link]’ module to version 2.0.1 or
greater, or simply install the latest version of the ‘Az’ module.

ServiceFabric
Add-ServiceFabricApplicationCertificate

Removed Add-ServiceFabricApplicationCertificate as this scenario is covered by Add-AzVmssSecret .


Before
Add-AzServiceFabricApplicationCertificate -ResourceGroupName "Group1" -Name "Contoso01SFCluster" -
SecretIdentifier "[Link]

After

$Vault = Get-AzKeyVault -VaultName "ContosoVault"


$CertConfig = New-AzVmssVaultCertificateConfig -CertificateUrl
"[Link] -CertificateStore "Certificates"
$VMSS = New-AzVmssConfig
Add-AzVmssSecret -VirtualMachineScaleSet $VMSS -SourceVaultId $[Link] -VaultCertificate $CertConfig

Sql
Get-AzSqlDatabaseSecureConnectionPolicy

Note that secure connection is deprecated and so command is removed. Please use the SQL database blade in the
Azure portal to view the connection strings
Get-AzSqlDatabaseIndexRecommendations

Get-AzSqlDatabaseIndexRecommendations alias is removed. Use Get-AzSqlDatabaseIndexRecommendation instead.


Get-AzSqlDatabaseRestorePoints

Get-AzSqlDatabaseRestorePoints alias is removed. Use Get-AzSqlDatabaseRestorePoint instead.


Get-AzSqlDatabaseAuditing

The cmdlet Get-AzSqlDatabaseAudit is replacing this cmdlet.


The output type is changing from the existing type
:'[Link]' to the new type
:'[Link]', removing properties
AuditState and StorageAccountName . and StorageAccountSubscriptionId . Scripts can retrieve storage account
information from the new StorageAccountResourceId property.
Before

PS C:\> Get-AzSqlDatabaseAuditing -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName


"Database01"
DatabaseName : database01
AuditAction : {}
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
BATCH_COMPLETED_GROUP, ...}
ResourceGroupName : resourcegroup01
ServerName : server01
AuditState : Enabled
StorageAccountName : mystorage
StorageKeyType : Primary
RetentionInDays : 0
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
PredicateExpression : statement <> 'select 1'

After
PS C:\> Get-AzSqlDatabaseAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName
"Database01"
ServerName : server01
DatabaseName : database01
AuditAction : {}
ResourceGroupName : resourcegroup01
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP,
BATCH_COMPLETED_GROUP, ...}
PredicateExpression : statement <> 'select 1'
BlobStorageTargetState : Enabled
StorageAccountResourceId : /subscriptions/7fe3301d-31d3-4668-af5e-
211a890ba6e3/resourceGroups/resourcegroup01/providers/[Link]/storageAccounts/mystorage
StorageKeyType : Primary
RetentionInDays : 0
EventHubTargetState : Enabled
EventHubName : eventHubName
EventHubAuthorizationRuleResourceId : EventHubAuthorizationRuleResourceId
LogAnalyticsTargetState : Enabled
WorkspaceResourceId : "/subscriptions/4b9e8510-67ab-4e9a-95a9-
e2f1e570ea9c/resourceGroups/insights-integration/providers/[Link]/workspaces/viruela2"

Set-AzSqlDatabaseAuditing

The cmdlet Set-AzSqlDatabaseAudit is replacing this cmdlet.


The output type is changing from the existing type
:'[Link]' to the new type :'bool'
Before

Set-AzSqlDatabaseAuditing -State Enabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -


StorageAccountName "Storage22" -DatabaseName "Database01"

After

Set-AzSqlDatabaseAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -


BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-
211a890ba6e3/resourceGroups/resourcegroup01/providers/[Link]/storageAccounts/mystorage"

Get-AzSqlServerAuditing

The cmdlet Get-AzSqlServerAudit is replacing this cmdlet.


The output type is changing from the existing type
:'[Link]' to the new type
:'[Link]'. Properties AuditState ,
StorageAccountName , and StorageAccountSubscriptionId are removed. Scripts that use StorageAccountName and
StorageAccountSubscriptionId proeprties can retrieve this information from the new StorageAccountResourceId
property.
Before
PS C:\> Get-AzSqlServerAuditing -ResourceGroupName "resourcegroup01" -ServerName "server01"
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
BATCH_COMPLETED_GROUP, ...}
ResourceGroupName : resourcegroup01
ServerName : server01
AuditState : Enabled
StorageAccountName : mystorage
StorageKeyType : Primary
RetentionInDays : 0
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
PredicateExpression : statement <> 'select 1'

After

PS C:\> Get-AzSqlServerAudit -ResourceGroupName "resourcegroup01" -ServerName "server01"


ServerName : server01
ResourceGroupName : resourcegroup01
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP,
FAILED_DATABASE_AUTHENTICATION_GROUP, BATCH_COMPLETED_GROUP, ...}
PredicateExpression : statement <> 'select 1'
BlobStorageTargetState : Enabled
StorageAccountResourceId : /subscriptions/7fe3301d-31d3-4668-af5e-
211a890ba6e3/resourceGroups/resourcegroup01/providers/[Link]/storageAccounts/mystorage
StorageKeyType : Primary
RetentionInDays : 0
EventHubTargetState : Enabled
EventHubName : eventHubName
EventHubAuthorizationRuleResourceId : EventHubAuthorizationRuleResourceId
LogAnalyticsTargetState : Enabled
WorkspaceResourceId : "/subscriptions/4b9e8510-67ab-4e9a-95a9-
e2f1e570ea9c/resourceGroups/insights-integration/providers/[Link]/workspaces/viruela2"

Set-AzSqlServerAuditing

The cmdlet Set-AzSqlServerAudit is replacing this cmdlet.


The output type is changing from the existing type
:'[Link]' to the new type :'bool'
Before

Set-AzSqlServerAuditing -State Enabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -


StorageAccountName "Storage22"

After

PS C:\> Set-AzSqlServerAudit -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -


BlobStorageTargetState Enabled -StorageAccountResourceId "/subscriptions/7fe3301d-31d3-4668-af5e-
211a890ba6e3/resourceGroups/resourcegroup01/providers/[Link]/storageAccounts/mystorage"

Get-AzSqlServerAdvancedThreatProtectionSettings

Cmdlet Get-AzSqlServerAdvancedThreatProtectionSettings is replaced by


Get-AzSqlServerAdvancedThreatProtectionSetting

Before

Get-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

After
Get-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Clear-AzSqlServerAdvancedThreatProtectionSettings

Cmdlet Clear-AzSqlServerAdvancedThreatProtectionSettings is replaced by


Clear-AzSqlServerAdvancedThreatProtectionSetting

Before

Clear-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

After

Clear-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Update-AzSqlServerAdvancedThreatProtectionSettings

Cmdlet Update-AzSqlServerAdvancedThreatProtectionSettings is replaced by


Update-AzSqlServerAdvancedThreatProtectionSetting

Before

Update-AzSqlServerAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -EmailAdmins $False -
ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

After

Update-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -EmailAdmins $False -
ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Get-AzSqlDatabaseAdvancedThreatProtectionSettings

Cmdlet Get-AzSqlDatabaseAdvancedThreatProtectionSettings is replaced by


Get-AzSqlDatabaseAdvancedThreatProtectionSetting

Before

Get-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


DatabaseName "Database01"

After

Get-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


DatabaseName "Database01"

Update-AzSqlDatabaseAdvancedThreatProtectionSettings

Cmdlet Update-AzSqlDatabaseAdvancedThreatProtectionSettings is repleaced by


Update-AzSqlDatabaseAdvancedThreatProtectionSetting

Before
Update-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName
"Server01" -DatabaseName "Database01" -NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]"
-EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName
"mystorageAccount"

After

Update-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-DatabaseName "Database01" -NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -
EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName
"mystorageAccount"

Clear-AzSqlDatabaseAdvancedThreatProtectionSettings

Cmdlet Clear-AzSqlDatabaseAdvancedThreatProtectionSettings is repleaced by


Clear-AzSqlDatabaseAdvancedThreatProtectionSetting

Before

Clear-AzSqlDatabaseAdvancedThreatProtectionSettings -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-DatabaseName "Database01"

After

Clear-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-DatabaseName "Database01"

Update-AzSqlDatabaseVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlDatabaseVulnerabilityAssessmentSettings is repleaced by


Update-AzSqlDatabaseVulnerabilityAssessmentSetting

Before

Update-AzSqlDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01"`
-ServerName "Server01"`
-DatabaseName "Database01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

After

Update-AzSqlDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01"`
-ServerName "Server01"`
-DatabaseName "Database01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

Get-AzSqlDatabaseVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlDatabaseVulnerabilityAssessmentSettings is repleaced by


Get-AzSqlDatabaseVulnerabilityAssessmentSetting

Before

Get-AzSqlDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Get-AzSqlDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Clear-AzSqlDatabaseVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlDatabaseVulnerabilityAssessmentSettings is repleaced by


Clear-AzSqlDatabaseVulnerabilityAssessmentSetting

Before

Clear-AzSqlDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Clear-AzSqlDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings is repleaced by


Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Before

Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-DatabaseName "Database01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

After
Update-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-DatabaseName "Database01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings is repleaced by


Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Before

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Get-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings is repleaced by


Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting

Before

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Clear-AzSqlInstanceDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Update-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Update-AzSqlInstanceVulnerabilityAssessmentSettings is repleaced by


Update-AzSqlInstanceVulnerabilityAssessmentSetting

Before
Update-AzSqlInstanceVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

After

Update-AzSqlInstanceVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

Get-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlInstanceVulnerabilityAssessmentSettings is repleaced by


Get-AzSqlInstanceVulnerabilityAssessmentSetting

Before

Get-AzSqlInstanceVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Get-AzSqlInstanceVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Clear-AzSqlInstanceVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlInstanceVulnerabilityAssessmentSettings is repleaced by


Clear-AzSqlInstanceVulnerabilityAssessmentSetting

Before

Clear-AzSqlInstanceVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Clear-AzSqlInstanceVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Update-AzSqlServerVulnerabilityAssessmentSettings
Cmdlet Update-AzSqlServerVulnerabilityAssessmentSettings is repleaced by
Update-AzSqlServerVulnerabilityAssessmentSetting

Before

Update-AzSqlServerVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01"`
-ServerName "Server01"`
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

After

Update-AzSqlServerVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01"`
-ServerName "Server01"`
-StorageAccountName "mystorage" `
-ScanResultsContainerName "vulnerability-assessment" `
-RecurringScansInterval Weekly `
-EmailSubscriptionAdmins $true `
-NotificationEmail @("mail1@[Link]" , "mail2@[Link]")

Get-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Get-AzSqlServerVulnerabilityAssessmentSettings is repleaced by


Get-AzSqlServerVulnerabilityAssessmentSetting

Before

Get-AzSqlServerVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After

Get-AzSqlServerVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Clear-AzSqlServerVulnerabilityAssessmentSettings

Cmdlet Clear-AzSqlServerVulnerabilityAssessmentSettings is repleaced by


Clear-AzSqlServerVulnerabilityAssessmentSetting

Before

Clear-AzSqlServerVulnerabilityAssessmentSettings `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

After
Clear-AzSqlDatabaseVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `
-ServerName "Server01" `
-DatabaseName "Database01"

Get-AzSqlServerAdvancedThreatProtectionPolicy

Cmdlet Get-AzSqlServerAdvancedThreatProtectionPolicy is deleted and no cmdlet is repleaced it


Get-AzSqlServerThreatDetectionPolicy

Cmdlet Get-AzSqlServerThreatDetectionPolicy is repleaced by Get-AzSqlServerThreatDetectionSetting

Before

PS C:\> Get-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


ResourceGroupName : ResourceGroup11
ServerName : Server01
ThreatDetectionState : Enabled
NotificationRecipientsEmails : admin@[Link]
StorageAccountName : mystorage
EmailAdmins : True
ExcludedDetectionTypes : {}
RetentionInDays : 0

After

PS C:\> Get-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName


"Server01"
ResourceGroupName : ResourceGroup11
ServerName : Server01
ThreatDetectionState : Enabled
NotificationRecipientsEmails : admin@[Link]
StorageAccountName : mystorage
EmailAdmins : True
ExcludedDetectionTypes : {}
RetentionInDays : 0

Remove-AzSqlServerThreatDetectionPolicy

Cmdlet Remove-AzSqlServerThreatDetectionPolicy is repleaced by Clear-AzSqlServerThreatDetectionSetting

Before

Remove-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

After

Clear-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"

Set-AzSqlServerThreatDetectionPolicy

Cmdlet Set-AzSqlServerThreatDetectionPolicy is repleaced by Update-AzSqlServerThreatDetectionSetting

Before

Set-AzSqlServerThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -EmailAdmins $False -
ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

After
Update-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -
NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -EmailAdmins $False -
ExcludedDetectionType "Sql_Injection_Vulnerability","SQL_Injection" -StorageAccountName "mystorageAccount"

Get-AzSqlDatabaseThreatDetectionPolicy

Cmdlet Get-AzSqlDatabaseThreatDetectionPolicy is repleaced by Get-AzSqlDatabaseThreatDetectionSetting

Before

PS C:\> Get-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


DatabaseName "Database01"
DatabaseName : Database01
ResourceGroupName : ResourceGroup11
ServerName : Server01
ThreatDetectionState : Enabled
NotificationRecipientsEmails : admin@[Link]
StorageAccountName : mystorage
EmailAdmins : True
ExcludedDetectionTypes : {}
RetentionInDays : 0

After

PS C:\> Get-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName


"Server01" -DatabaseName "Database01"
DatabaseName : Database01
ResourceGroupName : ResourceGroup11
ServerName : Server01
ThreatDetectionState : Enabled
NotificationRecipientsEmails : admin@[Link]
StorageAccountName : mystorage
EmailAdmins : True
ExcludedDetectionTypes : {}
RetentionInDays : 0

Set-AzSqlDatabaseThreatDetectionPolicy

Cmdlet Set-AzSqlDatabaseThreatDetectionPolicy is repleaced by Update-AzSqlDatabaseThreatDetectionSetting

Before

Set-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -


DatabaseName "Database01" -NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -EmailAdmins
$False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName
"mystorageAccount"

After

Update-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-DatabaseName "Database01" -NotificationRecipientsEmails "admin01@[Link];secadmin@[Link]" -
EmailAdmins $False -ExcludedDetectionType "Sql_Injection_Vulnerability", "SQL_Injection" -StorageAccountName
"mystorageAccount"

Remove-AzSqlDatabaseThreatDetectionPolicy

Cmdlet Remove-AzSqlDatabaseThreatDetectionPolicy is repleaced by Clear-AzSqlDatabaseThreatDetectionSetting

Before
Remove-AzSqlDatabaseThreatDetectionPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -
DatabaseName "Database01"

After

Clear-AzSqlDatabaseAdvancedThreatProtectionSetting -ResourceGroupName "ResourceGroup11" -ServerName "Server01"


-DatabaseName "Database01"

Common questions

Powered by AI

When upgrading scripts from AzureRM to the Az module, first uninstall the AzureRM module to avoid conflicts. Use the Uninstall-AzureRM command for necessary cleanup . Install the Az module, which provides feature parity with AzureRM but with shorter and consistent cmdlet names . You can optionally enable compatibility mode with Enable-AzureRmAlias to allow existing scripts to run with old cmdlet names as aliases, while planning for full migration to new Az cmdlet names . It's crucial to update your scripts to use the new Az cmdlet and module names since there are renamed modules, parameters, and potentially changed return values . Check the detailed list of breaking changes before migrating to address renamed cmdlets and parameter changes . If modules are explicitly loaded in scripts using #Requires or Import-Module, update those references to use new module names .

The Az module, unlike the AzureRM module, uses a simplified naming convention for cmdlets, replacing 'AzureRM' with 'Az' across all cmdlets, such as changing 'New-AzureRMVm' to 'New-AzVm' . The Az module also introduces shorter, more consistent cmdlet names, improving user experience by making them easier to remember and use . In terms of features to improve user experience, Az enables cross-platform compatibility, allowing it to run on Windows, macOS, and Linux, with support for both PowerShell 5.1 and PowerShell Core 6.x . Furthermore, the Enable-AzureRmAlias feature in Az allows users to create aliases for older AzureRM cmdlets, facilitating easier transition and script compatibility without extensive modifications . While AzureRM modules are still maintained for bug fixes until December 2020, Az is the recommended module for new deployments and updates .

Transitioning to the Az module is essential because it provides feature parity with AzureRM while offering shorter and more consistent cmdlet names, improved stability, and cross-platform support, which AzureRM no longer receives as development has ceased . Azure PowerShell Az module simplifies cmdlet names and integrates management and data plane cmdlets into single modules, making dependencies and imports easier to manage . Resources available to aid migration include the migration guide from AzureRM to Az, which details breaking changes and necessary updates to scripts . Compatibility aliases can be enabled using the Enable-AzureRmAlias cmdlet to ease the transition by allowing old cmdlet names to function with the Az module .

To migrate from the AzureRM module to the Az module in PowerShell, follow these steps: 1. First, uninstall any existing AzureRM modules using the `Uninstall-AzureRM` cmdlet. This ensures there are no conflicts during the installation of the Az module . 2. Install the Az module using `Install-Module -Name Az -AllowClobber -Scope CurrentUser` or `Install-Module -Name Az -AllowClobber -Scope AllUsers` depending on whether you want to install it for the current user or all users . 3. Enable compatibility aliases with `Enable-AzureRmAlias` to assist in the transition and allow existing scripts that use AzureRM cmdlet names to work with minimal changes. This can be done by running `Enable-AzureRmAlias -Scope CurrentUser` . 4. Review your scripts for any cmdlet or parameter changes between AzureRM and Az, as some breaking changes may require script modifications. Refer to the breaking changes documentation between AzureRM and Az to update your scripts accordingly . 5. Fully update your scripts to use the new Az cmdlet names and modules, transitioning away from using compatibility aliases as you update. For instance, change `New-AzureRmVm` to `New-AzVm` in your scripts .

PowerShell Core and PowerShell 5.1 differ significantly in handling the Az and AzureRM modules. In PowerShell 5.1 for Windows, you cannot have both the AzureRM and Az modules installed simultaneously, resulting in conflicts when trying to integrate both modules. To avoid this, if you need to keep AzureRM available, you should install the Az module on PowerShell Core 6.x or later instead, as PowerShell Core and PowerShell 5.1 use separate module collections, preventing naming conflicts . PowerShell Core can coexist with PowerShell 5.1 on the same machine without module conflicts, allowing flexible environments where both Az and AzureRM can be utilized . Furthermore, for PowerShell 5.1, if you wish to migrate to Az, AzureRM must be fully uninstalled first to prevent conflicts . On the other hand, Az modules can be installed independently in PowerShell Core 6.x or later without the need to uninstall AzureRM, thus avoiding potential conflicts .

Azure PowerShell modules can be installed on systems without direct access to the PowerShell Gallery through methods such as using an MSI installer or setting up a local PowerShellGet repository. The MSI installer is suitable for Windows platforms and allows installation on environments where the PowerShell Gallery is blocked . Alternatively, modules can be downloaded to a network-connected machine using `Save-Module` and then distributed to disconnected systems via a file share or local repository . Potential issues during installation include the need to uninstall older module versions if they cause conflicts, ensuring the system meets prerequisites like PowerShell 5.1 and .NET Framework 4.7.2 or later, and managing proxy settings to ensure connectivity .

Azure PowerShell uses Azure contexts to persist session credentials across different PowerShell sessions, which eliminates the need to re-authenticate every time you switch between subscriptions or start a new session . Azure contexts store information such as account details, active subscription, and authentication tokens, enabling persistent sessions. The ability to manage these contexts effectively is significant as it facilitates seamless transitions between multiple subscriptions and tasks without repeated sign-ins, therefore optimizing workflow efficiency .

Maintaining multiple versions of Azure PowerShell modules is significant for compatibility and stability during upgrades or migrations. Different scripts and applications may depend on specific versions of modules to function correctly. Installing and loading specific versions can be managed using the `-RequiredVersion` argument within PowerShell commands . By default, PowerShell will load the latest version unless specified otherwise, allowing developers to test new features while ensuring legacy scripts continue to function as expected . This approach facilitates a smoother transition between versions and helps in troubleshooting by isolating issues to specific module versions .

The Enable-AzureRmAlias cmdlet in Azure PowerShell is used to enable a compatibility mode that allows older AzureRM cmdlet names to be used as aliases for their newer counterparts in the Az module, facilitating migration with minimal script changes . However, this cmdlet does not automatically migrate scripts or handle changes in parameters and return values between AzureRM and Az cmdlets . Additionally, it requires careful management to ensure that aliases are enabled and disabled for the appropriate scopes .

To completely uninstall the AzureRM module from a system, you can use the following steps: 1. **Verify Installed Versions**: - Use the command `Get-InstalledModule -Name AzureRM -AllVersions` to list all versions of the AzureRM module installed on your system. 2. **Use Uninstall-AzureRM Cmdlet**: - Run the `Uninstall-AzureRM` command, which is part of the Az.Accounts module, to remove all AzureRM modules from your machine. Administrator privileges are required to execute this command . 3. **Manual Uninstallation with Uninstall-AllModules Script**: - If the Uninstall-AzureRM command fails, use the Uninstall-AllModules script. First, retrieve installed versions with `$versions = (Get-InstalledModule AzureRM -AllVersions | Select-Object Version)`. Then, execute `$versions | foreach { Uninstall-AllModules -TargetModule AzureRM -Version ($_.Version) -Force }` to uninstall the modules . 4. **Individual Module Removal**: - To ensure all modules are removed, loop through each AzureRM module and execute `Uninstall-Module` for each one: ``` foreach ($module in (Get-Module -ListAvailable AzureRM*).Name | Get-Unique) { Write-Host "Removing Module $module" Uninstall-Module $module } ``` .

You might also like