Asset Management Suite

 View Only

Automatically Set Status Back to Active 

Nov 09, 2009 10:36 AM

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


Statistics
0 Favorited
1 Views
4 Files
0 Shares
0 Downloads
Attachment(s)
png file
automated action.png   20 KB   1 version
Uploaded - Feb 25, 2020
jpg file
SNAG-0000.jpg   40 KB   1 version
Uploaded - Feb 25, 2020
jpg file
SNAG-0001.jpg   93 KB   1 version
Uploaded - Feb 25, 2020
jpg file
SNAG-0002.jpg   235 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Nov 29, 2011 04:27 PM

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

Sep 01, 2011 01:54 PM

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.  

May 10, 2011 02:40 PM

Isattan,

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

Jan 12, 2010 10:10 AM

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"

Jan 05, 2010 04:17 PM

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

Jan 05, 2010 11:05 AM

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.

Nov 30, 2009 04:38 PM

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).

Nov 18, 2009 02:09 AM

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

Related Entries and Links

No Related Resource entered.