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

List OCS Users with a Perl Script

OCS Script: This Perl script generates a list of OCS enabled users in your Active Directory, including the user's display name, SIP address, OCS Pool, and option flags.

The script uses an ADO query, that searches for users with OCS enabled (msRTCSIP-UserEnabled=True). The output file is a tab-delimited text file that can be opened in Excel.

use Win32::OLE;
open OUT,">OCSUserList.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");
until ($rs->EOF){
 print "$sip\n";
 print OUT "$displayName\t$sip\t$pool\t$flags\n";
close OUT;


Post a Comment

Related Posts Plugin for WordPress, Blogger...