简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM