My goal is to make a PS script that creates a CSV file with specefied domain users given name and a timestamp when that user was last modified in unix timestamp format.
I have figured out everything except how to convert the "Modified" AD Attribute value to unix timestamp and how to use that inline in the Select-Object "loop"
I have the following:
get-aduser -filter {name -like test} -property GivenName, Modified | Select-Object GivenName, Modified | Export-CSV -path C:\PS\user.csv
That gives me the following output
Test,2016-02-09 11:48:48
How do i go about doing something like this?:
...| Select-Object GivenName, Modified.convertedToUnixTimestamp() |...