How could I write a PowerShell script that will export all AD users by USER > LAST LOGIN DATE > PASSWORD CHANGE DATE > ROOT OU > SUB OU > SUB OU with all data separated by cells in a CSV file?
It would be nice to have the everything separated by cells with headers, date output with year first yyy-mm-dd, and OU path outputted with root OU first.

I tested in my environment.
You can use below PowerShell command