You have to do:
$test = & $Env:WinDir\system32\inetsrv\appcmd.exe
If you wanted to redirect error as well, add 2>&1 in the end.
You have to do:
$test = & $Env:WinDir\system32\inetsrv\appcmd.exe
If you wanted to redirect error as well, add 2>&1 in the end.