Running Multiple reacl.exe Instances in Parallel for NAS Processing

If you’re managing large-scale file share migrations or ACL updates using the command line tool reacl.exe in On Demand AD Migration, you’ve probably encountered difficulties trying to configure them to run all at once from a jump host. I recently faced this challenge and built a PowerShell script to streamline the process. Here’s how you can do it too.

Prerequisites

Before you dive in, ensure the following:

  • Install the Desktop Agent on the server where you’ll run the script.

  • Update your system Path to include the location of reacl.exe.

  • Run a single reacl job manually from the console under FileShares to generate the necessary password and config files.

Preparing Your Config Files

Once you’ve run a job manually:

  1. Grab the generated Reacl-Config.json file. You can find it at:
    • C:\Program Files (x86)\Quest\On Demand Migration Active Directory Agent
  2. Create a template version of this file. Replace the path with a placeholder like XXXX, so you can dynamically update it later.
  3. Build a ShareList.txt file containing all the shares you want to process.

Important: Be sure to run your PowerShell session as Administrator. Without elevation, impersonation will fail, meaning the ReACL process will fail as well.

Example PowerShell Script

Here’s the script I used to automate the process of running multiple reacl jobs in parallel:

$jFile = "C:\quest\Reacl-config.json"
$shareFile = "C:\quest\ShareList.txt"

$shareList = Get-Content -Path $shareFile

Foreach ($share in $shareList)
{
$splitShare = $share.split("\\")
$configName = $splitShare[$splitShare.count-1]

$jsonContent = Get-Content -Path $jFile | ConvertFrom-Json
$jsonContent.remoteFolders[0].path = $jsonContent.remoteFolders.path.Replace("XXXX",$share)
$outJson = "c:\quest\reacl-config-" + $configName + ".json"
$jsonContent | ConvertTo-Json -Depth 10 | Set-Content $outJson

$cmdFile = 'c:\quest\reacl' + $configName + '.cmd'
$logFile = '"c:\Quest\' + $configName + '.log"'
$cmdLine = 'reacl.exe /CONFIG:' + '"' + $outJson + '"' + ' > ' + $logFile
$cmdLine | set-content $cmdFile
Start-Process -FilePath "cmd.exe" -ArgumentList "/k", $cmdFile
#pause
}

Pro Tip

The key line in the script:

$jsonContent.remoteFolders[0].path = $jsonContent.remoteFolders.path.Replace("XXXX",$share)

This is the correct way to reference a multi-valued stanza in a JSON file. I had to fight through a few AI-generated misfires to get this right—so now you don’t have to!