Versionning:

AzureAD PowerShell module version is 2.0.0.131

AzureaADpreview PowerShell module version is 2.0.1.17

Note: the preview module is the most recent and contain new cmdlet like Get-AzureADDirectorySetting or Set-AzureADDirectorySetting

Reference:

Getting started with PowerShell for O365:

https://docs.microsoft.com/en-us/office365/enterprise/powershell/getting-started-with-office-365-powershell

Azure AD PowerShell module:

https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0

https://docs.microsoft.com/en-us/powershell/gallery/readme

Powershell cmdlets reference and tips/scripts:

https://docs.microsoft.com/en-us/powershell/module/azuread/?view=azureadps-2.0

https://drewmadelung.com/managing-office-365-group-using-azure-ad-powershell-v2/

https://github.com/dmadelung/O365GroupsScripts/blob/master/DrewO365GroupsScripts%20-%20Azure%20AD%20Cmdlets

How to install the module to access Office 365/Azure AD:

The PowerShellGet module requires PowerShell 3.0 or newer. Therefore, PowerShellGet requires one of the following operating systems:

  • Windows 10
  • Windows 8.1 Pro
  • Windows 8.1 Enterprise
  • Windows 7 SP1
  • Windows Server 2016 TP5
  • Windows Server 2012 R2
  • Windows Server 2008 R2 SP1

PowerShellGet also requires .NET Framework 4.5 or above. You can install .NET Framework 4.5 or above from here.

Then from a PowerShell prompt enter:

Check installed module:
Get-InstalledModule -Name “AzureAD*”
To uninstall a previous version of AzureADPreview or AzureAD, run this command:
Uninstall-Module AzureADPreview
or
Uninstall-Module AzureAD

To install the latest version of AzureADPreview, run this command:   Install-Module AzureADPreview -force

At the message about an untrusted repository, type Y. It will take a minute or so for the new module to install.

Then

Connect-azureAD

 

example:  get-azureaduser -filter “displayname eq ‘firstname lastname'” | select displayname,mail

To list all user attributes:
get-msoluser -userprincipalname firstname.lastname@mydomain.com | select *

With AzureAD cmdlets (need module AzureAD):
get-azureaduser -filter “displayname eq ‘firstname lastname'” | select *

Working with extension attributs:

https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api-quickstart

Working with Azure AD Extension Attributes with Azure AD PowerShell v2

 

 

 

 

 

Advertisements