Enable Archiving of User Messages in OCS with Perl

OCS Script: This Perl script will enable archiving of user messages in OCS. Archiving is important to maintain legal compliance if your users are involved in any corporate litigation and so their data and communications must be saved, which may include instant messages.

The script takes a text file as input, that contains a list of user accounts for which you want to enable archiving. The text file may contain the users' common name (cn) or their NT4 logon name (samAccountName). The script then finds the user and set's their msRTCSIP-ArchivingEnabled attribute to 4 (enabled). Setting this attribute to 0 disables archiving.

use Win32::OLE;
open IN,"enable.txt";
$c = Win32::OLE->new("ADODB.Connection");
$c->{Provider} = "ADsDSOObject";
$c->Open("ADSI Provider");
$comm->{Properties}->{'Page Size'}=1000;
$rs = Win32::OLE->new("ADODB.RecordSet");
 if($rs->{recordCount} == 0){
  print "X $user not found\n";
 until ($rs->EOF){
   print chr(251)." $user - archiving enabled\n";
   print "X $user - access error ".Win32::OLE->LastError()."\n";


Post a Comment

Related Posts Plugin for WordPress, Blogger...