PowerShell for Windows Admins:

Active Directory


September 5, 2013  2:46 PM

Discovering a users OU



Posted by: Richard Siddaway
Active Directory, PowerShell

Interesting question – how do you discover the OU in which an AD user is sitting? The Quest cmdlets were very helpful because they had a ParentContainer property. With the Microsoft cmdlets you have to do a bit of work There are two places to look – the distinguished name and the canonical...

August 30, 2013  11:09 AM

Filtering AD searches



Posted by: Richard Siddaway
Active Directory, PowerShell

Interesting question came up regarding how you define a Filter when you are searching for particular users. With the Microsoft cmdlets you can define a filter or an ldapfilter. In these examples we’re looking for users that don’t have email addresses. First lets look at a filter PS>...


August 29, 2013  12:11 PM

AD Management MEAP–chapter 17



Posted by: Richard Siddaway
Active Directory, Books, PowerShell 3, Windows Server 2012

My Learn AD Management in a Month of Lunches is moving on apace with the release of chapter 17 to the Early Access Process. This one covers AD replication www.manning.com/siddaway3 Enjoy


August 26, 2013  2:37 PM

Get-AdUser and –properties



Posted by: Richard Siddaway
Active Directory, PowerShell

The Get-ADuser cmdlet returns a small subset of properties by default: PS> Get-ADUser -Identity Richard DistinguishedName : CN=Richard,CN=Users,DC=Manticore,DC=org Enabled : True GivenName : Richard Name : Richard ObjectClass : user ObjectGUID ...


August 13, 2013  2:35 PM

AD Management in a Month of Lunches–chapter 16 MEAP



Posted by: Richard Siddaway
Active Directory, Books, PowerShell

The next chapter of AD Management in a Month of Lunches has been released to MEAP www.manning.com/siddaway3 Chapter 16 deals with Sites and Subnets Enjoy


August 12, 2013  1:48 PM

Active Directory Cookbook 4th Ed



Posted by: Richard Siddaway
Active Directory, Books, PowerShell, Windows Server 2012

The Active Directory Cookbook (O’Reilly ISBN: 978-1-449-36142-6) has been a constant resource for me since the first edition covering Windows 2003. I plundered the book for a lot of my early forays in scripting AD. The cookbook supplied answers using as many as possible of the GUI tools, command...


August 11, 2013  3:33 PM

Time Spans



Posted by: Richard Siddaway
Active Directory, PowerShell

I’ve been using Search-ADaccount a lot recently. One of the options is to input a timespan to determine for far back in time to search e.g. for accounts that have been inactive for 90 days The cmdlet takes a string that can be turned into a timespan. if you look at the documentation the data...


August 11, 2013  1:56 PM

WMI and Trusts



Posted by: Richard Siddaway
Active Directory, PowerShell, Windows Server 2012, WMI

When you install AD on a machine you get the MicrosoftActiveDirectory WMI namespace as well. This namespace was deprecated in Windows 2012 but while it is still available there are few useful things we can do with it. Even with my fondness of WMI I’m not suggesting moving to using WMI wholesale...


August 7, 2013  1:59 AM

Time oddity



Posted by: Richard Siddaway
Active Directory, CIM, PowerShell, WMI

I was looking for a test of time synchronisation on domain controllers and knew that the .NET domain controller object held a system property. So, I cam up with this $dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() $dom.DomainControllers | Format-Table Name,...


July 15, 2013  12:32 PM

AD Management MEAP



Posted by: Richard Siddaway
Active Directory, Books, PowerShell, Windows Server 2012

A new MEAP was released last week for AD Management in a Month of Lunches. Chapters 1-15 are now available http://www.manning.com/siddaway3/


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: