DelProf2.exe is an executable program, not a PS script.
You're calling DelProf2 directly, so there is no interactive shell and you need to pass DelProf2's command-line arguments in ArgumentList.
...
Type: Posts; User: garlin
DelProf2.exe is an executable program, not a PS script.
You're calling DelProf2 directly, so there is no interactive shell and you need to pass DelProf2's command-line arguments in ArgumentList.
...
Run a PS script in elevated mode. Will ask for permission if you're not already Administrator.
powershell "Start-Process powershell -ArgumentList '-NoProfile -ExecutionPolicy -File...