foodsite

 Search Topic: uniqs1537 share
 « Free Kindle Books: Intro Win Server 2012 & Intro SQL Server 2012 • Netbackup Master Server Question »

PToN
join:2001-10-04
Houston, TX

#### Powershell Remote execution help

Hello,

I've been trying different ways and i am still unable to get this done. I am trying to remotely install applications on windows 7 enterprise via powershell scripts.

I tried this:
Enter-PSSession -ComputerName COMPUTER -Credentials DOMAIN\Administrator | Invoke-Command {Start-Process "msiexec.exe" -ArgumentList "/i \\path\to\the\app\setup.exe /s /v" /qn OTHER=stuff"" -wait}



It just sits there, nothing happens... I dont even get an error. I also tried:
Enter-PSSession -ComputerName COMPUTER -Credentials DOMAIN\Administrator | Invoke-Command {Start-Process "\\path\to\the\app\setup.exe" -ArgumentList "/i  /s /v" /qn OTHER=stuff"" -wait}



Nothing seems to work... Any ideas?

Thanks.

The WeaseL
join:2001-12-03
Minnesota
I don't know Powershell enough to help there without the google, but have you tried using PSExec?
--
How lucky am I to have known someone who is so hard to say good-bye to.

PToN
join:2001-10-04
Houston, TX
Yeah, i've used PSExec, but was trying to unify everything into powershell as i've been writing a bunch of scripts and it is native to windows 7.

Thanks though.!

The WeaseL
join:2001-12-03
Minnesota
My other thought is the .exe. My experience when trying to remotely install an app that comes packaged in an .exe never has ended well. .msi files do well.

I don't know the program you are deploying so I can't say the above is your issue, but putting it out there for discussion.
--
How lucky am I to have known someone who is so hard to say good-bye to.

PToN
join:2001-10-04
Houston, TX
Well, the app has a switch to pass args directly to msiexec. But you have to start it with their exe. I gave up on that one and installed it manually as only a few people use it.

I tried with Chrome and it worked fine with:
$myses = New-PSSession -ComputerName COMPUTER -Credential user@domain Invoke-Command -Session$myses -ScriptBlock {Start-Process -FilePath "\$env:systemroot\System32\msiexec.exe" -ArgumentList "/q /I C:\Deploy\GoogleChromeStandaloneEnterprise.msi" -wait}



Thanks.

applerule

join:2012-12-23
Mars Hill, NC
kudos:1
Reviews:
·US Cellular
·Frontier Communi..
·Millenicom
Maybe too late...but how about...

Enter-PSSession -ComputerName COMPUTER -Credentials DOMAIN\Administrator | Invoke-Command {Start-Process "\\path\to\the\app\setup.exe" -ArgumentList '/i /s /v /qn" OTHER=stuff"' -wait

Not sure how your app is accepting arguments and where it needs its quotes but you can put powershell arguments in single quotes instead of double, and pass double quotes easily without having to escape them.

mkaishar

join:2000-12-20
united state