Solved

Send as checkbox check with all users security tab

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
A procedure for exporting installed hotfix details of remote computers using powershell
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now