Tag Archives: Active Directory

PowerShell error with Get-ADUser user -Properties *

After upgrading some of our servers to Server 2012 R2, we’ve discovered a bug in the PowerShell 4.0 Get-ADUser cmdlet. When running the command Get-ADUser username -Properties *, the cmdlet returns the following error: Get-ADUser : One or more properties … Continue reading

Posted in Uncategorized | Tagged , | 3 Comments

ActiveDirectory module and UAC

I have noticed a few odd behaviors with PowerShell’s ActiveDirectory module, one regarding the msDS-UserPasswordExpiryTimeComputed attribute of the Get-ADUser cmdlet, and another regarding the New-ADServiceAccount cmdlet. On a brand new Server 2008 R2 domain, the following command returns values for … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Look for orphaned Active Directory home directories

This PowerShell script will iterate through all home directory folders in our Windows file share server and search Active Directory for a homeDirectory path value that ends with that folder name (it actually looks for *\<folderName> so it will only … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Detecting disconnected Exchange mailboxes

Here’s how to detect Active Directory accounts that had an Exchange 2010 SP1 mailbox at one time, but the mailbox has since been disconnected, aka disabled. Essentially find all accounts where a msExchWhenMailboxCreated value exists and a homeMDB value does not … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment