美文网首页
office365 添加guest account

office365 添加guest account

作者: 山猪cn | 来源:发表于2018-11-13 15:05 被阅读0次

    office365 admin center 并不能添加guest用户,只能删除。添加guest用户,需要登录Azure ad portal。

    office365 admin center

    登录Azure ad 邀请添加guest

    但是这样做之后,仅仅能够将guest用户加入office365 group,而无法将其加入distribution group

    将guest用户加入distribution group

    关键命令:

    #asks for office 365 credentials and stores them in

    $UserCredentials$UserCredential = Get-Credential

    #sets remote execution policy

    Set-ExecutionPolicy RemoteSigned

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

    Import-PSSession $Session

    # User prompts

    $member = read-host -Prompt "Member [name_domain#EXT#]"

    $identity = read-host -Prompt "DL Identity"

    # add to DL

    Add-DistributionGroupMember -Identity $identity -Member $member

    # wait for user to hit any key incase there is an error

    Write-Host -NoNewLine 'Press any key to continue...';

    $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');

    图例:

    guest用户在office的安全策略设置

    相关文章

      网友评论

          本文标题:office365 添加guest account

          本文链接:https://www.haomeiwen.com/subject/vcqlfqtx.html