Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is there a tool or command that we can use to check if the following attributes has been populated?

Posted on 2016-09-22
3
Medium Priority
?
159 Views
Last Modified: 2016-09-23
Is there a tool or command that we can use to check if the following attributes has been populated?

msExchMasterAccountSid = TargetAccount objectSid
msExchUserAccountControl – updated to 2
msExchRecipientTypeDetails will be updated to a value of 2
0
Comment
Question by:creative555
3 Comments
 
LVL 17

Expert Comment

by:Todd Nelson
ID: 41811600
Try this from a DC using an elevated command prompt...

csvde.exe -l DisplayName,objectClass,userPrincipalName,msExchMasterAccountSid,msExchUserAccountControl,msExchRecipientTypeDetails -f exch-attribs.csv

Open in new window

0
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 41811620
Following PowerShell command will export the accounts if any of the attributes are not updated correctly..
Import-Module Activedirectory
Get-AdUser -F * -Pr * | ?{!($_.msExchMasterAccountSid) -or $_.msExchUserAccountControl -eq "2" -or $_.msExchRecipientTypeDetails -eq  "2"} | Select Name,SamAccountName,msExchMasterAccountSid,msExchUserAccountControl,msExchRecipientTypeDetails | Export-Csv C:\report.csv -nti

Open in new window

PS : Code just check if the msExchMasterAccountSid values exist or not..
0
 

Author Closing Comment

by:creative555
ID: 41812582
This is great!! thank yo so much!
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Here's a look at newsworthy articles and community happenings during the last month.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

782 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