Your post is only selecting users, you are not selecting any date info relative to the user or what’s in the CSV. Thus you can compare anything that you have not asked code. You don’t show any part of the CSV, so we see what the date string / format looks like.
You say …
Any Ideas on how to achieve this or plan this because I am new to PowerShell.
… that's all well and good, as we all had to start form somewhere, but, you should really spend the needed time getting up to speed on it, to limit / eliminate, confusions, frustration, unnecessary errors, bad habits, poor code, and hurting your system or your environment.
See these resources below and the Free eBooks / videos on this site you asked this on. Use the ‘Free Resources’ like in the side menu section and the search bar to see other posts that could be close to what you are asking for.
You are just doing a read here, so, no real damage can be done, but just saying, as you go down this path, don’t guess, read the help files, view the videos on YouTube and MSDN Channel9 on PowerShell and ADDS, files, folders, loops, compare, etc. Just search for them.
Your query is really a PowerShell with ADDS 101 thing. Something easily found using your favorite search engine. Looking for stuff like ‘PowerShell working with csv’, ‘PowerShell date compare’, ‘PowerShell compare csv dates to active directory dates’, etc. Thus getting back stuff like this…
Compare AD against CSV - https://community.idera.com/database-tools/powershell/ask_the_experts/f/active_directory__powershell_remoting-9/19887/compare-ad-against-csv
PowerShell Dates - PowerShell Dates
Learning this stuff.
https://www.reddit.com/r/PowerShell/comments/bserj9/learn_powershell/eooduq9/?context=3
https://www.reddit.com/r/PowerShell/comments/bserj9/learn_powershell/eoodxzu/?context=3
Best Practices
https://www.reddit.com/user/get-postanote
Passwords
https://www.reddit.com/r/PowerShell/comments/bv7ywa/whats_the_best_practice_for_passwords_in_ps/epoux2c/?context=3
https://www.reddit.com/r/PowerShell/comments/c5qbjb/how_to_store_password_in_powershell_file/
Practice with PSKoans
PSKoans : 0.50.0
A module designed to provide a crash-course introduction to PowerShell with programming koans.
Book references, normally the ones you’ll see most recommend:
Beginning —
Learn Windows PowerShell in a Month of Lunches 3rd Edition
Donald W. Jones (Author), Jeffrey Hicks (Author)
ISBN-13: 978-1617294167
ISBN-10: 1617294160
Intermediate —
Windows PowerShell Cookbook: The Complete Guide to Scripting Microsoft’s Command Shell 3rd Edition
Lee Holmes (Author)
ISBN-13: 978-1449320683
ISBN-10: 1449320686
Advanced —
Windows PowerShell in Action 3rd Edition
by Bruce Payette (Author), Richard Siddaway (Author)
ISBN-13: 978-1633430297
ISBN-10: 1633430294
From Microsoft
Windows PowerShell Survival Guide
https://social.technet.microsoft.com/wiki/contents/articles/183.windows-powershell-survival-guide.aspx
Lastly, never ever, run any code from any one from anywhere, that you do not fully understand and what it is / will do. If you do, you could seriously damage your host and or your enterprise. Learn to master the -WhatIf, -Confirm, and leveraging the Set-StrictMode are part of your development, put that in your profile. Learn about profiles, and how to use them. Learn about execution policies, what they are and how / when to use them. Fully leverage auditing, monitoring and logging of PowerShell use by all users and processes. Especially as part of your corporate risk management effort.