首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置-组织结构不被识别,即使我可以得到-OrganizationConfig

设置-组织结构不被识别,即使我可以得到-OrganizationConfig
EN

Stack Overflow用户
提问于 2020-02-06 23:45:47
回答 1查看 9.8K关注 0票数 3

我正试图将“集中收件箱”设置为整个组织的残疾人。我在网上找到了很多脚本和教程,其中大部分都指向在PowerShell中使用Exchange会话。

例如:

我的PS脚本如下:

代码语言:javascript
复制
# 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‘命令时,它会失败,并收到以下消息:

代码语言:javascript
复制
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'

  • Using运行PS的
  • 凭据

的'SharePointAdmin‘管理员帐户

EN

回答 1

Stack Overflow用户

发布于 2020-02-17 04:43:22

这是一个权限问题。

使用在您的$Session租户中具有全局管理权限的帐户创建O365,您将看到'Set-...' cmdlet自动下载并插入到会话中。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60105234

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档