Update the PowerShell Az Modules in the Azure Automation Accounts

Update the PowerShell Az Modules in the Azure Automation Accounts

Sometimes a scripted action or PowerShell script that works locally fails in Nerdio Manager . You may see an error that looks something like this:

Method 'get SerializationSettings' in type

Microsoft.Azure.Management.lnternal.Resources.ResourceManagementClient' from assembly

Microsoft.Azure.PowerShell.Clients.ResourceManager, Version— 1.0.0.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35' does not have an implementation.

The actual error message you receive may be different, or the error message may suggest upgrading your PowerShell Az modules. These errors can often be resolved by upgrading the PowerShell Az module or modules used by the scripted action automation account. This topic guides you through how to update PowerShell Az modules in the Azure automation account.

To update the PowerShell Az module in the Azure automation account:

  1. In the Azure portal, navigate to Automation Accounts.

  2. Locate and select the scripted actions automation account.

  3. In the Shared Resources blade, select Modules.

  4. Select Browse gallery.

    Notes:

    • The relevant Az module is determined by the specific command that is failing. For example, if the script fails on Get-AzKeyVault, then it is the Az.KeyVault module that needs to be updated.

    • Sometimes the Az modules have dependencies on other Az modules, such as Az.Accounts. The dependencies may need to be updated as well.

    • If you use a hybrid worker to execute scripted actions, then the modules need to be updated on the hybrid worker VM, rather than in the automation account. This can be accomplished by selecting the Update Az Modules button on the hybrid worker VM.

    • Applying the module update using the Browse gallery method will automatically use the most recent version.

  5. Select the module you want to update.

    The module details are displayed.

  6. Select Select.

  7. On the Add a module page, from the Runtime version drop-down list, select the desired version to install.

  8. Once you have made the desired selection, select Import.

  9. On the upper right, you may follow the progress of the import process in the Notifications section.

  10. Optionally, you may confirm the version import was successful by searching for the module.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.