/build/static/layout/Breadcrumb_cap_w.png

Add Machines to Manual Label in bulk

Is there a good way to add about 400 machines to a manual label. These machines share nothing in common so I cannot use smart labels.


0 Comments   [ + ] Show comments

Answers (8)

Answer Summary:
Posted by: dugullett 11 years ago
Red Belt
3

One way I cheated with the manual label is by doing the following. I was needing to have about 700 machines in a manual label. I lucked out by having a list of machines in csv.

I took my csv and ran this formula on the cells where the machine names were listed ="'"&B1&"',". Assuming B1 is the start of your machine names. This will add ' ', to every cell after you click and drag down your list. Then copy and paste that new row into the SQL query below.

 

I created a dummy smart label. I then modified it to include an IN command in the SQL.

select MACHINE.*, C.CLIENT_CONNECTED, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,

UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_SECONDS

from ORG1.MACHINE

LEFT JOIN KBSYS.KUID_ORGANIZATION O ON O.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION C ON C.KUID = MACHINE.KUID AND O.ORGANIZATION_ID = 1

where (  MACHINE.NAME IN ('COMPUTER1','COMPUTER2', 'COMPUTER3'))

 

This will still be considered a smart label so you can still create a manual label afterwards. It does beat checkmarking 500 boxes though.


Comments:
  • Nice! - jverbosk 11 years ago
  • This idea does sound nice, but I'm not fluent in SQL. I can and do use MySQL workbench to run and test queries, but I have no idea how to "copy and paste that new row into the SQL query"... Paste it where, exactly? - MichaelMc 8 years ago
    • Copy and paste in place of 'COMPUTER1','COMPUTER2', 'COMPUTER3'. Make sure the names are in between ' '. - dugullett 8 years ago
Posted by: chucksteel 11 years ago
Red Belt
1

Here's another idea. I'm assuming that you at least have the list of those computers that need the label in a file of some sort, perhaps a spreadsheet? You can use a field to the Computer Asset type to designate those included in the audit. So it would work something like this:

Export from the Inventory a list of all computers including the serial number and computer name.

Using Excel you should be able to filter that list down to just those machines from your "needs audited" list.

Now you have a list of the computer serial numbers that need to be included in the audit.

Add a column to the spreadsheet that will be imported to the asset database. You can either use the Notes column if it isn't already in use, or add a field to the Computers asset type. If you think this may happen in the future, then perhaps a generic "Include in Audits" would work and you can populate it with Yes answers for these assets. 

Import the spreadsheet using the Asset Import function being sure to use the serial number as the primary key so that records are updated and not duplicated.

You can now perform an advanced search on the Inventory which allows you to search the Asset fields for the asset that matches the computer. You could actually even setup a smart label to search the same field if you wanted to.

 


Comments:
  • Sorry it took so long to reply. This did work. I got sidetracked on other projects. Thanks for your help. - dugullett 11 years ago
Posted by: Ben M 11 years ago
9th Degree Black Belt
1

One word: Intern :)


Comments:
  • Looks like I'm planning a "bring your son to work day". - dugullett 11 years ago
  • We used our student helpdesk phone staff to do some of the custom input we needed. - SMal.tmcc 11 years ago
  • I'm telling you, this is the easiest option by a long shot :) - Ben M 11 years ago
Posted by: TDelaney 8 years ago
White Belt
1
I was looking to do what dugulett originally asked here and did find the links and info supplied by jverbosk to have some good content.

Another option I used for populating manual labels with devices is to go under "Devices", "Advanced Search and then to specify "System Name"  with "match RegEx". The field to match is where I paste multiple device names separated with a "pipe" (vertical bar) character. This "OR"s all the devices, and I am provided with a list of PCs I wish to add a label to. I can then select-all, "choose action" and "Apply Label". Maybe not the most elegant solution, but a little better then performing manual additions to labels one item at a time.

Just wanted to provide my input here in case others might search this concept further as I did originally.

- Tom -

Posted by: chucksteel 11 years ago
Red Belt
0

I'm curious why you are labeling them with the same label if they don't have anything in common.


Comments:
  • We're under a software audit and the want the report to run on just these machines. Not every machine will have the software, but if they do then it will catch it with a custom inventory.
    There are other machines that will have this software, but those do not need to be included in the report. - dugullett 11 years ago
  • Is the number of machines that will have the software but won't be included in the audit smaller? If so, you could manually apply a label to them (e.g. "No Software Audit") and then create a smart label that applies to machines with software but without designated label. - chucksteel 11 years ago
  • That is a great idea. Unfortunately there are 801 with the suite, and 400 that need to be audited. I guess is that number grows that will be the way I do it. I'm still waiting on the "official" word. - dugullett 11 years ago
Posted by: anonymous_129525 7 years ago
Senior Yellow Belt
0
Hello - I actually just posted a How-To article that uses Powershell script to automate the generation of a SQL query containing machine names from a text file.


Hope this helps!
Posted by: jverbosk 11 years ago
Red Belt
0

If there's no common thread, I'd be prepared to start clicking.  ^_^

If you have a text list of the machine names, you could dump that into a smart label's SQL code (MACHINE.NAME rike '123,456,789,etc') and hit them like that.

Or if you use ADUC and is this something that will need maintained/updated?  If so, I would populate the computer object's Description field and pull them in via an LDAP label, so as more computers that meet this criteria can just be tagged as they are joined to the domain.  I just did this yesterday for ~350 machines yesterday when I completely redid my patch setup.

If you decide to go the LDAP route and need steps, I have a writeup on that here:

http://www.itninja.com/question/ldap-patching-sql-reports-using-all-three-for-efficient-managed-patching-and-other-cool-tric

Just forgive the formatting as it's being affected by a bug that's supposed to be addressed soon.  And ignore the patching section - I'll be doing a major rewrite on that.

John

Posted by: dugullett 11 years ago
Red Belt
0

I'm not happy with these answers. :( I have a feeling these 400 are just the beginning.


Comments:
  • Hey, look on the bright side - if *everything* could be automated, we wouldn't have jobs.

    John - jverbosk 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ