PowerShell for Windows Admins:

Active Directory


February 24, 2016  1:14 PM

Get-ADUser quirk

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Came across an interesting quirk of the way Get-ADUser works.   If you use the –Identity parameter and tell it to find a specific user PS> Get-ADUser -Identity dontexist Get-ADUser : Cannot find an object with identity: 'dontexist' under: 'DC=Manticore,DC=org'. At line:1...

February 6, 2016  6:11 AM

Not the comma!

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

There is a habit among some AD administrators to create their users so that the name is surname, firstname   - Note the comma between the two names. As an example the name would be Brown, Bill instaead of Bill Brown If you’re just using the GUI tools it doesn’t matter too much and...


February 4, 2016  7:47 AM

Some thoughts on finding a users OU

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Back in this post http://itknowledgeexchange.techtarget.com/powershell/discovering-a-users-ou/ I showed how to get the...


February 2, 2016  8:15 AM

AD Management MoL Deal – – 3 February 2016

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Books, Powershell

My Learn Active Directory Management in a Month of Lunches will be part of Manning’s Deal of the Day on 3 February 2016. Half off my book Learn Active Directory Management in a Month of Lunches. Use code dotd020316au at


January 27, 2016  9:37 AM

Which filter

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Get-ADUser has 2 filter parameters. The –Filter takes a PowerShell syntax filter e.g. Get-ADUser -Filter {Name -eq 'Richard'} The –LDAPfilter takes an LDAP search filter e.g. Get-ADUser -LDAPFilter "(Name=Richard)" Mixing them up will ensure you don’t get the results you...


January 18, 2016  1:44 PM

Setting external time source in AD

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

The PDC emaulator in the root domain of your AD forest should point to an external time source. For some odd reason the PDC emulator in my lab wasn’t doing that. Easily remedied: ## ## set external time source ## set server type to NTP Set-ItemProperty -Path...


December 17, 2015  1:31 PM

Outputting AD data to CSV

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Back in this post 0 Comments     RSS Feed     Email a friend


August 30, 2015  10:50 AM

Manning Deal of the Day–31 August 2015

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Deal of the Day August 31: Half off my book Learn Active Directory Management in a Month of Lunches. Use code dotd083115au at


July 22, 2015  8:04 AM

Using parameters instead of read-host when getting AD replication data

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

I’ve seen a lot of scripts recently that use Read-Host to get input data.  This is generally not best practice – I tend to only use Read-Host if I want to get a password and obscure the text on screen. A better practice is to use parameters – either in a function or a script. As an...


July 17, 2015  12:37 PM

get-computerDN–dealing with non-existant computers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

If you look at the working part of the code to discover the distinguished name of a computer:   £> $computer = 'w12r2sus' £> $filter = “(&(objectCategory=computer)(objectClass=computer)(cn=$computer))” £>...


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: