Active Directory Permissions and C#

I’ve been doing some work recently with C# querying AD for locked out users. One of the requirements for this was to only show users that can be altered by the user running the program.

Fortunately there is a computed AD attribute available for this to do the job, called allowedAttributesEffective. Here is some sample code to check a user for attributes you can write to:

Exchange 2003, PFDAVAdmin and PowerShell

I’ve been working with Exchange 2003 a bit recently, as part of a migration to Office 365. Most of the work has been around getting permission data, mailbox sizes and some other related data.

As part of that, I’ve written a couple of PowerShell scripts to grab some information we needed for the migration. The first is a script to get data from Exchange and AD in a 2003 domain using WMI. The second is a script to parse and output permission data from a PFDAVAdmin export in a more usable format.

I’ve put the two scripts on GitHub in my miscellaneous repository, under the PowerShell folder. Hopefully they come in useful to anyone else needing to make more sense of PFDAVAdmin exports, or pull mailbox data from Exchange 2003.

GitHub Gists and other snippets

I’m making more of an effort to post useful snippets of PowerShell and other stuff, like custom ADMX templates to either my GitHub Gists, or to a GitHub repository I’ve set up for miscellaneous bits and bobs.

As I’ve improved with PowerShell, it’s become easier to write generalised scripts, rather than highly targeted ones, so that I can solve similar problems, or share pieces of scripts around more easily.

If you’d like to learn more about Windows PowerShell check out and the PowerScripting Podcast, they are nice friendly places that are easy to navigate and full to the brim with good content.

Smooth seas don't make good sailors.