Finding blank Computer Product Name?

Discussion in 'Deployment Server' started by gerardsweeney, May 29, 2009.

  1. gerardsweeney New Member

    Hello, all..

    Whenever a motherboard is replaced by our main supplier, the engineers for said firm - let's call them GO - almost consistently neglect to fill in the Product Name field within the BIOS.

    This has the knock on effect that our HII scripting doesn't work because that's what we use (rather than model abcxyz).

    Is there a way to use a filter within DS Console to find these ones?

    I'd hoped I could just do Computer Product name is exactly [blank], but sadly it won't let me do that.

    Can anyone think of a way of doing it? That doesn't involve running anything on the SQL server, I mean, as my dept doesn't have access to this.

    Regards,
    Gerard
  2. gwilmington New Member

    Shoot, nevermind you said DS. Do you have Inventory Solution? You could easily do this in Inventory Solution. :(
  3. gerardsweeney New Member

    We have Notification Server as well, but I only really want to do this within DS, as my team will primarily be using DS.. That and the fact we're not exactly brimming over with confidence at the way NS has been behaving of late, but that's a grumble for another day!!

    I tried using the SQL wildcard:

    Computer Product name is exactly %
    doesn't work

    Computer Product name does not contain %
    doesn't work (though it does list the pre-defined ones)


    In the end, I went with:

    Computer Product Name does not contain o (letter O)
    AND
    Computer Manufacturer contains Compaq


    (Oh, dear, I gave away the identity of the manufacturer - what a pity)


    It's not perfect, but at least lets me see the main ones.

    Thanks for the reply anyway.

    Regards,
    Gerard
  4. gwilmington New Member

    :woohoo:


    What I do in those situations is use NS to find the machines, put them into a collection then use the DS web console within NS and move the computers in that collection to a group in DS. That's the path I was going to send you down. Either way, nice work.
  5. Nick Altiris/AppSense Guru

    You know you don't need to have access to the SQL Server to run sql queries against it right?

    The AppID that the DS uses already gives you that access. You could run a sql query against the express database from a run script job.

    For your scenario you might be able to write that sql query to move systems with the product name being blank to a new container within the DS.

    Just a thought.

    Sample of how to move from one group to another using sql from DS run script job.


    1. Create a new job: File > New > Job.
    2. Add a Run Script: Add > Run Script.
    3. Insert the text:REM Server side script to change a machine’s Computer Group
      REM ReplaceTokens .\samples\scripts\movecomputergroup.sql .\temp\%COMPNAME%.sql
      OSQL.EXE -E -D "Altiris eXpress Database" -t 600 -i .\temp\%COMPNAME%.sql
      DEL /Q .\temp\%COMPNAME%.sql
    4. Click Next.
    5. Select the Script Run Location: Locally on the Deployment Server.
    6. Click Finish.
    7. Create a file .\samples\scripts\movecomputergroup.sql containing the text: declare @gid int
      SET @gid = (SELECT DISTINCT cg.group_id FROM computer_group cg
      WHERE cg.name = ‘<My Computer Group Name>’)
      exec wc_upd_computer_group %ID%, @gid
    8. Change <My Computer Group Name> text to the name of the destination Computer Group.
  6. gwilmington New Member

    Thanks for the script Nick. This is awesome.
  7. Nick Altiris/AppSense Guru

    Glad to help. If you get something working using this method I would love to see what you came up with.

    Cheers,

Share This Page