Hi,
Please make sure you have the latest Azure PowerShell installed on your machine.
How to install Azure PowerShell
https://learn.microsoft.com/en-us/powershell/azure/install-azure-powershell?view=azps-12.1.0
Once you have it installed, please open a new Windows PowerShell window and test again.
Alternatively, you may use Azure Cloud Shell using link below:
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP