Bulk group user allocation PowerShell script

  • Updated

Filespace group user allocations can be added in bulk via our CLI. 

Powershell:

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

$GROUPS = Get-Content $FILE

foreach ($LINES in $GROUPS) {
  $GROUP, $USR = $LINES -split ';' -replace '^\s*|\s*$'


Start-Process -WindowStyle hidden -FilePath "C:\Program Files\Lucid\Resources\Lucid.exe" -ArgumentList "group --set $GROUP --add-user $USR --password $PASSWORD" -Wait
}

Usage: 

./bulkgroup.ps1 d:\groups.txt <password>

Example text file:

editor ; alice 
reviewer ; bob

 

 

Was this article helpful?

0 out of 0 found this helpful