Determine Which Version of Powershell is installed

If you need to find out which version of Powershell is installed on a machine simply open Powershell and type:


Find an active directory users organizational unit (OU) using Powershell

Have you ever forgotten which organizational unit an active directory user resides in? You can use ‘Active Directory Users and Computers’ to quickly find the user using the ‘Find’ function but this doesn’t easily tell you which OU they belong to. Here is a very quick command to find the organizational unit (OU) that a user belongs to using Powersell, where USERNAME is the username  of the user you wish to examine. Simply run the Powershell, and then enter:


This will return the users details, including the Distinguished Name of their account, which will show which OU they belong to.

Using Get-ADUser to obtain OU information

If you don’t know their username, you can use the filter option to search by firstname or surname. Here is an example filtering by surname where USER_SURNAME is the users surname:

Get-ADUser -filter {Surname -like “USER_SURNAME“}