【发布时间】:2015-05-28 18:05:33
【问题描述】:
大家好 Stackoverflow,
我一直在尝试使用 Get-MailboxPermission cmdlet 对我的所有邮箱运行报告。我已经运行了这段代码(很多次)
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://Exchange Server/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Import-PSSession $Session
这为我提供了其他交换 cmdlet,例如 Get-Mailbox。尝试运行命令时收到的消息如下
Get-MailboxPermission : The term 'Get-MailboxPermission' is not recognized
as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Get-MailboxPermission
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-MailboxPermission:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我做错了什么?!
【问题讨论】:
-
这个答案有帮助吗:stackoverflow.com/a/12748293/419
-
不确定此 cmdlet 与哪个 RBAC 角色相关联,但是当您执行 Import-PSSession 时,您将获得一个针对您所属的 RBAC 角色定制的功能模块。如果您不是允许查看这些权限的 RBAC 角色,您将无法使用该 cmdlet。
标签: powershell exchange-server cmdlets cmdlet