PowerShell for Windows Admins:

Active Directory


November 6, 2013  1:11 PM

Get-ADUser issue



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

By default Get-ADUser returns a limited number of properties. If you wanted to see all properties on a user account you would do this Get-Aduser –Identity richard –Properties * This option appears to be broken in Windows 2012 R2 / PowerShell 4 PS C:\Windows\system32> Get-ADUser...

November 6, 2013  12:52 PM

Active Directory Lunches MEAPs chapter 21



Posted by: Richard Siddaway
Active Directory, Books, PowerShell

Manning have released an update MEAP for Active Directory Management in a Month of Lunches. This one adds chapter 21 and appendix B. Almost done now. Enjoy


November 4, 2013  3:05 PM

Managed by for groups



Posted by: Richard Siddaway
Active Directory, PowerShell

Many Active Directory objects have a ManagedBy attribute that shows the business owner of the group. Setting this doesn’t confer rights to manage the object. However in AD users and computers if you look at the Managed by tab for a group you will see a check box with the label “Manager can...


October 28, 2013  2:00 PM

Outputting collections from AD



Posted by: Richard Siddaway
Active Directory, PowerShell

Have you ever tried anything like this: Get-ADUser -Filter * -Properties * | Select Name, LastLogondate, PasswordNeverExpires, Enabled, @{N='OU'; E={($($_.distinguishedName) -split ",",2)[1] }}, Memberof | Export-csv -Path users.csv -NoTypeInformation You want some basic...


October 28, 2013  1:36 PM

Setting AD attributes from a CSV file



Posted by: Richard Siddaway
Active Directory, PowerShell

Back in this post http://richardspowershellblog.wordpress.com/2012/02/29/setting-a-users-home-directory/ I looked at setting the users home directory. I recently got a question about using a CSV file for input. CSV files have been around for years and are likely to be with us for a long time to...


October 9, 2013  2:05 PM

AD Management MEAP v 11



Posted by: Richard Siddaway
Active Directory, Books, PowerShell

The next MEAP for AD Management in a Month of Lunches is available from Manning – www.manning.com/siddaway3 This adds chapter 20 on maintaining and monitoring AD together with appendix A on searching AD Enjoy


October 8, 2013  2:48 PM

ADs 1000 object limit



Posted by: Richard Siddaway
Active Directory, PowerShell

By default when you query AD using a script or cmdlet you won’t get more than 1000 objects returned. If your AD contains 4000 users and you run Get-ADuser –filter * You’ll still only get the first 1000 users returned. This is by design to prevent you accidentally unleashing the...


September 21, 2013  5:37 AM

AD Month of Lunches–Chapt 18 & 19 in MEAP



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

An updated MEAP has been released for Active Directory Management in a Month of Lunches. This one adds chapters 18 & 19 Chapter 18, "Managing AD trusts" Chapter 19, "Troubleshooting your AD" The MEAP is available from www.manning.com/siddaway3 Enjoy


September 9, 2013  12:11 PM

Solving partial displays of AD properties



Posted by: Richard Siddaway
Active Directory, PowerShell

Had an interesting question today. The question concerned displaying the StreetAddress property when its multiple lines like this: PS> Get-ADUser -Identity dgreen -Properties StreetAddress | fl Name, StreetAddress Name : GREEN Dave StreetAddress : Floor 5 ...


September 6, 2013  2:45 PM

Cleaning up my AD



Posted by: Richard Siddaway
Active Directory, PowerShell

I decided it was time to clean some of the rubbish out of my test AD. I’ll be upgrading to Windows Server 2012 R2 next month so a bi tof a clean up now is a good idea. I decided to start with the computer objects. I’ve created & deleted quite a few virtual machines over the years so...


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: