The Connect-AzAccount
is required in PowerShell to connect and authenticate the PowerShell session with Azure.
After the Azure connection is successfully done you can use other Az cmdlets in the PowerShell script.
These are the basics to start with Connect-AzAccount
:
# Get the credentials for Azure login
$Cred = Get-Credential
# Connect to Azure with the credentials
Connect-AzAccount -Credential $Cred
More details about Connect-AzAccount
you will find here: https://learn.microsoft.com/en-us/powershell/module/az.accounts/connect-azaccount?view=azps-5.1.0
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten