Attempting to silently install .Net 4.7.2 on a remote machine using Invoke-Command but no matter what type of parameters I've tried I keep getting...
- Invoke-Command : Parameter set cannot be resolved using the specified named parameters.
I've tried parameters like /q /quiet /passive and all that is provided keeps on getting the error.
Invoke-Command -ComputerName $problemChild -ScriptBlock { Start-Process "c:\windows\temp\dotNet472.exe" -ArgumentList '/q /norestart' -Wait -NoNewWindow -ErrorAction SilentlyContinue -ErrorVariable dotNetError -Verb RunAs }
Expecting to install .Net 4.7.2 silently with no reboot, just incase the user is still logged in.
Executing the command on a Win 7 with PS version 4 on a remote machine running Win 7 PS 2. I've confirmed that the parameters passed are the correct ones from MS article.
** Edit: Removing -NoNewWindow get's rid of the error but the installer doesn't run. While running the command below on the remote machine, get's the installer going and no issues are seen.
Start-Process "c:\windows\temp\dotNet472.exe" -ArgumentList '/q /norestart' -Wait -ErrorAction SilentlyContinue -ErrorVariable dotNetError -Verb RunAs