Solved

Send as checkbox check with all users security tab

Posted on 2011-02-14
2
494 Views
Last Modified: 2012-05-11
Hi.

Send as checkbox check with all users security tab

i need to check all users in an OU and sub ou's where users have the send as selected with who the user it is selected and extracted to a txt file

regards
sharath
0
Comment
Question by:bsharath
2 Comments
 
LVL 8

Accepted Solution

by:
jwarnken earned 500 total points
ID: 34893272
Try this
function Get-OU
{
$search = [System.DirectoryServices.DirectorySearcher]([adsi]“”)
$search.Filter = “(objectClass=organizationalUnit)”
$ounames = $search.Findall()
return $ounames
}
 $AllMailboxes = @()
 foreach ($ou in Get-OU)
 {
  $AllMailboxes += Get-Mailbox -OrganizationalUnit $ou.Properties.distinguishedname[0]`
-ResultSize Unlimited | Get-ADPermission | where { ($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”) } | Select Identity, User, Deny
 $AllMailboxes |Export-Csv c:\test.csv -NoTypeInformation

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 34960606
Thanks
Where can i mention the OU path
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn how to implement Singleton Design Pattern in Java.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question