使用 PowerShell 2.0 在远程计算机上进行 MSI.EXEC

使用 PowerShell 2.0 在远程计算机上进行 MSI.EXEC

您好,我在 Server1 上有一个 MSI 包,想将其安装在 Server2 上。MSI 包在 Server1 上。有人能帮我设置安装程序的远程文件路径吗?

Invoke-Command -ScriptBlock {Start-Process "msiexec.exe" -ArgumentList "/i \\Server1\d$\Drop\Package\DirectMSI.msi /lvx C:\installer.log INSTALLLOCATION=D:\Websites\DirectDevInt ENVPROPERTY=DEV  /quiet" -Wait} -ComputerName "Server2"

主要问题是如何设置文件路径“\Server1\d$\Drop\Package\DirectMSI.msi”

参见下面的日志:

=== Verbose logging started: 4/8/2013  13:00:27  Build type: SHIP UNICODE 5.00.7601.00  Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c): Resetting cached policy values
MSI (c): Machine policy value 'Debug' is 0
MSI (c): ******* RunEngine: ******* Product: \\Server1\d$\Drop\Package\DirectMSI.msi
******* Action:  ******* CommandLine: **********
MSI (c): Client-side and UI is none or basic: Running entire install on the server.
MSI (c):Grabbed execution mutex.
MSI (c): Cloaking enabled.
MSI (c): Attempting to enable all disabled privileges before calling Install on Server
MSI (c): Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s): Running installation inside multi-package transaction \\Server1\d$\Drop\Package\DirectMSI.msi
MSI (s): Grabbed execution mutex.
MSI (s): Resetting cached policy values
MSI (s): Machine policy value 'Debug' is 0
MSI (s)******* RunEngine:******* Product: \\Server1\d$\Drop\Package\DirectMSI.msi
 ******* Action: 
 ******* CommandLine: **********
MSI (s) Note: 1: 2203 2: \\Server1\d$\Drop\Package\DirectMSI.msi 3: -2147287035 
MSI (s): MainEngineThread is returning 1619
MSI (s): User policy value 'DisableRollback' is 0
MSI (s): Machine policy value 'DisableRollback' is 0
MSI (s): Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s): Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s): Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s): Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s): Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s): Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s): Restoring environment variables
MSI (c): Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c): MainEngineThread is returning 1619
=== Verbose logging stopped: 4/8/2013  13:00:27 ===

答案1

至少,你面临着双跳问题并且需要设置 CredSSP 才能使其工作。

但可能还有其他问题您没有告诉我们。请参阅我对原始问题的评论。

相关内容