The term 'Get-AzContext' is not recognized as a name of a cmdlet #20419
-
Hi, ====================
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This error should happen when Az.Accounts cannot be imported. Please execute This page https://learn.microsoft.com/en-us/powershell/azure/troubleshooting?view=azps-9.2.0#command-found-but-could-not-be-loaded can give you hints as well. |
Beta Was this translation helpful? Give feedback.
-
Hi @dingmeng-xue , I tried adding Get-Module, but now I am unable to reproduce the error. Could it be a timing issue where the loading of module takes time. This issue started happening recently. So not sure what changed in the environment. |
Beta Was this translation helpful? Give feedback.
This error should happen when Az.Accounts cannot be imported. Please execute
Get-Module
in the same console when you see that error. If you cannot see Az.Accounts in result, share the whole result ofGet-Module
to us.This page https://learn.microsoft.com/en-us/powershell/azure/troubleshooting?view=azps-9.2.0#command-found-but-could-not-be-loaded can give you hints as well.