<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ankit Singhal Knowledge Base &#187; VB Script</title>
	<atom:link href="http://kb.asinghal.com/tag/vb-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://kb.asinghal.com</link>
	<description></description>
	<lastBuildDate>Fri, 18 Dec 2009 04:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>VB Script to Create Office Communication Server Enabled Users in Active Directory</title>
		<link>http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/</link>
		<comments>http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 10:54:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[OCS 2007]]></category>
		<category><![CDATA[VB Script]]></category>

		<guid isPermaLink="false">http://kb.asinghal.com/?p=13</guid>
		<description><![CDATA[Following is a VB Script to create Office Communication Server Enabled users in Active Directory. 

Option Explicit
Dim strUser, strPassword, strName, strDomain, strADRoot
Dim strUCPool, strDC, intStart, intEnd
Dim objRootLDAP, objContainer, objNewUser

strUser = "ocsuser"
strName = "OCS User"
strDomain = "asinghal.com"
strPassword = "pass2004"
strADRoot = "LDAP://cn=Users,DC=asinghal,dc=com"
strUCPool = "&#60;OCS-Pool-Name&#62;"
strDC = "DC=asinghal,DC=com"
intStart = 53
intEnd = 150

const ADS_UF_DONT_EXPIRE_PASSWD = &#38;H10000

' Bind to Active Directory, [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #000000;">Following is a VB Script to create Office Communication Server Enabled users in Active Directory. </span></p>
<pre><span style="color: #333333;">
Option Explicit
Dim strUser, strPassword, strName, strDomain, strADRoot
Dim strUCPool, strDC, intStart, intEnd
Dim objRootLDAP, objContainer, objNewUser

strUser = "ocsuser"
strName = "OCS User"
strDomain = "asinghal.com"
strPassword = "pass2004"
strADRoot = "LDAP://cn=Users,DC=asinghal,dc=com"
strUCPool = "&lt;OCS-Pool-Name&gt;"
strDC = "DC=asinghal,DC=com"
intStart = 53
intEnd = 150

const ADS_UF_DONT_EXPIRE_PASSWD = &amp;H10000

' Bind to Active Directory, Users container.
Set objRootLDAP = GetObject("LDAP://rootDSE")
Set objContainer = GetObject(strADRoot)

' Build the actual User.
Dim count
For count = intStart To intEnd
 Set objNewUser = objContainer.Create("User", "cn=" &amp; strUser &amp; count)
 objNewUser.Put "sAMAccountName", strUser &amp; count
 objNewUser.Put "givenName", strName &amp; count

 'Enable following parameter if you want to enable this user for Unified Communication
 objNewUser.Put "msRTCSIP-InternetAccessEnabled", TRUE
 objNewUser.Put "msRTCSIP-ArchivingEnabled", 0
 objNewUser.Put "msRTCSIP-FederationEnabled", FALSE
 objNewUser.Put "msRTCSIP-OptionFlags", 256
 objNewUser.Put "msRTCSIP-PrimaryHomeServer", "CN=LC Services,CN=Microsoft,CN=" &amp;
            strUCPool &amp; ",CN=Pools,CN=RTC Service,CN=Microsoft,CN=System," &amp; strDC
 objNewUser.Put "msRTCSIP-PrimaryUserAddress", "sip:" &amp; strName &amp; count
            &amp; "@" &amp; strDomain
 objNewUser.Put "msRTCSIP-UserEnabled", TRUE
 'UC Properties Ends

 objNewUser.SetInfo
 objNewUser.SetPassword strPassword
 objNewUser.Put "userAccountControl", 512 XOR ADS_UF_DONT_EXPIRE_PASSWD
 objNewUser.SetInfo
Next
WScript.Quit

' End of free sample Create Users VBScript.</span></pre>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d13').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><img src="/wp-content/themes/generic-plus/img/share-it.gif" /></strong></a>
<br />
<div class="d13" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;submitHeadline=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;title=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;title=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;title=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;bm_description=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;T=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;title=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;title=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory+@+http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/&amp;t=VB+Script+to+Create+Office+Communication+Server+Enabled+Users+in+Active+Directory" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://kb.asinghal.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d13').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d13').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://kb.asinghal.com/03/vb-script-to-create-office-communication-server-enabled-users-in-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

