嗨,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我做错了什么?!
发布于 2016-09-19 05:56:40
使用以下命令启用exchange功能:
add-pssnapin *exchange* -erroraction SilentlyContinue然后使用Get-Mailbox命令。
发布于 2015-03-26 06:24:40
我发现我没有正确的权限来获取这些cmdlet,感谢mjolinor为我指明了正确的方向(不知道为什么我一开始就没有考虑到这一点)。
不确定此cmdlet与哪个RBAC角色相关联,但当您执行导入-PSSession时,您将获得一个为您所属的RBAC角色自定义的功能模块。如果您不是允许查看这些权限的RBAC角色,则该cmdlet不可用。- mjolinor 9小时前
https://stackoverflow.com/questions/29249397
复制相似问题