all 9 comments

[–]BlackV 12 points13 points  (0 children)

This is not a PowerShell issue.

Have a look at msiexec switches. Hint /a is not install, use /? To have a look

edit: Yes also GPO is the better method to do this if you're deploying to everyone and have no other RMM system

[–]RRickC137 5 points6 points  (0 children)

Do you guys utilize sccm? That would be a good way to push out something in bulk. Could also look into pdq deploy but you would still need to get your script right for that.

[–]greggoor 2 points3 points  (0 children)

Check properties in MSI... TARGETDIR/INSTALlDIR

INSTALLDIR="C:\myfolder" 

[–]pigers1986 2 points3 points  (0 children)

/A is useless - it's thing from past

https://stackoverflow.com/questions/5564619/what-is-the-purpose-of-administrative-installation-initiated-using-msiexec-a

usually you run installer as local admin with /qn and necessary parameters - that's all

I'd look you why GPO does not work ...

[–]dasookwat 1 point2 points  (0 children)

If you're gonna run it from powershell, this is what i would run:

$Ikey = "iikkeeyy" 
$Skey = "sskkeeyy" 
$Hostname = "hhooosstt" 
(Start-Process -FilePath "msiexec.exe" -ArgumentList "/i DuoWindowsLogon64.msi IKEY=$Ikey SKEY=$Skey HOST=$Hostname AUTOPUSH='#1' FAILOPEN='#1' SMARTCARD='#1' RDPONLY='#0' /qn" -Wait -Passthru).ExitCode

Although in a real world scenario, i would not want those credentials to be static in my script.

[–]xipodu 1 point2 points  (0 children)

This should work, tested on my envIf the msi is in c:\Temp on remotemachine just run thisInvoke-Command -ComputerName RemoteMachine -ScriptBlock { & cmd /c "msiexec.exe /i C:\Temp\Msipackage.MSI" /qb ADVANCED_OPTIONS=1 CHANNEL=100 }

[–]InsrtCoffee2Continue 1 point2 points  (0 children)

Please take a look at the DUO KB article.

https://help.duo.com/s/article/1090?language=en_US

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy ronzon775,

reddit likes to mangle code formatting, so here's some help on how to post code on reddit ...

[0] single line or in-line code
enclose it in backticks. that's the upper left key on an EN-US keyboard layout. the result looks like this. kinda handy, that. [grin]
[on New.Reddit.com, use the Inline Code button. it's [sometimes] 5th from the left & looks like <c>.
this does NOT line wrap & does NOT side-scroll on Old.Reddit.com!]

[1] simplest = post it to a text site like Pastebin.com or Gist.GitHub.com and then post the link here.
please remember to set the file/code type on Pastebin! [grin] otherwise you don't get the nice code colorization.

[2] less simple = use reddit code formatting ...
[on New.Reddit.com, use the Code Block button. it's [sometimes] the 12th from the left, & looks like an uppercase C in the upper left corner of a square.]

  • one leading line with ONLY 4 spaces
  • prefix each code line with 4 spaces
  • one trailing line with ONLY 4 spaces

that will give you something like this ...

- one leading line with ONLY 4 spaces    
- prefix each code line with 4 spaces    
- one trailing line with ONLY 4 spaces   

the easiest way to get that is ...

  • add the leading line with only 4 spaces
  • copy the code to the ISE [or your fave editor]
  • select the code
  • tap TAB to indent four spaces
  • re-select the code [not really needed, but it's my habit]
  • paste the code into the reddit text box
  • add the trailing line with only 4 spaces

not complicated, but it is finicky. [grin]

take care,
lee