Automatically Set Status Back to Active
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"
Comments
can't seem the gather what
can't seem the gather what the screenshots say - prolly a bigger screenshot?
The screenshots url (full, large & medium) can be hand-crafted
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).
Ludovic FERRÉ
Principal Remote Product Specialist
Symantec
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect
this is just what I needed,
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.
The parameters screenshot was
The parameters screenshot was the incorrect screenshoot. I have posted the "automated action" screenshot.
Steve Petrasek
great Thanks, I have
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"
This query will show the
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'
Steve Petrasek
Isattan, Did you ever get
Isattan,
Did you ever get this working for "In Stock" to "Active"?
I tried to make this work
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.
Would you like to reply?
Login or Register to post your comment.