Bulk user creation PowerShell script

  • Updated

Filespace users can be created in bulk via our CLI. 

Powershell:

Param(
    [string]$FILE,
    [string]$PASSWORD
)

$USERS = Get-Content $FILE

foreach ($LINES in $USERS) {
    $USR, $PWD, $EMAIL = $LINES -split ';' -replace '^\s*|\s*$'
    Start-Process -WindowStyle hidden -FilePath "C:\Program Files\Lucid\Resources\Lucid.exe" -ArgumentList "user --create $USR --user-password $PWD --user-email $EMAIL --password $PASSWORD" -Wait
}

Usage: 

./bulkuser.ps1 d:\users.txt <password>

Example text file:

alice ; mom123! ; alice@acme.com
bob ; pop456# ; bob@acme.com
Force users to change their temp password at logon with `--user-force-pwd-change` option.

 

Was this article helpful?

0 out of 0 found this helpful