Hello,
Is it possible to create (and perhaps provide a sample) a powershell script or built-in functionality that would allow for If/Then routines in bulk user account creation?
For example, we bulk create hundreds of users from a CSV. However, a large portion of those users may already exist. Therefore, I would like to do something like:
1) Attempt to create user from csv using template
if user exists:
a) Determine if account is disabled.
If Disabled: Re-enable, move to OU (if needed) and reset password and execute custom script upon completion
If Account enabled, check "end date" and change to end date in CSV
I have lots of issues with trying to create or update accounts that already exist.
First I run the bulk import,
then I export the results as csv,
then I filter results csv for all unsuccessful,
then I have to create a bulk csv file to find the SamAccountName of the duplicate users,
THen I have to determine status of dup accounts
Then I have to create an automation policy to "modify" bulk accounts from template to:
-Move end date
-Re-enable and reset
-Run custom script
As you can see, this is a very convoluted manual process and it may be easier for our admins to just do account manipulation manually for dup accounts.
Ideas??