There is a very good description on how to login using PowerShell at Different ways to login to Azure automation using PowerShell (sqlshack.com)
The Connect-AzAccount
cmdlet connects to Azure with an authenticated account for use with cmdlets from the Az PowerShell modules.
Connect to Azure with an authenticated account for use with cmdlets from the Az PowerShell modules.
Connect-AzAccount
Use an interactive login to connect to a specific tenant and subscription
Connect-AzAccount -Tenant 'xxxx-xxxx-xxxx-xxxx' -SubscriptionId 'yyyy-yyyy-yyyy-yyyy'
Login-AzAccount
andAdd-AzAccount
are the aliases build around the Connect-AzAccount cmdlet
To select the correct subscription use
Get-AzSubscription -SubscriptionName "{name}" | Select-AzSubscription
Gets the metadata used to authenticate Azure Resource Manager requests.
The Get-AzContext cmdlet gets the current metadata used to authenticate Azure Resource Manager requests. This cmdlet gets the Active Directory account, Active Directory tenant, Azure subscription, and the targeted Azure environment.
Get-AzContext [-DefaultProfile <IAzureContextContainer>] [[-Name] <String>] [<CommonParameters>]
Example for getting the context of the current session by calling Get-AzContext.
PS C:\> Get-AzContext