Aha! OK thanks - I've tweaked the variables a little in the first few lines so they are now:
<br>
Import-Module Adaxes
$csvFilePath = "\ourSERVER\ourshare\file.csv"
$userIdColumn = "userPrincipalName"
$userIdProperty = "sAMAccountName"
$accountPasswordColumn = "TempPasswd"
$aDObjectProperties = @("Manager")
$domainName = $Context.GetObjectDomain("%distinguishedName%")
$importedUsers = Import-Csv -Path $csvFilePath
All the rest of the script is unchanged. Our csv headers are:: givenName,sn,name,mail,userPrincipalName,sAMAccountName,physicalDeliveryOfficeName,manager,employeeID,employeeType,extensionAttribute1,TempPasswd,Enabled
The manager column contains the name of the user's manager - as in the AD property name in the format "Alex Smith".
It looks like if we run this script it will create new users as well as disabling those with FALSE in the Enabled column of the csv. Two birds with one stone, yay!
1. Can you confirm that the variables as set in my above code will achieve our goal?
2. Will running this script create new users and that we can create a business rule to clean up the finer points of provisioning as described in https://www.adaxes.com/tutorials_AutomatingDailyTasks_AutomateUserProvisioning.htm ?
3. Is there a way to run this script in some kind of "verify" mode that outputs a report of changes that would have been made but does not actually make those changes?
If yes to all 3, and a 'how to' for Q3 then I think I will have all I need for the moment.
Graham