Use the findInstances() function from the InCharge::session module instead.
@objects = $session->findInstances_P( $class-pattern, $instance-pattern, $flag )
Finds instances that match the class and instance patterns, according to rules specified in the flags.
When used by the console GUI, the $flag value is 0x101000, which requests subclass expansion and glob pattern matches. When used by dmctl, the value 0x001000 is used which requests RegEx pattern matches and subclass expansion.
The value of $flag consists of the following values OR’d in any combination, according to the options required.
0x001000 = Expand-subclasses. With this flag set, the contents of subclasses of those classes that match are also returned.
0x100000 = Glob. This causes the match to be done by using ICIM glob() matches rather than UNIX regex syntax, which is used otherwise.
@list = $session->findInstances_P( "Router", "s*", 0x100000 ); @list = $session->findInstances_P( "ICIM_UnitaryComputerSystem", ".*", 0x001000);