嗨#1人,獲取-MailboxPermissions cmdlet將不工作/認可
我一直在嘗試使用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
我在做什麼錯了?
此答案幫助:http://stackoverflow.com/a/12748293/419 – Kev 2015-03-25 11:44:00
不確定此cmdlet與哪個RBAC角色相關聯,但是當您執行Import-PSSession時,您將獲得一個函數模塊根據您所屬的RBAC角色進行定製。如果您不在允許查看這些權限的RBAC角色中,則不會有該cmdlet可用。 – mjolinor 2015-03-25 12:30:36