# ---------------------------------------------------------------------------- # Script : # Function : Display the first 4 digits from active directory description object # Version : # Created by : # Created on : # Updated on : # Change : # ---------------------------------------------------------------------------- # edit below this line! Get-ADUser -Properties Description -SearchBase "OU=ou,OU=ou,OU=ou,DC=dc,DC=dc,DC=dc" -Filter * | Select-Object @{Name='First4Digits';Expression={$_.Description.Substring(0,4)}} | FT SamAccountName,Name,Description