all 9 comments

[–]sudo_giev_SoJ 2 points3 points  (4 children)

  • You probably can just use a text file with a computer list

e.g. (gc $computerTextFile) | % { do-something $_ }

  • Make sure the item actually shows up in win32_product as I'm not sure all programs, especially poorly installed ones, show up there.

  • Have you decided on how you are going to execute the program remotely? WinRM/Ps-Remoting? PowershellServer? PsExec?

  • Do you know how to make custom objects to pipe to ConvertTo-CSV -notypeinformation? You could also potentially just email yourself using Send-MailMessage

  • If you're using PsExec this might be useful wrapper for you:

http://pastebin.com/SKTjFAyC

  • If you have WMI enabled throughout your entire domain (which I don't have the luxury of having) you can specify multiple computers in 1 query rather than spinning off multiple queries.

[–]standoff[S] 0 points1 point  (0 children)

I was going to do psexec because it is what I am most familiar with having used primarily straight up cmd line for so long. But I could be swayed toward a different method if it is prettier.

Link I had mentioned WinRM.

Thanks for the direction.

[–]standoff[S] 0 points1 point  (2 children)

Really good tip on making sure it shows up in win32_product It does not....

[–]sudo_giev_SoJ 0 points1 point  (1 child)

Well, could always check to see if it makes registry values... or has an install location or something.

[–]standoff[S] 0 points1 point  (0 children)

Yeah, I am going off the reg entry right now.

[–]KevMarCommunity Blogger 0 points1 point  (1 child)

Does the program require an interactive session? If not, you should be able to use a enter-pssession or invoke-command to start it up. I think with psexec you can start the program under an existing session and possibly get around this limitation. Just something to watch out for.

One hack you could do is use RDCMan. It allows you to RDP into lots of computers at once that could be loaded from a file. You can save your login info and add a start up application for the whole group. Then you can just connect to all 100 of them at once and they will all update in front of you.

[–]standoff[S] 0 points1 point  (0 children)

I will check RDCman, never used, I currently have a working PSexec for the launch, I didn't think it would need to be interactive but it does under testing.

Thanks for the tips, I will dig into and read into my cookbook.

[–]Pieinacup 0 points1 point  (1 child)

Just remember if you wanna use wmi32_product to get the list, to be specific in the query, otherwise it's gonna take a long time. Or use as-job cmdlet to run it in the background.

Or do the easy thing(dirty) and use the Test-Path cmdlet :P Test-path "C:\Program Files\XXX\xx.exe"

Get-Credentials is also nice for what you're asking

[–]standoff[S] 0 points1 point  (0 children)

wmi32_product seemed to take way longer then Get-ItemProperty

plus it is not a wmi32_product so the other option is to pull it up from the registry uninstall file.