Retiring computers without using the Altiris Console
search cancel

Retiring computers without using the Altiris Console

book

Article ID: 222333

calendar_today

Updated On:

Products

Client Management Suite

Issue/Introduction

Is there a way to retire machines in SMP Server without accessing the SMP Console?

Can it be done with an API or the ASDK?

Environment

ITMS 8.x

Component: API and ASDK

Resolution

API:

 FixedAssetResource.SetAssetState(Guid state, bool throwOnError, bool save)

 where FixedAssetResource - is the base class for resources, that support asset states, like computers.

 

 Example:

  var resource = Item.GetItem<FixedAssetResource>( computerGuid, ItemLoadFlags.Writeable);

  resource.SetAssetState( new Guid("{492C463B-AFA2-4dd6-AE73-6FD2C7B0E489}"), true, true)

 

 

ASDK:

ResourceManagementLib.SetAssetState( Guid assetGuid, Guid stateGuid )

 * assetGuid = resource guid

 * stateGuid = new state, for "retired" it is {492C463B-AFA2-4dd6-AE73-6FD2C7B0E489}

 

Also, please see the ASDK help file in C:\Program Files\Altiris\Altiris ASDK\Help on the Notification Server.