I am very new to powershell. I am trying to write scripts in order to practice and get better. Unfortunately I am terrible at this currently.
I am trying to write a script to output to the window if an AD user password was set more than or less than 100 days ago.
Currently I have the below, I am not sure whether I am completely wrong or close, any help is much appreciated and if someone could explain where I have gone wrong this would also be appreciated.
Thank you very much for replying and I’m glad I was nearly there.
I understand that you need .adddays as the property now.
I thought -lt -100 would be less than 100 days old (in the above code). But I guess I should read this as less than -100 so anything 100+(101,102) etc.