A colleague recently asked me a list of all employees in our company, and their date of hire. As I work at an IT department, I do not have everyones contract. However, I do have the creation date of every account. Since we create accounts a few dates before the date of hire, I could easily create a list of accounts and creation dates in the Exchange Management Shell (Powershell):
get-user | Select-Object samaccountname,firstname,lastname,whencreated |
Sort-Object whencreated | Export-Csv c:\temp\Accounts_and_CreationDate.csv
The script above will first list all users, then limit all user information to four properties (accountname, first name, last name, and the date of creation), then sort the list on creation date, and then export this list to a comma separated file
hi
thank you soo much but what if i want the smtp address also
Regards
Thanks! That worked perfectly!