The following script writes the names of all policy store domains and top-level realms to a text file:
use Netegrity::PolicyMgtAPI;
$destFile="DomainsRealms.txt";
open(DEST,">".$destFile) || die "Open file error: $!";
print DEST "Domains and Domain Realms for Acme North Site\n";
print DEST "Printed " . scalar(localtime)."";
$policyapi = Netegrity::PolicyMgtAPI‑>New();
$session = $policyapi‑>CreateSession("adminid", "adminpwd");
@domains=$session‑>GetAllDomains();
foreach $domain(@domains) {
print DEST "\n\nDomain " . $domain‑>Name() . ":";
@realms=$domain‑>GetAllRealms();
foreach $realm(@realms) {
print DEST "\n Realm " . $realm‑>Name();
}
}
print "\nDomain and realm report written to " . $destFile."\n";
|
Copyright © 2012 CA Technologies.
All rights reserved.
|
|