The following is an example of a PERL script that can be used to populate the value of the SM_SerialNumber attribute in the Router class. The VMware Smart Assurance Perl Reference Guide provides additional information.

use InCharge::session;
#Establish a connection to the VMware Smart Assurance Server
$session=InCharge::session->new( server=>"TEST_SERVER_EX2",
            broker =>"localhost:426",
            user=>"admin",
            password=>"ad1");

# Create a handle to the object router-1.mynet.com
$deviceHandle=$session->object("Router","router-1.mynet.com");
# Retrieve value of current Serial Number
$currentSerial=$deviceHandle->{SM_SerialNumber};
print "Current Serial Number: $currentSerial \n";
#Assign a value to the attribute SM_SerialNumber of device router-1.mynet.com
$deviceHandle->{SM_SerialNumber}="123456abc";
# Print the new value
print "New Serial is: $deviceHandle->{SM_SerialNumber}";