Is there a special reason why you’re still using the old and obsolete Quest AD PowerShell module? I’d recommend to use the original MSFT AD PowerShell module installed with the RSAT tools.
Because as part of the script which you dont see it is connecting to a Managed Unit within the Quest product. If i was targeting a standard OU then the AD native would be fine.