troubleshooting Question

powershell to grab ad users having an extensionattribute stored as a string but representing a date (range of dates need to be retrieved)

Avatar of Fr. Vandecan
Fr. VandecanFlag for Belgium asked on
2 Comments1 Solution76 ViewsLast Modified:
I need to search all user having the extensionattribute < than a date (2017-04-01) and > a date (2017-03-23). lets say the date 2017-04-01 and the 7 days before.

the date is stored as string in the extensionattribute11 on format YYYYMMDD
this is working but I'm not able to combine this with the check a a real date to be sure that I get the result I want.
get-aduser -Filter "extensionattribute11 -like '20170401'"

any help would be grateful
Fr. Vandecan
Technology Sweeper

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros