원격 컴퓨터에서 프로그램을 제거하고 싶습니다. 설치에 사용 된 MSI의 위치를 알고 있습니다. 원격 서버에 있으며 경로는 아래의 변수 $MSIPathFile
에서 볼 수 있습니다.원격 컴퓨터에서 프로그램 제거
나는 다음과 같은 스크립트를 실행하면 :
Invoke-Command -Computer $TargetServer -ScriptBlock {Param($MSIPathFile, $UninstallFlag, $QuietFlag) Start-Process msiexec.exe "/x" $MSIPathFile "/qn"} -ArgumentList "$MSIPathFile", "/x", "/qn"
A positional parameter cannot be found that accepts argument 'c:\biztalkdeployment\x.Int.MIS-3.0.0.msi'.
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
사람이 내가 잘못하고있어 어떤 조언을 주시겠습니까 : 나는 다음과 같은 오류가
$TargetServer = "d-vasbiz01"
$MSIPathFile = "c:\biztalkdeployment\x.Int.MIS-3.0.0.msi"
Invoke-Command -Computer $TargetServer -ScriptBlock {Param($MSIPathFile, $UninstallFlag, $QuietFlag) Start-Process msiexec.exe "/x" $MSIPathFile "/qn"} -ArgumentList "$MSIPathFile", "/x", "/qn"
를?
대답 해 주셔서 감사합니다. 그러나 더 넓은 문제에 대한 대체 솔루션을 찾았습니다. –
이것이 작동하지 않는 이유를 설명하고, 동일한 문제가 발생하여이를 수행했습니다. – justinf