問題描述
如何使用參數(描述空白)獲取廣告中的所有 OU ‑ 沒有描述? (How to get all OU in Ad with parameter (description blank ) ‑ without description?)
我是 Powershell 的新手。想要在沒有描述的情況下獲取域中的所有組織單位。(描述 ‑ 空白)
我有一個腳本,它使用參數“空描述”獲取所有用戶,但我需要找到 OU。
$NoDescrUsers = Get‑AdUser ‑Filter {(已啟用‑eq "True" ) ‑and (description ‑notlike '*')} ‑Properties Description
誰能幫忙修改這個 OU‑s 的腳本?
參考解法
方法 1:
$NoDescrAD = Get‑ADOrganizationalUnit ‑Filter {(description ‑notlike "*")} ‑Properties description
(by Wcallsmc Wcallsmc、Bernard Moeskops)