howtoI needed to dump a list of all users in a forest so that I could compare their UPN to their email address. I came up with this PS command that will connect to a GC, enumerate all users in the forest, and output a CSV that lists their displayname, emailAddress, and UPN. It will skip users with blank email or display, or accounts that are disabled.

The scriptlet assumes whoever runs it has administrative rights, and has the RSAT tools for AD installed on the machine they are using so the AD module exists. It doesn’t require anything else.

import-module activedirectory

get-aduser -filter {(EmailAddress -like "*") -and (DisplayName -like "*") -and (Enabled "True")} -searchscope subtree -searchbase ‘dc=yourdomain,dc=tld‘ -properties DisplayName, EmailAddress, UserPrincipalName, proxyAddresses -server yourgc.yourdomain.tld:3268 | select-object displayname, emailaddress, userprincipalname | export-csv c:\scratch\users.csv

Make sure you change the variables in italics to match your environment. Hope this helps someone out. If it does, consider a shoutout in the comments, or a follow on Twitter as a great way to say thanks!

{ 0 comments }

howto://fix diablo 3’s “click to retry creating d3d device”

2013-01-21

Plagued by Diablo 3 and the click to retry creating d3d device error when you try to play? I was too, but fixed it this way.

would you like to know more?

Keep Calm and Carry On

2013-01-04

Please check out the video below, and then visit http://keepcalmcampaign.co.uk/ to sign an e-petition against a truly egregious attempt to abuse trademarks and copyright laws. Direct link for RSS and email subscribers…http://youtu.be/FrHkKXFRbCI

would you like to know more?

howto://customise Lync 2013 status messages

2012-12-17

Victory is mine! I have figured out how to customise Lync 2013 status messages in much the same way that I previously used to customise Lync 2010. If you have recently upgraded to Office 2013, and I can tell which of you did by the big smiles, then this post’s for you!

would you like to know more?

howto://activate the wrong version of Windows 8

2012-11-08

Have you ever gone to MSDN or TechNet, downloaded an operating system ISO, installed it, and then discovered you grabbed the KMS version by mistake, and you don’t have a KMS server? Yeah, I hate it when that happens! Fortunately, you don’t have to flatten your box and start over again. There’s a (somewhat) easy [...]

would you like to know more?

howto://create test users with mailboxes and data

2012-10-22

Today’s post came out of a need to create 500 test users in AD, provision mailboxes for those users in Exchange 2010, and populate the mailboxes with data, all of which will be used to test velocity migrations from the on-prem Exchange 2010 environment to Office 365. As such, this post gets five different tags, [...]

would you like to know more?

10 Best Things about an Email Archiving Solution

2012-10-17

Isn’t it funny how a system built around a “best effort” protocol that was specifically designed for delay and latency, is now arguably the most important line of business application in your environment? The same coworkers who were probably using an AOL account only a few years ago now live and breathe email, and businesses [...]

would you like to know more?

Avast ye salty sea dogs! Savvy what day this be?

2012-09-19
would you like to know more?

Troubleshooting Exchange Archiving Issues

2012-09-07

As mailboxes grow, admins find themselves needing to deploy Exchange archiving to meet the storage demands of their users, while also ensuring continued performance of the overall system. Archive mailboxes are very similar to regular mailboxes, but there are some subtle differences that can make troubleshooting their use challenging. Here’s how to troubleshoot the most [...]

would you like to know more?

howto://fix the npf driver isn’t running

2012-09-05

Wireshark blues? Here’s the fix for the NPF driver isn’t running.

would you like to know more?

How to Improve Exchange Server Performance

2012-08-09

Three quick ways to boost Exchange performance and breathe new life into old servers.

would you like to know more?

howto://determine your PowerShell version

2012-07-27

How to determine what version of PowerShell you are using.

would you like to know more?