powershell - Filtering Search-ADAccount -


I am thinking that there is a way to filter it:

search-adaccount - Account Internal -Datetime ((Received-date). ADDESSE (-90)) - By adding

pipeline to user form:

| Where-Object {($ _ SamAccountName -notlike "* _ua1") - and ($ _.memberOf like "* UserAdminL1 *")}

It seems to freeze and

Perhaps there is a right way to do this?

Search-ADAccount group does not return membership. If you want to filter it, you can pipe it in the first get-AdUser to get the memberoff property. You are missing the where-object part of your filter and should be $ _.memberOf $ _. MemberOf . Compilation errors were trying to correct it for you, so there may be a copy paste problem with your question.

Search- ADAccount-AccountInactive-DateTime ((Received-Date) .adddays (-90)) -Userosterli | Go-Advertiser-Properties | Where the object {($ _ SamAccountName -notlike "* _ua1") -and ($ _ Member Member as "* UserAdminL1 *"}}

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -