如何在Exchange 2010中找出谁拥有完整邮箱访问权限的用户列表

时间:2015-07-23 13:31:40

标签: powershell exchange-server

我需要找到一种方法来查看哪些人可以完全访问Exchange 2010 PowerShell中的邮箱列表。我可以用 Get-Mailbox | Get-MailboxPermission |其中{$ .user.tostring()-ne " NT AUTHORITY \ SELF" -and $ .IsInherited -eq $ false}
查看谁拥有对我组织中每个邮箱的完全访问权限,但是想知道我是否可以调用CSV或文本文件来查看列出的邮箱的权限。

1 个答案:

答案 0 :(得分:1)

当然可以。您只需拨打Get-Content获取CSV,或foreach { get_mailbox -identity $_.name | ...}获取文本文件(一行=一个名称),然后为结果数组调用<<text file follows>> user1 user2 user3 <<script follows>> get-content textfile.txt | foreach { get_mailbox -identity $_ | get-mailboxpermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $.IsInherited -eq $false} } 。一个例子:

    var array = ["x", "y", "z"]
    var index = array.indexOf("y")
相关问题