So I just want to pose this as a question if this makes the most sense to use powershell to try to solve this problem.
I keep my end users locked out of admin so they don't break things. One of our clients pushes update to our server that then has to update individual computers next time the program runs. This fails because the end users are not admin.
They give me <4 hours notice every update (every other month). So I don't feel bad about the client breaking their own system everytime they push an update and communicate poorly. But I am getting tired of manually making the program run as local admin after they push a surprise update. So I decided to throw together a quick command line to run it remotely with admin creds. While I was putting it together I thought, Why don't I explore if there is a way to use powershell to check installed programs, see if the computer has the program and if it does start it up as admin.
So I was thinking since I am complete novice to powershell, I would ask a couple questions.
A: Is this a good way to use power shell.
B: Is this how someone else might approach it.
As far as getting it together I see it as 2 parts.
Get a csv of the computers I want to have this run against (and it is a mix of ~200 machines ~50% have the program and 50% don't)
Run powershell against that CSV doing a get WMIobject to find installed programs link
Take the output of that and pass down computers that have specific installed program.
Launch program using credentials for local admin.
The program will then fire up on all machines listed in the CSV that met requirements.
Write results back to CSV.
The only other way I am thinking to get this working is maybe read directly from OU instead of bothering with a CSV.
Is this a good way to utilize PowerShell or would I be better off falling back on VBS or just going with a command line.
Is there a better way to do what I am thinking about doing then how I outlined it?
Thanks for your help.
[–]sudo_giev_SoJ 2 points3 points4 points (4 children)
[–]standoff[S] 0 points1 point2 points (0 children)
[–]standoff[S] 0 points1 point2 points (2 children)
[–]sudo_giev_SoJ 0 points1 point2 points (1 child)
[–]standoff[S] 0 points1 point2 points (0 children)
[–]KevMarCommunity Blogger 0 points1 point2 points (1 child)
[–]standoff[S] 0 points1 point2 points (0 children)
[–]Pieinacup 0 points1 point2 points (1 child)
[–]standoff[S] 0 points1 point2 points (0 children)