GroupUnixProfileExists
Checks whether a UNIX profile exists for the specified group in the zone.
Syntax
bool GroupUnixProfileExists(IGroup group)
Parameter
Specify the following parameter when using this method:
Parameter | Description |
---|---|
group
|
The group name for which you want to check whether a UNIX profile exists. |
Return value
Returns true if a UNIX profile is found in the zone for the specified group, or false if no UNIX profile exists for the group in the zone.
Exceptions
GroupUnixProfileExists
may throw one of the following exceptions:
-
ArgumentNullException
if the specified parameter value is null. -
NotSupportedException
if the zone schema is not supported.
Example
The following code sample illustrates using this method in a script:
...
'Specify the zone you want to work with
set objZone = cims.GetZone("ajax.org/UNIX/Zones/test_lab")
'Check whether there’s a UNIX profile for the group “legal”
if objZone.GroupUnixProfileExists(legal) = true
wScript.Echo “Profile exists in this zone“
else
wScript.Echo “No matching profile in this zone!“
end if
...