Hi @Omar Fahnbulleh ,
first of all there are two different PowerShell modules available for Azure:
- AZRM -> The older one
- AZ -> newer one
Both modules are not compatible which the other, which means you should only use one -> I recommend the AZ module.
Source: https://learn.microsoft.com/de-de/powershell/azure/migrate-from-azurerm-to-az?view=azps-7.3.0
Installation of the AZ module: https://learn.microsoft.com/de-de/powershell/azure/new-azureps-module-az?view=azps-7.3.0
Uninstall AZRM module: https://learn.microsoft.com/en-us/powershell/module/az.accounts/uninstall-azurerm?view=azps-7.3.0
How to know if a command is part of which module:
If there is a RM
in the name of the cmdlet it's from the AZRM module -> e.g. Connect-AzureRmAccount
https://learn.microsoft.com/en-us/powershell/module/azurerm.profile/connect-azurermaccount?view=azurermps-6.13.0
The corresponding cmdlet in the AZ module is Connect-AzAccount
https://learn.microsoft.com/en-us/powershell/module/az.accounts/connect-azaccount?view=azps-7.3.0
Migrating scripts from AZRM to AZ cmdlet is easy in most cases. Just remove the RM
in the cmdlet name.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten