Can a basic inventory and configuration update be forced on a client using a VB Script?

book

Article ID: 179716

calendar_today

Updated On:

Products

Management Platform (Formerly known as Notification Server)

Issue/Introduction

 

Resolution

Question

Is it possible to force the agent to send a Basic Inventory or update its configuration through a script?

Answer
This is a sample VB script that forces a "send basic inventory" and "update configuration":

Option Explicit
On Error Resume Next
Dim Client, IfUnchanged, IfBlocked 
Set Client = CreateObject("Altiris.AeXNSClient") 
Client.ClientPolicyMgr.Refresh
IfUnchanged = 1 'Sends the basic inventory even If it has not changed since the last transmission
IfBlocked = 1   'Sends the basic inventory even if the network connection has been blocked
Client.SendBasicInventory IfUnchanged, IfBlocked
Set Client = Nothing

Note: This script is provided as an example. Test it before using it on a Production environment.