我正试图将“集中收件箱”设置为整个组织的残疾人。我在网上找到了很多脚本和教程,其中大部分都指向在PowerShell中使用Exchange会话。
例如:
我的PS脚本如下:
# Set up Credential
$UserCredential = Get-Credential
# Create the Exchange Online session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
# Import the cmdlets into this session
Import-PSSession $Session -DisableNameChecking
# Get a list of the organisation's current settings
Get-OrganizationConfig
# Now set the 'Focused Inbox' option to 'off' for everyone
Set-OrganizationConfig -FocusedInboxOn $false
# Must remove the session to avoid clogging and clutter
Remove-PSSession $Session“Get-OrganizationConfig”命令返回当前配置的完整列表:

但是,当我执行'Set-OrganizationConfig‘命令时,它会失败,并收到以下消息:
Set-OrganizationConfig : The term 'Set-OrganizationConfig' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a 包含路径,请验证路径是否正确,然后再试一次。

我的假设是,这是一个权限问题,但是,我可以看到组织的所有配置,而缺少的是cmdlet。
有什么问题?
我是:
作为'Adminstrator'
的'SharePointAdmin‘管理员帐户
发布于 2020-02-17 04:43:22
这是一个权限问题。
使用在您的$Session租户中具有全局管理权限的帐户创建O365,您将看到'Set-...' cmdlet自动下载并插入到会话中。
https://stackoverflow.com/questions/60105234
复制相似问题