When deploying the agent software to a network collector we should be able to select the drive we want to install it on and this should update the script to be ran in PowerShell.
You can do this by using the offline installer for the Network Collector - I actually have more success using this than I do the PowerShell script solution.