<?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>Shariq Sheikh &#124; Port 389 &#187; Windows</title>
	<atom:link href="http://www.shariqsheikh.com/blog/index.php/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shariqsheikh.com/blog</link>
	<description>- activity of Active Directory and the rest</description>
	<lastBuildDate>Thu, 22 Jul 2010 17:01:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>PowerShell : How many users were created in an office since x number of days ?</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200912/powershell-how-many-users-were-created-in-an-office-since-x-number-of-days/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200912/powershell-how-many-users-were-created-in-an-office-since-x-number-of-days/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 00:12:02 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/index.php/200912/powershell-how-many-users-were-created-in-an-office-since-x-number-of-days/</guid>
		<description><![CDATA[A request came in from the Access Control team requesting that they be provided with the users that have been created in a particular office since last 90 days. As usual, PowerShell (with QAD cmdlets) has very simple one liners you can retrieve this information with. You may also use this to export this data [...]]]></description>
			<content:encoded><![CDATA[<p>A request came in from the Access Control team requesting that they be provided with the users that have been created in a particular office since last 90 days. As usual, PowerShell (with QAD cmdlets) has very simple one liners you can retrieve this information with.</p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/12/GeUsersCreatedinlast90days.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Ge-UsersCreatedinlast90days" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/12/GeUsersCreatedinlast90days_thumb.png" border="0" alt="Ge-UsersCreatedinlast90days" width="982" height="67" /></a></p>
<p>You may also use this to export this data to a CSV file. Notice that when using the export-csv cmdlet you must choose the ‘select’ and define the attributes that should be exported. Format-Table (aliased above as FT) is used to display the information on the console.</p>
<blockquote><p>GetQADUser-sizelimit 0 | where{$_.whencreated -gt (get-date).adddays(-90)}| select Name,WhenCreated,DN | Export-csv c:\Users90days.csv</p></blockquote>
<p>There is always a couple of ways to accomplish the same task with further fine tuning your query. As you can see that above query would grab all the users in the domain, going by their whenCreated attribute and present you the pertinent users.</p>
<p>You can define the OU to search with the –searchroot parameter.</p>
<blockquote><p>Get-QADUser –Searchroot ‘test.mydomain.int/Users/Chicago/’ | where{$_.whencreated -gt (get-date).adddays(-90)}</p></blockquote>
<p>Alternatively, if you would to like find users account that have been modified since x number of days, you can try something like this.</p>
<blockquote><p>$OU = &lt;OU PATH&gt;<br />
Get-QADUser -LastChangedAfter (get-date).adddays(-7) -search $OU -sl 0 | ft name,whenchanged</p></blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200912%2Fpowershell-how-many-users-were-created-in-an-office-since-x-number-of-days%2F&amp;linkname=PowerShell%20%3A%20How%20many%20users%20were%20created%20in%20an%20office%20since%20x%20number%20of%20days%20%3F">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200912/powershell-how-many-users-were-created-in-an-office-since-x-number-of-days/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Group Nesting Reference Chart</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200909/group-nesting-reference-chart/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200909/group-nesting-reference-chart/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 00:41:18 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/index.php/200909/group-nesting-reference-chart/</guid>
		<description><![CDATA[The Active Directory Groups Nesting restrictions is an often-discussed topic among my peers especially in a multi-domain forest and often a question raised in forums and mailing lists. Although there have been some great blogs written that dive deep into the technical restrictions, I personally needed a simple reference chart that I could refer to [...]]]></description>
			<content:encoded><![CDATA[<p>The Active Directory Groups Nesting restrictions is an often-discussed topic among my peers especially in a multi-domain forest and often a question raised in forums and mailing lists. Although there have been some great blogs written that dive deep into the technical restrictions, I personally needed a simple reference chart that I could refer to and which serves me as a memory refresher. Between the two types of Active Directory Groups, Security and Distributions, there are restrictions in both but this attempted reference chart covers only Security type. There are three scopes of Security Groups. Domain Local, Global, and Universal. A leading practice for each of these scopes for NTFS permissions is as follows. Domain Local Groups are used for permissions (ACLs), Users are populated in Global Groups, and Universal Groups are used to manage Global Groups. But often times there are needs to circumvent this model and cross nesting is required especially in a multi-domain forest or in a large environment with multiple forests. The nesting restrictions of each group that you must know about can be broken into three questions and subsequent charts below :</p>
<p>Please note that these nesting restrictions assume Window 2000 native or Windows Server 2003 DFL.</p>
<p>1. Which particular group will take other scope type (nested) as its member i.e from the same domain and from a trusted domain ?</p>
<p>Chart 1 for Question # 1</p>
<table border="1" cellspacing="0" cellpadding="2" width="593">
<tbody>
<tr>
<td width="98" valign="top"><strong>Same Domain</strong></td>
<td width="163" valign="top">Can accept Domain Local</td>
<td width="156" valign="top">Can accept Global Group</td>
<td width="174" valign="top">Can accept Universal Group</td>
</tr>
<tr>
<td width="98" valign="top">Domain Local</td>
<td width="163" valign="top">Yes</td>
<td width="156" valign="top">Yes</td>
<td width="174" valign="top">Yes</td>
</tr>
<tr>
<td width="98" valign="top">Global Group</td>
<td width="163" valign="top">No</td>
<td width="156" valign="top">Yes</td>
<td width="174" valign="top">No</td>
</tr>
<tr>
<td width="98" valign="top">Universal Group</td>
<td width="163" valign="top">No</td>
<td width="156" valign="top">Yes</td>
<td width="174" valign="top">Yes</td>
</tr>
</tbody>
</table>
<p>Chart 2 for Question # 1</p>
<table border="1" cellspacing="0" cellpadding="2" width="595">
<tbody>
<tr>
<td width="105" valign="top"><strong>Trusted Domain</strong></td>
<td width="157" valign="top">Can accept Domain Local</td>
<td width="155" valign="top">Can accept Global Group</td>
<td width="176" valign="top">Can accept Universal Group</td>
</tr>
<tr>
<td width="105" valign="top">Domain Local</td>
<td width="157" valign="top">No</td>
<td width="155" valign="top">Yes</td>
<td width="176" valign="top">Yes</td>
</tr>
<tr>
<td width="105" valign="top">Global Group</td>
<td width="157" valign="top">No</td>
<td width="155" valign="top">No</td>
<td width="176" valign="top">No</td>
</tr>
<tr>
<td width="105" valign="top">Universal Group</td>
<td width="157" valign="top">No</td>
<td width="155" valign="top">Yes</td>
<td width="176" valign="top">Yes</td>
</tr>
</tbody>
</table>
<p>2. Where can a particular group be assigned permissions (ACL) i.e only in the domain where it resides and also cross domains ? (trusted or other child domains within the same forest )</p>
<p><strong>All three scope types can be used to assign permissions in the same domain where the groups reside.</strong></p>
<p>Chart 1 for Question # 2</p>
<table border="1" cellspacing="0" cellpadding="2" width="327">
<tbody>
<tr>
<td width="111" valign="top"><strong>Trusted Domain</strong></td>
<td width="214" valign="top">Can be used to assign permissions</td>
</tr>
<tr>
<td width="111" valign="top">Domain Local</td>
<td width="214" valign="top">No</td>
</tr>
<tr>
<td width="111" valign="top">Global Group</td>
<td width="214" valign="top">Yes</td>
</tr>
<tr>
<td width="111" valign="top">Universal Group</td>
<td width="214" valign="top">Yes</td>
</tr>
</tbody>
</table>
<p>3. Which group will accept users and computers from same and trusted domain ?</p>
<p><strong>All three scope types will accept Users and Workstation from the same domain where they reside.</strong></p>
<p>Chart 1 for Question # 3</p>
<table border="1" cellspacing="0" cellpadding="2" width="326">
<tbody>
<tr>
<td width="104" valign="top"><strong>Trusted Domain</strong></td>
<td width="220" valign="top">Will accept Users and Workstations</td>
</tr>
<tr>
<td width="104" valign="top">Domain Local</td>
<td width="220" valign="top">Yes</td>
</tr>
<tr>
<td width="104" valign="top">Global Group</td>
<td width="220" valign="top">No</td>
</tr>
<tr>
<td width="104" valign="top">Universal Group</td>
<td width="220" valign="top">Yes</td>
</tr>
</tbody>
</table>
<p>More information on the scope of these groups can be found here:</p>
<p><a href="http://technet.microsoft.com/en-us/library/cc755692.aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc755692.aspx</a></p>
<p>To learn about a leading access control model known as AGDLP see :</p>
<p><a href="http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1255549,00.html" target="_blank">http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1255549,00.html</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200909%2Fgroup-nesting-reference-chart%2F&amp;linkname=Group%20Nesting%20Reference%20Chart">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200909/group-nesting-reference-chart/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What is ADRAP Scoping Tool ?</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200907/adrap-scoping-tool/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200907/adrap-scoping-tool/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 02:56:53 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ADHC]]></category>
		<category><![CDATA[ADRAP]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/?p=483</guid>
		<description><![CDATA[Microsoft earlier this month released the AD Risk Assessment Program Scoping Tool to public. My look at it tells me that this tool essentially more fancily does what ADRAP Sutiability Scripts did, which came with ADRAP Snapshot Tool, which of course came when you had the official ADRAP engagement and cut a check for it. [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft earlier this month released the AD Risk Assessment Program Scoping Tool to public. My look at it tells me that this tool essentially more fancily does what ADRAP Sutiability Scripts did, which came with ADRAP Snapshot Tool, which of course came when you had the official ADRAP engagement and cut a check for it. As beneficial as ADRAP could be for a mid-to-large AD environment, I felt in my experience that it never had enough word of mouth. Very few people seem to have heard of it and there isn&#8217;t a lot information publicly available for the program, so until you have it done you have a very little idea on what the program offers. This tool is to do just that, it makes the program more public, it gives you a quick glimpse of what the program is about as well as it readies your environment for the actual ADRAP sweep, hence named Scoping Tool. Below you will see the simple 8 steps process that runs several checks on your AD environment and creates a nice HTML report at the end which you would supposedly send it to your TAM prior to the engagement. Regardless of whether you will have the engagement or not, I think this tool serves as a quick snapshot into your environment. This tool is however intended for premier customers.</p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-24.png"><img class="alignnone size-large wp-image-485" title="08dc1-2009-07-20-20-50-24" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-24-1024x640.png" alt="08dc1-2009-07-20-20-50-24" width="573" height="358" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-311.png"><img class="alignnone size-large wp-image-490" title="08dc1-2009-07-20-20-50-311" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-311-1024x640.png" alt="08dc1-2009-07-20-20-50-311" width="581" height="363" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-39.png"><img class="alignnone size-large wp-image-492" title="08dc1-2009-07-20-20-50-39" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-50-39-1024x640.png" alt="08dc1-2009-07-20-20-50-39" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-51-37.png"><img class="alignnone size-large wp-image-493" title="08dc1-2009-07-20-20-51-37" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-51-37-1024x640.png" alt="08dc1-2009-07-20-20-51-37" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-51-48.png"><img class="alignnone size-large wp-image-494" title="08dc1-2009-07-20-20-51-48" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-51-48-1024x640.png" alt="08dc1-2009-07-20-20-51-48" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-17.png"><img class="alignnone size-large wp-image-495" title="08dc1-2009-07-20-20-52-17" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-17-1024x640.png" alt="08dc1-2009-07-20-20-52-17" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-24.png"><img class="alignnone size-large wp-image-496" title="08dc1-2009-07-20-20-52-24" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-24-1024x640.png" alt="08dc1-2009-07-20-20-52-24" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-34.png"><img class="alignnone size-large wp-image-497" title="08dc1-2009-07-20-20-52-34" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-34-1024x640.png" alt="08dc1-2009-07-20-20-52-34" width="614" height="384" /></a></p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-58.png"><img class="alignnone size-large wp-image-498" title="08dc1-2009-07-20-20-52-58" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2009/07/08dc1-2009-07-20-20-52-58-1024x640.png" alt="08dc1-2009-07-20-20-52-58" width="614" height="384" /></a></p>
<p><a href="http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=22205827-C164-4B62-9F8D-C3CD6077BD82&amp;displaylang=en">Download the tool here</a></p>
<p><a href="http://www.shariqsheikh.com/blog/index.php/200802/active-directory-risk-assessment-program/">Get white papers regarding Active Directory Risk Assessment Program</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200907%2Fadrap-scoping-tool%2F&amp;linkname=What%20is%20ADRAP%20Scoping%20Tool%20%3F">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200907/adrap-scoping-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Infamous /3gb Startup Switch</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200806/the-infamous-3gb-startup-switch/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200806/the-infamous-3gb-startup-switch/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 15:46:00 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/?p=73</guid>
		<description><![CDATA[What is it ? Windows Server 2003 includes support for a startup switch that lets you tune the allocation of use of memory and memory address space. Regardless of the amount of physical memory in your system, Windows uses a virtual address space of 4 GB, with 2 GB allocated to user-mode processes (for example, [...]]]></description>
			<content:encoded><![CDATA[<p>What is it ?</p>
<blockquote><p>Windows Server 2003 includes support for a startup switch that lets you tune the allocation of use of memory and memory address space. Regardless of the amount of physical memory in your system, Windows uses a virtual address space of 4 GB, with 2 GB allocated to user-mode processes (for example, applications) and 2 GB allocated to kernel-mode processes (for example, the operating system and kernel-mode drivers). On systems that have 1 GB or more of physical memory, the startup switche can be used to allocate more memory to applications (3 GB) and less memory to the operating system (1 GB). This additional virtual address space helps reduce the amount of memory fragmentation.</p></blockquote>
<p>How beneficial is it ?</p>
<p>You may have read many articles on this subject before. This discussion has been going on for many years now and at times has almost reached epic proportions due to the conflicting information available from Microsoft. Long story short is that by and large, you should NOT use the /3GB switch unless you meet specific criteria, please read the following article as it demystifies the whole theory. Or read the excerpt below.</p>
<p><a href="http://blogs.technet.com/askperf/archive/2007/03/23/memory-management-demystifying-3gb.aspx">http://blogs.technet.com/askperf/archive/2007/03/23/memory-management-demystifying-3gb.aspx</a></p>
<blockquote><p>
The /3GB option was intended as a short term solution to allow applications such as database servers to maintain more data in memory than a 2GB address space allowed.  However, using the /3GB method to increase the user-mode memory space comes at a cost.  If we have to allocate an additional 1GB of this address space to the user-mode space, then the System space is cut in half.  Drivers, Heap, Paged &amp; NonPaged Memory all have only half the resources to work with now.  However, because of the way memory mapping works, cutting the kernel space in half does a lot more than just reducing the address space.  Many of the structures within the kernel virtual memory space are cut back by far more than 50%.</p>
<p><strong>For a process to access the full 3GB address space, the image file (application process) must have the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set in the image header.</strong></p>
<p>If the flag is not set in the image header, then the OS reserves the third gigabyte so that the application won&#8217;t see virtual addresses greater than 0x7FFFFFFF. You set this flag by specifying the linker flag /LARGEADDRESSAWARE when building the executable.  This flag has no effect when running the application on a system with a 2-GB user address space. Therefore if you enable the /3GB switch, then applications that do not have this flag set can only use the standard 2GB of User mode memory, and the Kernel is still limited to the 1GB space &#8211; <strong>which means that 1GB of virtual memory is basically wasted !</strong></p></blockquote>
<p>All that is required to make it happen is a switch in the boot.ini file. The switch, /3GB, is placed<br />
at the end of the line that executes the WinNT loading process.</p>
<p>Example:</p>
<p><code>[operating systems] multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows NT<br />
Server Version 4.00" /3GB</code></p>
<p>Or you may add an additional line in your boot.ini as above to have the option to boot into either environment, with or without the switch.</p>
<p>What to keep in mind ?</p>
<p>This topic deals with the the virtual memory address space and has no relevance with the physical memory, it is however a limitation of a 32bit OS if you are running 64bit OS this not applicable. At the end of the day you must decide if your application is capable of handling this switch as an added benefit. Often times, if you are having to <em>up</em> the threshold of your OS handling of things and or things such as over-clocking your processor to keep up, one might worry about the logic behind it. Perhaps go for 64bit OS to begin with.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200806%2Fthe-infamous-3gb-startup-switch%2F&amp;linkname=The%20Infamous%20%2F3gb%20Startup%20Switch">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200806/the-infamous-3gb-startup-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find out your server uptime</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200804/how-to-find-out-your-server-uptime/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200804/how-to-find-out-your-server-uptime/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 03:21:58 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/?p=51</guid>
		<description><![CDATA[Using Uptime utility from Microsoft you can get your server uptime (i.e time since the last reboot) which can come in handy particularly when you are trying to troubleshoot a server&#8217;s unexpected reboot and failures. Uptime.exe can be used to display the current uptime of the local or remote system. Optionally, it can also scan [...]]]></description>
			<content:encoded><![CDATA[<p>Using Uptime utility from Microsoft you can get your server uptime (i.e time since the last reboot) which can come in handy particularly when you are trying to troubleshoot a server&#8217;s unexpected reboot and failures.</p>
<blockquote><p>Uptime.exe can be used to display the current uptime of the local or remote system. Optionally, it can also scan the Event log for key system events such as system restart or computers that are not responding (hanging). Where possible, it also calculates system availability. It is primarily intended for Windows NT Server 4.0 Service Pack 4 or later, though it operates in limited fashion on earlier versions.</p></blockquote>
<p>You can download it from the link below and drop it on the root of the c:\ or where you wish and the command line to run is simply <em>uptime</em></p>
<p><a href="http://support.microsoft.com/kb/232243">http://support.microsoft.com/kb/232243</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200804%2Fhow-to-find-out-your-server-uptime%2F&amp;linkname=How%20to%20find%20out%20your%20server%20uptime">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200804/how-to-find-out-your-server-uptime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to rename a Windows Server 2008 domain</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200804/how-to-rename-a-windows-server-2008-domain/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200804/how-to-rename-a-windows-server-2008-domain/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 15:34:50 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/?p=48</guid>
		<description><![CDATA[Previously you have been able to use RENDOM utility provided by Microsoft to rename your Window 2000 and Windows Server 2003 domains. However in Windows Server 2008 domain you don&#8217;t have to separately install Rendom utility. It gets installed as part of &#8220;Active Directory Domain Services&#8221; role when you promote a server to the DC [...]]]></description>
			<content:encoded><![CDATA[<p>Previously you have been able to use RENDOM utility provided by Microsoft to rename your Window 2000 and Windows Server 2003 domains. However in Windows Server 2008 domain <span id="_ctl0_MainContent_PostFlatView"><span>you don&#8217;t have to separately install Rendom utility. It gets installed as part of &#8220;Active Directory Domain Services&#8221; role when you promote a server to the DC role. And It can be found here : </span></span><span id="_ctl0_MainContent_PostFlatView"><span>%windir%\system32\rendom.exe.</span></span></p>
<p>I used it to rename a Windows Server 2008 domain in my test lab environment. The process was pretty straightforward but it may require more tasks if you have multiple DCs in a multi domain environment.</p>
<p>The Forest and Domain Functional Level should be Windows Server 2008 to proceed with the following task.</p>
<p>From the command prompt, I started out by running <strong>rendom /list</strong> which outputs an XML file (<span style="font-family: Arial;">Domainlist.xml)</span> to the directory where rendom resides. You edit that file to change your domain configuration to the new domain name. i.e ForestDNSZones, DomainDNSZones, Netbios name. See referenced link for details.</p>
<p>After you have modified the file you can run <strong>rendom /showforest</strong> which shows you the future configuration, verify and make changes if necessary.</p>
<p>Upload the changes you have made in the XML file: Run <strong>rendom /upload</strong></p>
<p>Verify readiness of Domain Controller(s): Run<strong> rendom /prepare</strong></p>
<p>Execute domain rename instructions: Run <strong>rendom /execute</strong></p>
<p>After thats finishes up successfully, you should also run <strong>GPFIXUP</strong> tool to fix up GPO references to your old domain name. <a href="http://download.microsoft.com/download/c/f/c/cfcbff04-97ca-4fca-9e8c-3a9c90a2a2e2/Domain-Rename-Procedure.doc#_Toc38097948" target="_blank">See Step 12 of this document</a>.</p>
<p>Here is an example :</p>
<blockquote><p>C:\Users\Administrator&gt;<strong>gpfixup /olddns:08r2.lab /newdns:mcts.lab</strong><br />
Group Policy fix up utility Version 1.1 (Microsoft)</p>
<p>Start fixing group policy (GroupPolicyContainer) objects:<br />
&#8230;&#8230;..</p>
<p>Start fixing site group policy links:<br />
.</p>
<p>Start fixing non-site group policy links:<br />
&#8230;.<br />
gpfixup tool executed with success.</p>
<p>C:\Users\Administrator&gt;<strong>gpfixup /oldnb:08r2 /newnb:mcts</strong><br />
Group Policy fix up utility Version 1.1 (Microsoft)</p>
<p>Start fixing group policy (GroupPolicyContainer) objects:<br />
..<br />
gpfixup tool executed with success.</p></blockquote>
<p>Lastly, run <strong>rendom /clean</strong></p>
<p><span id="_ctl0_MainContent_PostFlatView"><span>The identity (domain GUID) of the renamed domain does not change during  a domain rename operation. Thus a computer&#8217;s domain membership does not change as a result of the holding domain being renamed.</span></span></p>
<p align="left">However, every member computer joined to the renamed domain needs to be rebooted twice. Please refer to &#8220;How Domain Rename works&#8221; technical reference for more info.</p>
<p align="left"><a href="http://technet2.microsoft.com/WindowsServer/en/library/4d0c3b6e-e6f5-4ab3-9d81-106ae3a715491033.mspx?mfr=true">How Domain Rename Works : Microsoft Technet</a></p>
<p align="left">Other References:</p>
<p align="left"><a href="http://dsg.port.ac.uk/~hx/rename_domain/index.php" target="_blank">http://dsg.port.ac.uk/~hx/rename_domain/index.php</a></p>
<p align="left">
<p align="left">
<p><a href="http://www.msexchange.org/tutorials/Domain-Rename.html" target="_blank">http://www.msexchange.org/tutorials/Domain-Rename.html</a> (for domains with Exchange)</p>
<p align="left">
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200804%2Fhow-to-rename-a-windows-server-2008-domain%2F&amp;linkname=How%20to%20rename%20a%20Windows%20Server%202008%20domain">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200804/how-to-rename-a-windows-server-2008-domain/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Prevent users from joining workstations to domain (at their will)</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200803/prevent-users-from-joining-workstations-to-domain-at-their-will/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200803/prevent-users-from-joining-workstations-to-domain-at-their-will/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 18:15:24 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/?p=46</guid>
		<description><![CDATA[Every domain has a default setting for ms-DS-MachineAccountQuota value 10. This means that any user can add up to 10 machines to a domain. You can modify this object in directory by using ADSIedit tool to prevent this behavior. Warning: Using ADSIedit can have adverse effects on your Active Directoy environment, if not handled with [...]]]></description>
			<content:encoded><![CDATA[<p>Every domain has a default setting for <em>ms-DS-MachineAccountQuota</em> value 10. This means that any user can add up to 10 machines to a domain. You can modify this object in directory by using ADSIedit tool to prevent this behavior.</p>
<p>Warning: Using ADSIedit can have adverse effects on your Active Directoy environment, if not handled with proper knowledge.</p>
<p>Launch ADSIedit from run command, ADSIedit.msc</p>
<p>Under Domain Configuration, expand and find your domain. Right click and go to the Properties</p>
<p>Look for the following property and modify it to &#8217;0&#8242;</p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/machinequota.bmp"></a><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/04/mchnquota.jpg"><img class="alignnone size-thumbnail wp-image-47" title="mchnquota" src="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/04/mchnquota-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/machinequota.bmp"> </a></p>
<p>Hit OK, Apply and exit</p>
<p>How does it keep track of how many machines have you added based on your user ID/account ?</p>
<p><span style="color: #ffffff;">For a computer account created by domain users, the account has &#8216;ms-DS-CreatorSID&#8217; attribute to indicate the creator user. When a user adds a computer to the domain, a process enumerates the &#8216;ms-DS-CreatorSID&#8217; attribute on every computer account in the domain and calculates if the sum exceeds the current quota for that user.</span></p>
<p><span style="color: #ffffff;">The &#8216;ms-DS-CreatorSID&#8217; and &#8216;ms-DS-MachineAccountQuota&#8217; with default value 10 are also available in Windows Server 2008 AD DS.</span></p>
<p><span style="color: #ffffff;">Note: The &#8216;ms-DS-CreatorSID&#8217; attribute will be unset in the computer account that is pre-created in Active Directory Users and Computers MMC or joined by domain administrators.</span></p>
<p><a title="http://support.microsoft.com/kb/243327" href="http://support.microsoft.com/kb/243327">http://support.microsoft.com/kb/243327</a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200803%2Fprevent-users-from-joining-workstations-to-domain-at-their-will%2F&amp;linkname=Prevent%20users%20from%20joining%20workstations%20to%20domain%20%28at%20their%20will%29">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200803/prevent-users-from-joining-workstations-to-domain-at-their-will/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find out where and why an Account Lockout happened</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200803/find-out-where-and-why-an-account-lockout-happened/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200803/find-out-where-and-why-an-account-lockout-happened/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 14:08:24 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/index.php/2008/03/29/find-out-where-and-why-an-account-lockout-happened/</guid>
		<description><![CDATA[Where Account Lockouts save us from brute force password attacks and help us standardize our environment for password policies, sometimes it can be painful to troubleshoot and find out why and where it happened. Microsoft does provide us with the &#8216;Account Lockout Management Tools&#8217; suite which can be very handy to diagnose the root cause [...]]]></description>
			<content:encoded><![CDATA[<p>Where Account Lockouts save us from brute force password attacks and help us standardize our environment for password policies, sometimes it can be painful to troubleshoot and find out why and where it happened. Microsoft does provide us with the &#8216;Account Lockout Management Tools&#8217; suite which can be very handy to diagnose the root cause of an account lockout.</p>
<blockquote>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>AcctInfo.dll</strong>. Helps isolate and troubleshoot account lockouts and to change a user&#8217;s password on a domain controller in that user&#8217;s site. It works by adding new property pages to user objects in the Active Directory Users and Computers Microsoft Management Console (MMC).</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>ALockout.dll</strong>. On the client computer, helps determine a process or application that is sending wrong credentials.</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>ALoInfo.exe</strong>. Displays all user account names and the age of their passwords.</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>EnableKerbLog.vbs</strong>. Used as a startup script, allows Kerberos to log on to all your clients that run Windows 2000 and later.</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>EventCombMT.exe</strong>. Gathers specific events from event logs of several different machines to one central location.</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>LockoutStatus.exe</strong>. Determines all the domain controllers that are involved in a lockout of a user in order to assist in gathering the logs. LockoutStatus.exe uses the NLParse.exe tool to parse Netlogon logs for specific Netlogon return status codes. It directs the output to a comma-separated value (.csv) file that you can sort further, if needed. The latest version available is 1.0.0.60.</p>
<p class="MsoNormal"><span style="font-family: Symbol;">·</span><span> </span><strong>NLParse.exe</strong>. Used to extract and display desired entries from the Netlogon log files.</p>
</blockquote>
<p>Unfortunately, I didn&#8217;t find good documentation of how to quickly make good use of these tools when my domain admin account started getting mysteriously locked out after I had changed my password due to the policy in place. From my experience I found <em>Lockout Status</em> and <em>EventComb MT</em> to be most useful from the suite.</p>
<p>I knew the common causes why my account would get locked out due to one of the reasons listed here : <a href="http://www.mail.nih.gov/user/faq/AccountLockouts.htm" target="_blank">See this</a> but I needed to figure out what is the offending machine or service thats providing my old credentials to a DC thats causing the account to be locked out.</p>
<p>I started out launching Lockout Status tool and selected my domain admin account as &#8216;target&#8217; from the file menu and running it. It gave me list of all the DCs with the status of my account and more importantly the DC the lockout happened on in the &#8216;Orig Lock&#8217; tab towards the right of the program screen. I then launched the Event CombMT piece and right clicked in the white space in the search area and added the DC the lockout originated at. I choose from &#8216;Option&#8217; menu where I wanted to output the file as txt or CSV. I chose &#8216;Security&#8217; as log files search option for all event types and then putting &#8217;644&#8242; as the event id and clicked on search.</p>
<p>It outputted the CSV file in the area I had specified and I was able to see that it found the event 644 for my ID on 6 different machines across the domain, it was listed under &#8216;Caller Machines Name&#8217; column, (I know its bad administration on my part to sometimes disconnect my terminal sessions instead of logging off). Sure enough when I logged on to those machines I immediately saw the following notifications.</p>
<p><a href="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/alock.JPG"><img src="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/alock.JPG" alt="alock.JPG" /></a></p>
<p><a title="alock2.JPG" href="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/alock2.JPG"><img src="http://www.shariqsheikh.com/blog/wp-content/uploads/2008/03/alock2.JPG" alt="alock2.JPG" /></a></p>
<p>I had to log off and log back in to clear out the error. After that, I ran the Lockout Status tool again and noticed the lock status for my domain admin account had been cleared out.</p>
<p>Conclusion: Never leave your account logged on somewhere (or have a service run under your user context) and lock the machines or disconnect the remote session without logging off, and when using tools like Remote Desktops (which can be useful and allow you to have a list of machines you remote in frequently during the day), make sure you don&#8217;t save your passwords in the session configurations.</p>
<p>More Resources:</p>
<p><a href="https://www.microsoft.com/downloads/details.aspx?FamilyID=7AF2E69C-91F3-4E63-8629-B999ADDE0B9E&amp;displaylang=en" target="_blank">Download the Microsoft Account Management Tools</a></p>
<p><a href="http://technet2.microsoft.com/windowsserver/en/library/546c841f-d3c8-427a-837c-1cbb2f204de01033.mspx?mfr=true" target="_blank">Technet Resource on how to maintain and manage the account lockout</a></p>
<p><a href="http://www.windowsecurity.com/articles/Implementing-Troubleshooting-Account-Lockout.html" target="_blank">WindowsSecuirty.com-Implementing and Troubleshooting Account lockout </a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200803%2Ffind-out-where-and-why-an-account-lockout-happened%2F&amp;linkname=Find%20out%20where%20and%20why%20an%20Account%20Lockout%20happened">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200803/find-out-where-and-why-an-account-lockout-happened/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Import AD subnets into Reverse Lookup Zones</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200803/import-ad-subnets-into-reverse-lookup-zones/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200803/import-ad-subnets-into-reverse-lookup-zones/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 13:17:43 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/index.php/2008/03/29/import-ad-subnets-into-reverse-lookup-zones/</guid>
		<description><![CDATA[Sometimes you have a task on your hand for your Active Directory environment but it isn&#8217;t an easy one, or lets just say that not many people have come across having a need for it (so not a whole lot you can google for). I recently had a situation like this. Basically in our AD [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you have a task on your hand for your Active Directory environment but it isn&#8217;t an easy one, or lets just say that not many people have come across having a need for it (so not a whole lot you can google for). I recently had a situation like this. Basically in our AD environment we failed to realized the importance and fell behind in keeping our reverse lookup zones updated. As we all know that AD infrastructre does not rely on reverse lookups and you can get away with not having all your defined subnets populated in the reverse zones (in-addr.arpa). We began having some random errors of unsuccessful Group policy applications on some machines and also we started being bugged by the SMS group of the failure of SMS clients installation since some applications like SMS do rely on having to lookup machines by their IP addresses.</p>
<p>We are quite a big environment as we have little over 1000 AD defined subnets and only 80 some had been populated in the reverse lookup zones. I was tasked to make sure that all the reverse zones are created in our DNS from the defined subnets. As it could be very tedious task, I wanted to automate the process. I am not a scriptor but I knew that we could not be the only who has had this issue and I tried digging the newsgroups/blogs/forums and the internet in general but I had no or little luck finding any relevant information.</p>
<p>I started off looking into ADSIedit, as I wanted the export the subnet objects and then somehow import them back into the DNS. I knew that there was DNSCMD command line utility that allows you to do various tasks for zones/records creations, deletion and modification. Unfortunately it did not have a very wide syntax that allowed to pipe-in a list from an external source such a CSV file (that would have the subnets I export from AD). As expected the export part went fine and I had the full list of all the AD defined subnets. Now I was struggling to find a VBscript I could wrap this file into and pipe-in thru DNSCMD like utility.</p>
<p>I looked at <a href="http://joeware.net">Joeware</a> free AD utilites, and I saw Joe had a tool called ADfind. I decided to query him and I got a rapid reply back from him with some suggestions, he assured me it is doable using his ADfind utility combined with some other script or utility. In mean time he forwarded my query to <a href="http://msetechnology.com/">Dean Wells</a> of MSEtechnology who emailed me a rather quick solution using Joe&#8217;s ADfind tool (see below). I was extremely pleased how my easy attempt to query seasoned scriptors had paid off.</p>
<p>Apart from other great writing and consulting achievements both <strong><em>Joe Richards </em></strong>and <strong><em>Dean Wells</em></strong> are Micrsoft MVPs and their voluntary efforts to help out the community truly exhibited what MVP program is all about.</p>
<p>So here is the command you would run at your DNS server to accomplish this task;</p>
<p><code>for /f "tokens=1,2,3 delims=." %n in ('adfind -config -rb "CN=Subnets,CN=Sites" -f "objectclass=subnet" name -list') do @dnscmd /zoneadd %p.%o.%n.in-addr.arpa /primary</code></p>
<p>add &#8216;ds&#8217; in front of the primary (/dsprimary) if you wish to make the zones AD integrated</p>
<p><strong>NOTES from Dean</strong><br />
-If you place the syntax above within a batch file, please note that any occurrence of a ‘%’ symbol must be replaced with ‘%%’ (two of them)<br />
-ADfind and DNSCMD must both exist within the current directory or the system path<br />
-In its current form, the syntax assumes the subnet is comprised of 3 octets</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200803%2Fimport-ad-subnets-into-reverse-lookup-zones%2F&amp;linkname=Import%20AD%20subnets%20into%20Reverse%20Lookup%20Zones">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200803/import-ad-subnets-into-reverse-lookup-zones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reset Active Directory Restore Mode password</title>
		<link>http://www.shariqsheikh.com/blog/index.php/200803/reset-active-directory-restore-mode-password/</link>
		<comments>http://www.shariqsheikh.com/blog/index.php/200803/reset-active-directory-restore-mode-password/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 15:07:37 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.shariqsheikh.com/blog/index.php/2008/03/24/reset-active-directory-restore-mode-password/</guid>
		<description><![CDATA[Maybe the most forgotten password is the one for Directory Services Restore Mode (DSRM) because it&#8217;s created only when a DC is built, and used only during critical DC recovery operations, which hopefully does not happen very often. Not knowing this password can prevent a successful recovery. If you don&#8217;t know your DSRM password and [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe the most forgotten password is the one for Directory Services Restore Mode (DSRM) because it&#8217;s created only when a DC is built, and used only during critical DC recovery operations, which hopefully does not happen very often. Not knowing this password can prevent a successful recovery.</p>
<p>If you don&#8217;t know your DSRM password and haven&#8217;t stored them in a safe place, use the following commands for each Domain Controller to reset it to a known value:</p>
<blockquote>
<p class="c11blue">ntdsutil<br />
set dsrm password<br />
reset password on server {servername}</p>
</blockquote>
<p>Once you do this, write down that password and lock/encrypt it away.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.shariqsheikh.com%2Fblog%2Findex.php%2F200803%2Freset-active-directory-restore-mode-password%2F&amp;linkname=Reset%20Active%20Directory%20Restore%20Mode%20password">Share/Bookmark</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.shariqsheikh.com/blog/index.php/200803/reset-active-directory-restore-mode-password/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
