Set-AzureADUser

    Get-AzureADUser

    1. 管理员模式打开powershell,启用tls1.2
    1. [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    1. 安装PowerShellGet
    1. Install-Module -Name PowerShellGet -Force

    选Yes

    1. 获取AzureRM
    1. if (Get-Module -Name AzureRM -ListAvailable) {
    2. Write-Warning -Message ('Az module not installed. Having both the AzureRM and ' +
    3. 'Az modules installed at the same time is not supported.')
    4. } else {
    5. Install-Module -Name Az -AllowClobber -Scope CurrentUser
    6. }

    选Yes或者Yes to All

    1. 更改安全策略
    1. Set-ExecutionPolicy RemoteSigned
    1. 安装Az.Accounts模块
    1. Import-Module Az.Accounts
    1. 登陆
    1. Connect-AzAccount
    1. 安装AzureAD模块
    1. Install-Module AzureAD
    1. 登陆Azure AD
    1. connect-azuread
    1. 获取所有user
    1. Get-AzureADUser
    1. 获取某个user
    1. Get-AzureADUser -SearchString cdc-shared@o365.hes20.eu
    1. 获取某个user的某个属性
    1. Get-AzureADUser -SearchString cdc-shared@o365.hes20.eu | select -ExpandProperty ProxyAddresses
    1. $user = Get-AzureADUser -ObjectId test0@o365.hes20.eu
    2. $user.proxyAddresses