Using Az modules
So far, all examples have used AzureRM
modules. The previously shown runbooks will be re-written to use cmdlets from the Az
module.
As mentioned before, Az
modules are not installed by default. They can be installed using the Modules gallery menu item in Azure Automation.
Search for Az
in the gallery and the results will show multiple modules related to it. If the Az
module is selected to be imported and installed, it will throw an error saying that its dependent modules are not installed and that they should be installed before installing the current module. The module can be found on the Modules gallery blade by searching for Az
, as shown in Figure 4.13:
Figure 4.13: Finding the Az module on the Modules gallery blade
Instead of selecting the Az
module, select Az.Accounts and import the module by following the wizard, as shown in Figure 4.14:
Figure 4.14: Importing the Az.Accounts module
After...