For the first time I'm trying out Azure Powershell. I'm selected my subscription and am trying to run the following command: azure site log tail websitename
However when I run the command I get the following error:
azure : The term 'azure' is not recognized as the name of a cmdlet...
What am I doing wrong here?
There are two different ways to make your Azure account available to Windows PowerShell. You can use the Add-AzureAccount cmdlet, which uses Azure Active Directory (Azure AD) authentication access tokens, or Import-AzurePublishSettingsFile, which uses a management certificate.
Sign in to Azure Sign in interactively with the Connect-AzAccount cmdlet. Skip this step if you use Cloud Shell. Your Azure Cloud Shell session is already authenticated for the environment, subscription, and tenant that launched the Cloud Shell session. Beginning with Az PowerShell module version 5.0.
Azure PowerShell modules are updated frequently. If you notice that the online cmdlet help includes cmdlets or parameters that are not in your module, download and install the latest version of the module. To find the version of your module, type: (Get-InstalledModule Azure).Version.
The following versions of Azure PowerShell are impacted by the AzureAD breaking change: Az.Resources PowerShell module version 3.5.1-preview or lesser. Az PowerShell module version 5.9.0 or lesser. If you are still encountering issues after upgrading, feel free to open an issue.
To start working with Azure PowerShell, sign in with your Azure credentials. After executing this command, a new browser window pops up and you can log into your Azure account. To update any PowerShell module, you should use the same method used to install the module.
The Azure Az PowerShell module is preinstalled in Azure Cloud Shell and in Docker images. The Azure Az PowerShell module is a rollup module. Installing it downloads the generally available Az PowerShell modules, and makes their cmdlets available for use.
Your example command is an Azure cross-platform command line command. The equivalent PowerShell command is:
Get-AzureWebsiteLog websitename -Tail
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With