To see the Help module for the New-QADUser cmdlet, run the following in the Active Roles Management Shell:
Help New-QADUser -ShowWindow
The results will include the following:
<quote>
-------------------------- EXAMPLE 3 --------------------------
C:\PS>$pw = read-host "Enter password" -AsSecureString
C:\PS>connect-qadService -service 'localhost' -proxy -ConnectionAccount 'company\administrator' -ConnectionPassword $pw
C:\PS>import-csv C:\temp\data.csv | %{new-qadUser -ParentContainer 'OU=companyOU,DC=company,DC=com' -name $_.'user name'}
C:\PS>disconnect-qadService
Description
-----------
Connect to the local Administration Service with the credentials of a specific user, import a CSV file, for each record in the file create a new user account with the name matching the value in the 'user name' column in the CSV file, and then disconnect.
In this example, the % character preceding the script block is an alias for the ForEach-Object cmdlet. The sAMAccountName attribute is assumed to be set by Quest One ActiveRoles.
</quote>