Use the blue Nav bar above to access the main index pages!

Read OCS Meeting Policy

How to read a user's OCS Meeting Policies using Perl - The user's msRTCSIP-UserPolicy attribute contains a DNwithBinary object (or an array of them). The DN's, once retrieved, point to OCS meeting policy objects, that contain policy settings stored in XML format.

Here's a Perl script that will find a user, read the policies applied to the user, and print out the settings in those policies.

use Win32::OLE;
use XML::Simple;
# search for the user to find the distinguishedName
$connection = Win32::OLE->new("ADODB.Connection");
$connection->{Provider} = "ADsDSOObject";
$connection->Open("ADSI Provider");
$command->{Properties}->{'Page Size'}=1000;
$rs = Win32::OLE->new("ADODB.RecordSet");
until ($rs->EOF){
#retrieve the user's meeting policies
if(ref($pol) eq "ARRAY"){
 foreach $p (@{$pol}){
sub readPolicy{
 if(!$pol){ print "no policy set\n"; exit;}
 print "$pol->{DNString}\n";
 foreach $k (sort keys %{$hashref->{property}}){
  print "$k:\t$hashref->{property}->{$k}->{content}\n";
 print "\n";


Post a Comment

Related Posts Plugin for WordPress, Blogger...