<?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>StevoFC.com &#187; ADUC</title>
	<atom:link href="http://blog.stevofc.com/tag/aduc/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stevofc.com</link>
	<description>The official blog of StevoFC</description>
	<lastBuildDate>Mon, 29 Nov 2010 14:07:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Unlock Users from Active Directory</title>
		<link>http://blog.stevofc.com/2010/01/15/unlock-user-from-active-directory/</link>
		<comments>http://blog.stevofc.com/2010/01/15/unlock-user-from-active-directory/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 04:52:45 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[ADUC]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://blog.stevofc.com/?p=518</guid>
		<description><![CDATA[Adding on to my post about Extending Active Directory, here is another VBScript that can be added to your Active Directory environment to quickly unlock a user account.  If you have not done so, please read my post on Extending Active Directory Functionality first to grasp the how to add custom VBScripts to AD. Unlock Script [...]]]></description>
			<content:encoded><![CDATA[<p>Adding on to my post about Extending Active Directory, here is another VBScript that can be added to your Active Directory environment to quickly unlock a user account.  If you have not done so, please read my post on <a href="http://blog.stevofc.com/2010/01/13/extending-active-directory-functionality/" target="_self">Extending Active Directory Functionality</a> first to grasp the how to add custom VBScripts to AD.</p>
<p><span id="more-518"></span></p>
<p><img src="http://blog.stevofc.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p><strong>Unlock Script :</strong></p>
<p>Copy the script below to a notepad document and save it as &#8220;<strong>unlock_user.vb</strong><strong>s</strong>&#8220;, and remember to save a copy of this to your &#8220;<strong>NETLOGON</strong>&#8221; directory to your domain controller.  Doing so will replicate this VBScript to all of your other domain controllers should you have more than one in your domain.  I have attached the script in .txt form, in the event the blog&#8217;s formatting changes the appearance.  You can find the script&#8217;s link below.</p>
<p>Link:  <a href="http://blog.stevofc.com/wp-content/uploads/2010/01/unlock_user.txt">Active Directory :: Unlock User</a></p>
<div>
<blockquote><p>Const E_ADS_PROPERTY_NOT_FOUND = -2147463155</p>
<p>Set wshArguments = WScript.Arguments</p>
<p>Set objUser = GetObject(wshArguments(0))</p>
<p>If IsLockedOut(objUser) Then</p>
<p>objUser.Put &#8220;lockouttime&#8221;,&#8221;0&#8243;</p>
<p>objUser.SetInfo</p>
<p>MsgBox &#8220;The user has been unlocked &#8211; &#8221; &amp; objUser.sAMAccountName</p>
<p>Else</p>
<p>MsgBox &#8220;The user account is not locked &#8211; &#8221; &amp; objUser.sAMAccountName</p>
<p>End If</p>
<p>Function IsLockedOut(objUser)</p>
<p>on Error resume next</p>
<p>Set objLockout = objUser.get(&#8220;lockouttime&#8221; )</p>
<p>if Err.Number = E_ADS_PROPERTY_NOT_FOUND then</p>
<p>IsLockedOut = False</p>
<p>Exit Function</p>
<p>End If</p>
<p>On Error GoTo 0</p>
<p>if objLockout.lowpart = 0 And objLockout.highpart = 0 Then</p>
<p>IsLockedOut = False</p>
<p>Else</p>
<p>IsLockedOut = True</p>
<p>End If</p>
<p>End Function</p></blockquote>
<p>When you are following the steps outlined in the &#8220;Extend Active Directory Functionality&#8221; post, use the following command to add this script to your context menu.</p>
<blockquote><p>4,&amp;Unlock User Account,\\<span style="color: #ff0000">stevofc.com</span>\netlogon\unlock.user.vbs</p></blockquote>
<p>Note:  Remember to change your domain name from what is listed in RED above to match your own domain.  As always, happy scripting!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.stevofc.com/2010/01/15/unlock-user-from-active-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extending Active Directory Functionality</title>
		<link>http://blog.stevofc.com/2010/01/13/extending-active-directory-functionality/</link>
		<comments>http://blog.stevofc.com/2010/01/13/extending-active-directory-functionality/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 23:12:40 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[ADUC]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://blog.stevofc.com/?p=440</guid>
		<description><![CDATA[Have you ever wished that you could change the functionality within the Active Directory Users and Computers (ADUC) snap in? The following post will demonstrate how to extend the ADUC capabilities with VBScript and ADSIEdit. The purpose of this post is to show how to build the groundwork and implement custom VBSscripts into the context [...]]]></description>
			<content:encoded><![CDATA[<div>Have you ever wished that you could change the functionality within the Active Directory Users and Computers (ADUC) snap in?</div>
<p></p>
<div>The following post will demonstrate how to extend the ADUC capabilities with VBScript and ADSIEdit.</div>
<p></p>
<div>The purpose of this post is to show how to build the groundwork and implement custom VBSscripts into the context menu of ADUC (see thumbnail below).</div>
<p></p>
<div><a href="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-30.png" target="_blank"></a><span id="more-440"></span></div>
<p style="text-align: center;"><a href="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-30.png" target="_blank"><img class="aligncenter size-medium wp-image-453" src="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-30-300x196.png" alt="" width="300" height="196" /></a></p>
<div><strong>PREREQUISTITES</strong></div>
<div>Before you can begin, there are two prerequties needed to extend the context menus.</div>
<div>
<ol>
<li><strong>ADSIEdit.MSC</strong> :: (This can be installed from the Windows 2000/2003 Support Tools)</li>
<li>An Active Directory account with &#8220;<strong>Enterprise Admins</strong>&#8221; permissions assigned to it.</li>
</ol>
</div>
<p><strong>VBScript<br />
<span style="font-weight: normal;">For this post, we will assume you have created a VBSscript named “Display_User.vbs”, and once done you have already moved/copied this script to the NETLOGON share of one of your domain controllers (DC).</span></strong></p>
<pre>On Error Resume Next

Set wshArguments = WScript.Arguments
Set objUser = GetObject(wshArguments(0))

str1 = "Last Login: " &amp; objUser.LastLogin
str2 = "Last Logoff: " &amp; objUser.LastLogoff
str3 = "Last Failed Login: " &amp; objUser.LastFailedLogin
str4 = "Logon Count: " &amp; objUser.logonCount
str5 = "Bad Login Count: " &amp; objUser.BadLoginCount
str6 = "Password Last Changed: " &amp; objUser.PasswordLastChanged
str7 = "User Account Control: " &amp; objUser.userAccountControl
str8 = "Login Script: " &amp; objUser.scriptPath
str9 = "Account Created: " &amp; objUser.whenCreated
str10 = "Account Last Modified: " &amp; objUser.whenChanged

MsgBox str1 &amp; vbCrLf &amp; str2 &amp; vbCrLf &amp; str3 _
&amp; vbCrLf &amp; str4 &amp; vbCrLf &amp; str5 &amp; vbCrLf &amp; str6 _
&amp; vbCrLf &amp; str7 &amp; vbCrLf &amp; str8 &amp; vbCrLf &amp; str9 _
&amp; vbCrLf &amp; str10,,objUser.Name</pre>
<div><strong>Side Note</strong>: Because you placed the script in the NETLOGON share, the script will be replicated to all of your domain controllers should you have more than one.</div>
<div><strong>Modify the ADUC Context Menu:</strong></div>
<div>1.	 Open the ADSIEdit.MSC snap in (assuming you have already installed this) with the Active Directory credentials that have the necessary level of permissions and navigate to the path below.</div>
<div>CN=409,CN=DisplaySpecifies,CN=Configuration,DC=<span style="color: #ff0000;">stevofc</span>,DC=<span style="color: #ff0000;">com</span></div>
<div><span style="color: #ff0000;"><span style="color: #000000;"><strong>Side Note:</strong> Change the domain name listed in red with the domain name of your own.</span></span></div>
<div><span style="color: #ff0000;"><span style="color: #000000;"><br />
</span></span></div>
<div><span style="color: #ff0000;"><span style="color: #000000;"><a href="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-08-43-44.png" target="_blank"><img class="size-full wp-image-452 aligncenter" src="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-08-43-44.png" alt="" width="287" height="194" /></a></span></span></div>
<div><span style="color: #ff0000;"><span style="color: #000000;"><br />
</span></span></div>
<div><span style="color: #ff0000;"><span style="color: #000000;"> </span></span></div>
<div>2.  Right click the context object you would like to modify, and choose &#8220;<strong>Properties</strong>&#8220;.  For this post we will use the object, &#8220;<strong>CN=user-Display&#8221;</strong>.</div>
<div>3.  Double click on the first attribute, &#8220;<strong>adminContextMenu</strong>&#8220;, once you have the properties menu loaded.</div>
<div>4.  From the multi valued String Editor, enter the below string.</div>
<div>&#8220;3, &amp;Display User Information,\\<span style="color: #ff0000;">stevofc.com</span>\netlogon\Display_User.vbs&#8221;</div>
<div><em>Remember to change the NETLOGON path to your own domain.</em></div>
<div>5.  Once complete, click &#8220;<strong>Add</strong>&#8220;, then click &#8220;<strong>OK</strong>&#8220;.  You are now done using the ADSIEdit.MSC tool.</div>
<div>6.  Now open your ADUC console (dsa.msc), and if you right click a user object you will now have the added filed inside the context menu (see screenshots below).</div>
<div><a href="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-30.png" target="_blank"><img class="size-medium wp-image-453 aligncenter" src="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-30-300x196.png" alt="" width="300" height="196" /></a></div>
<div><a href="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-36.png" target="_blank"><img class="size-medium wp-image-456 aligncenter" src="http://blog.stevofc.com/wp-content/uploads/2010/01/2010-01-11-13-08-36-300x197.png" alt="" width="300" height="197" /></a></div>
<div>By using the above method, you can add any custom VBScript to your domain to make automating both simple or complex tasks with makes administration easier.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.stevofc.com/2010/01/13/extending-active-directory-functionality/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

