calling vbscript in powershell
I want to run a vbscript from a powereshell. I used cscript.exe and location of vbs. Manually I can get it to work, but through SCCM it does not work. The script basically uninstalls the old version. So manually I see the powershell executes fine by uninstalling but when I try through SCCM nothing happens, it passes through without uninstalling .
$command =" $Path\Uninstall.vbs"
$install = Start-process "CScript.exe" -ArgumentList $Command -Wait -Passthru -Windowstyle hidden