Powershell - Exchange 2013 Question

Yevrag35

Pushing Daisies on Saturn
Messages
1,118
Location
Wisconsin, US
So the company I work for is (in a way) "splitting" in half. The parent company and the subsidiaries are all under the same roof, therefore we share resources. More directly to the point, we share Exchange.

One of the companies wants to take their distribution lists & mail-enabled public folders with them. The distributions lists were easy enough to figure out, but the public folders not so much.

Because *all* of the public folders email addresses are under the parent company's domain, I have no way to tell which public folder belongs to which company.

Using this powershell command:
Code:
Get-PublicFolder -Recurse | ? MailEnabled -eq $true
I found all of the mail-enabled pf's, and by using this command:
Code:
$pf = Get-PublicFolder -Recurse | ? MailEnabled -eq $true | Sort Name
ForEach($mail in $pf)
    {
    $name = $mail.Name
    $id = $mail.Identity
    Write "PF Name: $name"
    $members = (Get-PublicFolderClientPermission -Identity $id).User
    Write "Members: $members"
    }
I name the Public Folders and list their members (crudely, but it works).


So, can I take this information to narrow my search to only find those pf's with members from a certain OU in AD?
 
Back
Top Bottom