When connecting to Azure Active directory with the MSOnline PowerShell module, it will check the currently installed version. This allows the service to let you know that a newer version may be available. If the locally installed module is out-dated, you will get a message like the below:
WARNING: There is a newer version of the Microsoft Online Services Module. Your current version will still work as expected, however the latest version can be downloaded at https://portal.microsoftonline.com.
The build history for the Azure AD Module is available at Microsoft Azure Active Directory PowerShell Module Version Release History.
Checking Installed Module Version
The easiest way to check the installed version of the Azure Active Directory module is to look at the fileversion data. To do this in PowerShell:
The above is one line that may wrap. In the case below, the module version is reported as 1.0.6488.25 – which is rather old at the time of writing. This was installed back in November 2013.
While looking in Add/Remove programs shows the date the module was installed, it is NOT detailed with regards to Azure AD module version information. Note below that the module is stated as version 1.0 – that is not a detailed response so do not rely upon it.
The same low level of detail is also present in the registry at: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall.
Updating Installed Azure AD Module
Close down any existing Azure AD sessions. The out-dated Azure AD module must be manually uninstalled. This can be done from Add/Remove programs or the uninstall command contained within the application’s UninstallString registry key at the above registry path. Beware of any potential version issues if looking at that registry key. For example, the uninstall string for module 1.0.6488.25 is:
Module 1.0.8362.1 has:
These two examples are the same, but that may change.
Once the old AD module has been removed, also check that the required version of the SIA (Sign In Assistant) is also present. It may be possible that an older version of SIA is present that must also be removed and the latest one installed.
As of the time of writing, the latest SIA available is 7.250.4556.0. This along with the Azure AD module are linked from: https://aka.ms/aadposh
Assuming that the correct version of SIA is installed, kick off the installer for the new Azure AD module.
By default it will install to:
C:Program FilesWindows Azure Active DirectoryPowershell
And if you chose to create a desktop shortcut, the shortcut will be created with the following:
C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -NoExit -Command “Import-Module MSOnline”
Running The Updated Azure AD Module
Note the difference – there are no more warnings and the MSOL cmdlets are available. Get-MSOLDomain was used as a test. In the example below, the module is now reported as version 1.0.8362.1.
However, Add/Remove Programs continues to show version 1.0 is installed.
Oh well, it’s not a perfect world…