The error you receive running the script with “powershell -file” is:
Cannot process argument transformation on parameter ‘Interactive’. Cannot convert value “System.String” to type “System.Boolean”, parameters of this type only accept booleans or numbers, use $true, $false, 1 or 0 instead.
It appears that powershell.exe does not fully evaluate script arguments when the
-File parameter is used. In particular, the
$false argument is being treated as a string value.
Instead of using
-File you could try
-Command, which will evaluate the call as script:
powershell.exe -NoProfile -Command .\Script.ps1 -Site Test -Interactive $false