Enable an OCS User using VBScript and a Perl version here: Enable an OCS User using Perl
In this code, I use the System.DirectoryServices namespace of the .Net Class Library. I use the DirectorySearcher to find the user, then I populate the OCS related properties to configure and enable the user for OCS.
To make this code work, you need .Net Framework version 2.0 or higher. In Visual Studio, create a Visual Basic console application. After the solution is open, right-click the project, click "Add Reference", and on the .Net tab, select "System.DirectoryServices" and click OK. Then, past the source code into the project.
Finally, put in a valid user name, and fix the domain names in the entry, meetingPolicy, and homeServerDN values. Compile and test.