Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

search managedby not present using -filter, not -ldapfilter

$
0
0

Hello all,

Trying to use get-adgroup -filter to find groups with "managedby" not present. I realize I could easily use the -Ldapfilter to accomplish this, but I'd like to know if it's possible todirectly use -filter also. Apparently, PowerShell tells me I can only use "eq" or "ne" when referencing "managedby" when using -filter, so -like or -notlike won't work. The following code doesn't work because PowerShell is trying to resolve a manager called "*":

get-adgroup -filter {managedby -ne "*"}

Anyone know how to accomplish this task directly using -filter and not -ldapfilter? Is it possible?


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>