简体   繁体   中英

PowerShell Remoting Not installing MSI

Good Afternoon, I'm having some troubles getting the Microsoft Edge.msi to install onto a windows server 2012R2 through PowerShell Remoting. The code works on my local machine but when I try to parse it through with remoting it just hangs there and nothing happens. I've waited up to an hour in trying to troubleshoot this, so just looking for some help. \

The.msi file is located locally on the server. I do know that the PS Remoting connects to the server as I can pass commands to make folders as an example.

Invoke-Command $Server -Scriptblock {
    Write-Host "Installing Microsoft Edge"
    Start-Process C:\Source\BuildSource\Laptop\21-MicrosoftEdge\MicrosoftEdgeEnterpriseX64.msi /quiet -wait
    Write-Host "Microsoft Edge Installed"
}

Further to my comment I've just tested out the below method:

$installArgs = @(
    "/i"
    "C:\temp\MSEdge\MicrosoftEdgeEnterpriseX64.msi"
    "/qb!"
    )

Invoke-Command $Server -Scriptblock {
    write-Host "installing Microsoft Edge" 
    Start-Process "msiexec.exe" -ArgumentList  $installArgs -Wait
    Write-Host "Microsoft Edge installed" 
    }

I'd recommend adding some logging too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM