Hi all, I am a newbie to the world of powershell scripting and I have been looking around at other users scripts but none quite fit the bill. I am looking to retrieve the following data from AD and export it to a csv file so that another piece of software can import the csv. this script will then run as a scheduled task every night.
I need to extract the following information:
user needs to be active and the script will need to search sub OU's of a given OU i.e we have an OU called permanent and there are several sub OU's that we need to pull the users from.
The next part will be the same as above but for a different OU but we will need to exclude certain OU's from the script as we don't want or need these users on the exported list.
I need AD username, firstname, lastname, email address and we will be adding 2 custom fields to the users AD accounts for the afore mentioned csv for the other piece of software to import.
Any help would be greatly appreciated.
Thanks
David
David