Add Snapin to all hosts by OS
-
I’m trying to come up with a mysql query that would do this, but I’m outside my comfort zone for sure. I have a snapin that I need to deploy to all hosts that have XP for their OS. I was originally going to create a group of XP machines, but I couldn’t group them by OS. I have a list of hostIDs of machines that are XP, but I’m not sure how to go about creating the mysql query to do this.
-
This is actually really difficult to implement. Especially since the OS is now changed over to be a part of the image vs. associated to the host.
It’s fairly simple at the same time and shouldn’t require an sql request.
If you know the hosts that are of a particular image (or set of images that are of the OS you want) just create a group with those hosts in it. Go to Snapins from the newly created group and add the snapins you want associated to the hosts within that group.
-
Unfortunately there are 500 or so hosts that are still using XP. I should have mentioned before, I’m still on .32 , so the OS association is still by host I think.
-
Did 0.32 have a search feature to search by the OS?
-
[quote=“Tom Elliott, post: 45168, member: 7271”]Did 0.32 have a search feature to search by the OS?[/quote]
No -
I think I’ll just write my snapin to query the Windows version, and I can apply it to all for now. Hopefully this won’t be an issue too much longer if we can get rid of our XP machines, otherwise once we update to the latest and greatest FOG version I can group and associate by image as you suggested before.
-
Well,
Can you contact me on Convo?
-
INSERT INTO snapinAssoc (saHostID,saSnapinID) SELECT hostID,122 FROM hosts WHERE hostOS=‘1’
This will only work on FOG <1.0, but here it is, in case anybody is searching the forum for something similar. In this case, my saSnapinID is 122, and we were looking for all hosts with a hostOS of 1 (which was XP).
Thanks to Tom for all of his help!