Registered member login:
Register Now
Altirigos » Deployment Solution » Deployment Server » Move computer objects DS from a client

» Current Poll
Do you leave the Aclient enabled?
YES - 82.17%
106 Votes
NO - 17.83%
23 Votes
Total Votes: 129
You may not vote on this poll.
» Stats
Members: 9,489
Threads: 11,748
Posts: 55,279
Top Poster: Nick (4,981)
Welcome our newest member, jbwex
» Online Users: 57
1 members and 56 guests
sachu_uthra
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 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 29 30 31 123
Reply
Old 04-30-2005, 02:13 AM   #1 (permalink)
 
Status: Altiris Admin
Join Date: 04-30-2005
Location: Virginia
Age: 39
Posts: 37


Move computer objects DS from a client

Does anyone know how a machine can move from the New Computer container in DS into a more suitable Computer Container (custom group) either through a DOS or Windows script while it's being "deployed"?

I already have a script that will modify the aclient.inp file for a machine that already has an Windows OS and has never been discovered by the DS server and of coarse will put itself into the right Computer Container; however, what about new computers purchased and bootup via PXE. Once they bootup, DS will put it in the New Computers container and that's where it will remain unless an admin moved the object into what container it should finally reside in.

Any ideas? Thanks.
heynt is offline   Reply With Quote
Old 04-30-2005, 09:49 AM   #2 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981


There are a couple of ideas that come to mind.

The easiest is to create virtual computers for the workstations that are coming in new, dependant on you knowing some basic information about them to do this. You can then stage them into the groups of your choice.

The second and one would be to run a query against the express database and move the workstations to a group based on something like the naming convention or the IP address. This method could be run on a schedule and would be the best approach for an automated solution.
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 04-30-2005, 10:08 AM   #3 (permalink)
 
JeremyDallas's Avatar
 
Status: SVS Scholar
Join Date: 01-01-2005
Location: Dallas, Texas, USA
Age: 29
Posts: 1,093


Here's a thread that talks about scripting it.

http://www.altiris.com/support/forum...mode=&s=#60967

Hope it helps...
__________________
JEREMY SMITH
JeremyDallas is offline   Reply With Quote
Old 04-30-2005, 10:45 AM   #4 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981


Posted the code here for reference.

Note that it is a script that would be server side (in the advanced options of a run script)

OSQL -E -deXpress -Q"Update computer where computer_id='%ID%' set group_id =NULL"

Change the group_id value from NULL to whatever the group_id of the group you want to move them to. NULL will put them in the root of the tree and -7 is the new computers group.


If you dont know the group name then it gets a little bit tricky. You can try this script and let me know if it works. Note that you have to have the group name set in the batch file and that if there is multiple groups with the same name the computers will go in to the last one with that name that returns from the query.

This is also a server side script. Be aware of wordwrap as it could cause you problems here.

------------------------------------------------------------------------
SET COMPUTERGROUPNAME=GROUP1

for /f "delims=" %%i in ('osql -E -dexpress -h-1 -Q "SET NOCOUNT ON;SELECT group_id from computer_group where name = '%COMPUTERGROUPNAME%'"') do CALL :QUERY "%%i"

GOTO:EOF

:QUERY
set temp1=%~1
REM This statement has to be put in since OSQL passes in blank lines, but is simple
REM to deal with because the value we are looking for is numeric
if %temp1% GEQ -7 OSQL -E -deXpress -Q"Update computer set group_id ='%temp1%' where computer_id='%ID%'"
GOTO:EOF

*Note: Code created by NKeith
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 04-30-2005, 06:56 PM   #5 (permalink)
 
Status: Altiris Admin
Join Date: 04-30-2005
Location: Virginia
Age: 39
Posts: 37


Thanks dudes, I'll give this a shot on Monday.
heynt is offline   Reply With Quote
Old 05-01-2005, 11:30 PM   #6 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981


I just tested the scripts and they work as described.
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 06:15 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos