Send as checkbox check with all users security tab

Posted on 2011-02-14
Last Modified: 2012-05-11

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

Question by:bsharath
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

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

LVL 11

Author Comment

ID: 34960606
Where can i mention the OU path

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

726 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