» Site Navigation |
|
|
» Stats |
Members: 9,303
Threads: 11,614
Posts: 54,720
Top Poster: Nick (4,977)
|
| Welcome our newest member, prem kapoor |
» February 2010 |
| S |
M |
T |
W |
T |
F |
S |
| 31 |
1
|
2
|
3
|
4
|
5
|
6
|
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
|
28
| 1 | 2 | 3 | 4 | 5 | 6 |
|
 |
05-29-2009, 10:11 AM
|
#1 (permalink)
|
Status: Altiris Admin
Join Date: 10-30-2008
Location: Glasgow
Posts: 32
|
Finding blank Computer Product Name?
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
|
|
|
05-29-2009, 10:14 AM
|
#2 (permalink)
|
Status: Altiris Admin
Join Date: 05-29-2008
Location: Chicago
Posts: 76
|
Shoot, nevermind you said DS. Do you have Inventory Solution? You could easily do this in Inventory Solution. 
Last edited by gwilmington; 05-29-2009 at 10:19 AM..
|
|
|
05-29-2009, 10:37 AM
|
#3 (permalink)
|
Status: Altiris Admin
Join Date: 10-30-2008
Location: Glasgow
Posts: 32
|
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
|
|
|
05-29-2009, 10:54 AM
|
#4 (permalink)
|
Status: Altiris Admin
Join Date: 05-29-2008
Location: Chicago
Posts: 76
|
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.
|
|
|
05-29-2009, 11:37 AM
|
#5 (permalink)
|
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,977
|
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.
- Create a new job: File > New > Job.
- Add a Run Script: Add > Run Script.
- 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
- Click Next.
- Select the Script Run Location: Locally on the Deployment Server.
- Click Finish.
- 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
- Change <My Computer Group Name> text to the name of the destination Computer Group.
__________________
Scire potentia est (knowledge is power)
|
|
|
05-29-2009, 11:39 AM
|
#6 (permalink)
|
Status: Altiris Admin
Join Date: 05-29-2008
Location: Chicago
Posts: 76
|
Thanks for the script Nick. This is awesome.
|
|
|
05-29-2009, 11:46 AM
|
#7 (permalink)
|
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,977
|
Glad to help. If you get something working using this method I would love to see what you came up with.
Cheers,
__________________
Scire potentia est (knowledge is power)
|
|
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -4. The time now is 07:58 AM.