🏴 This is how you can install the Azure AD module for PowerShell yourself (preview)
To take advantage of new features within Microsoft 365, Teams or Azure, it is sometimes necessary to use PowerShell log in. In this practical guide, you can get started to install the necessary Azure AD Preview module to install. Some sample scripts are described in the article.
What is PowerShell?
PowerShell is a command-line interpreter and environment developed by Microsoft for configuring and managing systems. Based on the .NET Framework, it provides a comprehensive set of cmdlets (command-line tools) for performing a wide variety of tasks, such as managing user accounts, installing software and managing network configurations. PowerShell is part of several Microsoft products, including Windows and Office 365, and can be used by system administrators and other advanced users.
What is the Azure AD-Module for PowerShell?
The "Azure AD-Module for PowerShell" is a module for Microsoft's PowerShell-scripting platform designed to help administrators manage Azure Active Directory (Azure AD), which is a cloud-based identity and access management service for Microsoft Azure services. The module provides administrators with a set of commands they can use to perform various management tasks, such as creating and managing user accounts, setting policies for passwords and multifactor authentication, and managing groups and roles. The module can be used with PowerShell commands on a computer running Windows or through a connection to Azure AD through the Internet.
Open Powershell as administrator
How to install the Azure AD module in PowerShell
Run the following line in PowerShell:
install-package -Name AzureAD
Connect to AzureAD via PowerShell
Changing a UPN via PowerShell
Set-MsolUserPrincipalName -UserPrincipalName firstname.lastname@example.org -NewUserPrincipalName email@example.com
If your script does not work, install the MSOnline module
Please note that this is the older MSOnline V1 PowerShell-module for Azure Active Directory. Users are encouraged to use the newer Azure Active Directory V2 PowerShell-module instead of this module.
Install-Module -Name MSOnline
Connect to Azure AD with connect-msolservice