Wcallsmc Wcallsmc
Wcallsmc Wcallsmc

Reputation: 11

How to get all OU in Ad with parameter (description blank ) - without description?

I am new in Powershell. Wanna to get all Organizational Units in Domain without description. ( description - blank )

I have script which gets all users with paramater "null description" But i need to find OUs.

$NoDescrUsers = Get-AdUser -Filter {(Enabled -eq "True" ) -and (description -notlike '*')} -Properties Description

Can anyone help to modify this script for OU-s?

Upvotes: 1

Views: 182

Answers (1)

Bernard Moeskops
Bernard Moeskops

Reputation: 1283

$NoDescrAD = Get-ADOrganizationalUnit -Filter {(description -notlike "*")} -Properties description

Upvotes: 2

Related Questions