Solved

Send as checkbox check with all users security tab

Posted on 2011-02-14
2
495 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

790 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