Video Screencast Help

Automatically Set Status Back to Active

Created: 09 Nov 2009 • Updated: 05 Jan 2010 | 8 comments
Language Translations
lotsill's picture
+2 2 Votes
Login to vote

We have an aggressive schedule to retire computers after 15 days for reporting purposes.

A computer is retired, 20 days later it is reimaged. The computer will never communicate back to the Notification Server to obtain a GUID, generate inventory, run software delivery jobs or applied MS patches.

Someone manually needs to set the status back to "active" to reset the "ismanaged" back to 1 in order for the computer to be managed.

If a retired computer sends inventory to the server, it will reset the status the " ismanaged" flag automatically.

But this won't work is a retired computer was reimaged with the same name because the client computer will never download the inventory files from the NS.

Having someone manually set the status is fine, but this isn't effective in a large environment with 20 plus sites, hundreds of support staff and permissions needed.

The only files processed on the NS from a retired computer are events and the only events sent are client logins.

With a notification policy and a SQL query we can manipulate the asset status automatically. This is also handy when a helpdesk retires a computer when they shouldn't have.

Create A Notification Policy.

Select a schedule, I found 1 hour was enough to meet my needs.

Set Source to Query and use the following query. You can modify the getdate to a different date to meet your needs.

select distinct _resourceguid AS GUID  
from evt_aex_client_logon ac join resourceassociation ra on ac._resourceguid = ra.parentresourceguid where ra.resourceassociationtypeguid like '%3028166f%' and ra.childresourceguid like '%492c463b%'  and datediff(hh, ac._eventtime, getdate())< 168

For automated auto type select " Set asset status"

automated action.png

Comments 8 CommentsJump to latest comment

vikod's picture

can't seem the gather what the screenshots say - prolly a bigger screenshot?

0
Login to vote
Ludovic Ferre's picture

You can work out the large thumbnail and source image from the medium (or any other) image url, as shown here [click to open the full size image in a new window or tab]:

Image 1: SNAG-0002.jpg

Image 2: SNAG-0001.jpg

Image 3: Package.jpg

On a final note I believe most screen (mspaint does!!!, so every image tool must ;-)capture tools nowadays support portable network graphic (png) and I always advise to use this format for screenshot as the resulting image is of better quality and smaller size (which isn't true for real life images where jpg is better for example).

I am currently off-net, on a retreat of some kind. I'll be back real soon, and you sure will hear from me then ;-).

Ludovic FERRÉ
Principal Remote Product Specialist
Symantec

+1
Login to vote
lsattan's picture

this is just what I needed,  I just set it up and it works great, one question though....what is the screen shot of the parameters? That didnt make sense as the query wont run with those set.

0
Login to vote
lotsill's picture

The parameters screenshot was the incorrect screenshoot.  I have posted the "automated action" screenshot. 

Steve Petrasek

0
Login to vote
lsattan's picture

great Thanks, I have implemented this and its working fabulously. Where did you get the GUID for the retired status? I would like to do the same for "In Stock"

0
Login to vote
lotsill's picture

This query will show the guids for all the CMDB status in your envirnoment.

 

select distinct item.Name, ra.ChildResourceGuid

from ResourceAssociation ra

inner join item on ra.childresourceguid = item.guid

where ResourceAssociationTypeGuid = '3028166F-C0D6-41D8-9CB7-F64852E0FD01'

 

 

Name ChildResourceGuid
In Stock 1C139F6C-F210-4002-90D0-4DFAF98D5FA4
Active 0A0203A5-D2B6-49F1-A53B-5EC31A89437C
Retired 492C463B-AFA2-4DD6-AE73-6FD2C7B0E489
On Order FBF4A5D6-C649-406E-B919-E3C83AFA039B

Steve Petrasek

0
Login to vote
Canuck's picture

Isattan,

Did you ever get this working for "In Stock" to "Active"?

0
Login to vote
JJV's picture

I tried to make this work with Evt_NS_Client_Config_Request as opposed to last logon, but have so far been unsucessful.  Can anyone assist me in this.  

0
Login to vote