<?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>sheenaustin.com &#187; Active Directory</title>
	<atom:link href="http://www.sheenaustin.com/tag/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sheenaustin.com</link>
	<description>my home on the interweb</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:59:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>DSQuery Operating System Service Pack Version</title>
		<link>http://www.sheenaustin.com/2010/07/20/dsquery-operating-system-service-pack-version/</link>
		<comments>http://www.sheenaustin.com/2010/07/20/dsquery-operating-system-service-pack-version/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 01:59:27 +0000</pubDate>
		<dc:creator>Sheen</dc:creator>
				<category><![CDATA[Windows Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[DSQuery]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Service Pack]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.sheenaustin.com/?p=199</guid>
		<description><![CDATA[I had a requirement recently to get the service pack versions for all workstations on the domain. I tried a few different options but the easiest option was to use the extremely useful dsquery tool. Without further ado, this is the command: dsquery * -scope subtree -attr &#8220;cn&#8221; &#8220;operatingSystem&#8221; &#8220;operatingSystemServicePack&#8221;  -filter &#8220;(&#38;(objectclass=computer)(objectcategory=computer)(operatingSystem=Windows XP*))&#8221; -limit 100000 [...]


Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/19/diskpartexe-warning-when-expanding-drive/' rel='bookmark' title='Permanent Link: Diskpart.exe Warning when expanding drive'>Diskpart.exe Warning when expanding drive</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/07/18/the-winroute-tool/' rel='bookmark' title='Permanent Link: The WinRoute tool'>The WinRoute tool</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I had a requirement recently to get the service pack versions for all workstations on the domain. I tried a few different options but the easiest option was to use the extremely useful dsquery tool.</p>
<p>Without further ado, this is the command:</p>
<blockquote><p>dsquery * -scope subtree -attr &#8220;cn&#8221; &#8220;operatingSystem&#8221; &#8220;operatingSystemServicePack&#8221;  -filter &#8220;(&amp;(objectclass=computer)(objectcategory=computer)(operatingSystem=Windows XP*))&#8221; -limit 100000</p></blockquote>
<p>The output of this command would be as follows:</p>
<p>cn                 operatingSystem                      operatingSystemServicePack<br />
WRK001    Windows XP Professional     Service Pack 1<br />
WRK002    Windows XP Professional     Service Pack 2<br />
WRK003    Windows XP Professional     Service Pack 3</p>
<p>Where, cn is the workstation name and the others are self explanatory.</p>
<p>Share your handy little tips and tricks!</p>


<p>Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/19/diskpartexe-warning-when-expanding-drive/' rel='bookmark' title='Permanent Link: Diskpart.exe Warning when expanding drive'>Diskpart.exe Warning when expanding drive</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/07/18/the-winroute-tool/' rel='bookmark' title='Permanent Link: The WinRoute tool'>The WinRoute tool</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sheenaustin.com/2010/07/20/dsquery-operating-system-service-pack-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Backup and Restore Active Directory</title>
		<link>http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/</link>
		<comments>http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:53:00 +0000</pubDate>
		<dc:creator>Sheen</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Restore]]></category>

		<guid isPermaLink="false">http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/</guid>
		<description><![CDATA[There are many documents written about backing up Active Directory but I didn’t find enough documentation that would help us restore Active Directory. So here is a guide aimed to provide insights into correctly backing up and restoring Active Directory. Here is my mini how to – I have tried to keep it as simple [...]


Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/04/28/setting-up-split-brain-dns-in-windows-server/' rel='bookmark' title='Permanent Link: Setting up Split Brain DNS in Windows Server 2003'>Setting up Split Brain DNS in Windows Server 2003</a></li>
<li><a href='http://www.sheenaustin.com/2010/06/11/symantec-backup-exec-error-0xe00084af-all-versions/' rel='bookmark' title='Permanent Link: Symantec Backup Exec Error 0xe00084af (All Versions)'>Symantec Backup Exec Error 0xe00084af (All Versions)</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There are many documents written about backing up Active Directory but I didn’t find enough documentation that would help us restore Active Directory. So here is a guide aimed to provide insights into correctly backing up and restoring Active Directory.</p>
<p>Here is my mini how to – I have tried to keep it as simple as possible:</p>
<p> <span id="more-162"></span><br />
<h1></h1>
<h6>Backing Up Active Directory</h6>
<p>Active Directory depends on the system state and the NTDS database among other things. So it is important to back these up on your domain controller. It is critically important to ensure that the system state data on a domain controller is backed up regularly since this contains all the core system files that are required to run a domain controller. Manually selecting what needs to be backed up will be extremely complicated and could be error prone – stay away from that path – just backup the entire system state.</p>
<p>What needs to be backed up? – System State</p>
<p>What kind of Backup needs to be run? – Full backup of the system state.</p>
<p>How often is good enough? – Daily &#8211; You will thank me for this <img src='http://www.sheenaustin.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><b>Restoring Active Directory</b> (for experts who just need the short version)</p>
<p>There are two types of restores:</p>
<p>1. <b>Normal Restore</b> – This was also called the Non-Authoritative restore. This is generally performed when you need to restore a domain controller that has failed and there are other domain controllers on the domain. Another option would be to just reinstall the domain controller, clean up the AD metadata of all references to the failed DC and then promote the new server to a DC and replicate. If you are in a situation where you cannot do that, to perform a normal (or Non-Authoritative restore) you would:</p>
<p>a. Boot the domain controller into the Domain Services Restore Mode .</p>
<p>b. Restore system state </p>
<p>c. Reboot into the normal mode.</p>
<p>d. Replicate from other domain controllers.</p>
<p>2. <b>Authoritative Restore</b> – This would be performed in cases where you make a mistake like, say, delete an OU. In this case, a normal restore would not help since the OU that you just restored would get deleted again when you replicate changes with other domain controllers. An authoritative restore would help you undo a big mistake by ensuring that you are taken back to a working copy of AD. However, changes that you made since the last full backup would be lost. (So run your full backups daily!). To perform an authoritative restore:</p>
<p>a. Perform a normal restore.</p>
<p>b. Don’t reboot after the restore.</p>
<p>c. Use ntdsutil to get into the authoritative restore mode.</p>
<p>d. Specify if you want to mark the entire database or just a subtree as authoritative.</p>
<p>e. Quit the utility and reboot the server</p>
<p>3. <b>Primary Restore</b> – This restore is only used when you have a major disaster (read complete meltdown) and you have no working domain controllers. In such a case, you will have restore the entire domain from backups. The working process is very similar to the Normal Restore procedure mentioned above. This is how you would do it:</p>
<p>a. Boot the domain controller into the Domain Services Restore Mode .</p>
<p>b. Restore system state – ensure that the advanced option ‘Mark the restored data as the primary data for all replicas’ is checked.</p>
<p>c. Reboot into the normal mode.</p>
<p><b></b></p>
<p><b></b></p>
<p><b>Restoring Active Directory </b>(for the rest of us)</p>
<p>1. <b>Normal Restore</b> – Here’s the step by step.</p>
<p>a. Reboot Server</p>
<p>b. During startup press F8 and choose, ‘Directory Services Restore Mode (Windows DCs only)</p>
<p>c. Choose the OS to be started, hit enter.</p>
<p>d. Hit OK at the Safe Mode login.</p>
<p>e. Open up the NTBackup utility.</p>
<p>f. Click next on the welcome page.</p>
<p>g. Select ‘Restore Files and Settings’ from the backup or restore page. Click Next.</p>
<p>h. Choose the backup you want to restore from the ‘What to restore’ page. Click Next.</p>
<p>i. Click Finish to start the restore. (Advanced options are best left untouched for a normal restore unless you want to save the backup elsewhere.)</p>
<p>j. Reboot server.</p>
<p>2. <b>Authoritative Restore –</b></p>
<p>a. Perform a normal restore as mentioned before.</p>
<p>b. Do not reboot server after the restore.</p>
<p>c. Click on start -&gt; run -&gt; type ntdsutil.</p>
<p>d. Now type ‘authoritative restore’</p>
<p>e. Now specify the components you want to make authoritative. Enter either ‘restore database’ or ‘restore subtree’ along with the DN of the AD object you want to make authoritative.</p>
<p>f. Confirm your actions when prompted.</p>
<p>g. Type quit until the utility exits.</p>
<p>h. Reboot server.</p>
<p>3. <b>Primary Restore –</b></p>
<p>a. Reboot Server</p>
<p>b. During startup press F8 and choose, ‘Directory Services Restore Mode (Windows DCs only)</p>
<p>c. Choose the OS to be started, hit enter.</p>
<p>d. Hit OK at the Safe Mode login.</p>
<p>e. Open up the NTBackup utility.</p>
<p>f. Click next on the welcome page.</p>
<p>g. Select ‘Restore Files and Settings’ from the backup or restore page. Click Next.</p>
<p>h. Choose the backup you want to restore from the ‘What to restore’ page. Click Next.</p>
<p>i. Click Advanced.</p>
<p>j. Ensure that on the ‘Where to Restore’ page, the default setting ‘Original Location’ is selected. Click Next.</p>
<p>k. On the How to Restore page, ensure that ‘Replace existing files’ is selected. Click Next.</p>
<p>l. On the Advanced Restore Options page – enable the ‘When restoring replicated data sets, mark the restored data as the primary data for all replicas’ option. Click Next.</p>
<p>m. Click Finish to start the primary restore.</p>
<p>n. Reboot server.</p>
<p>o. Go to sleep <img src='http://www.sheenaustin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#160;</p>
<p>PS: As always, please exercise due diligence when using the instructions in a live environment. Kindly do not blame me if something doesn&#8217;t work if Microsoft decides to change their code.</p>


<p>Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/04/28/setting-up-split-brain-dns-in-windows-server/' rel='bookmark' title='Permanent Link: Setting up Split Brain DNS in Windows Server 2003'>Setting up Split Brain DNS in Windows Server 2003</a></li>
<li><a href='http://www.sheenaustin.com/2010/06/11/symantec-backup-exec-error-0xe00084af-all-versions/' rel='bookmark' title='Permanent Link: Symantec Backup Exec Error 0xe00084af (All Versions)'>Symantec Backup Exec Error 0xe00084af (All Versions)</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory Password Expiry Reminder Email</title>
		<link>http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/</link>
		<comments>http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 03:18:00 +0000</pubDate>
		<dc:creator>Sheen</dc:creator>
				<category><![CDATA[Windows Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Email Notification]]></category>
		<category><![CDATA[Password Expiry]]></category>

		<guid isPermaLink="false">http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/</guid>
		<description><![CDATA[If you have managed an Active Directory installation that has a large number of users who connect to the network infrequently, you may have faced a problem where the user’s password expires when they are away from the network and possibly leaving them in a situation where they are not able to reset their password [...]


Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2008/12/06/script-to-kill-processes-older-than-x-days/' rel='bookmark' title='Permanent Link: Script to kill processes older than x days.'>Script to kill processes older than x days.</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you have managed an Active Directory installation that has a large number of users who connect to the network infrequently, you may have faced a problem where the user’s password expires when they are away from the network and possibly leaving them in a situation where they are not able to reset their password remotely.</p>
<p>I recently was in this situation and had to write a script to intimate users about an impending password expiry. Here is what the script does:</p>
<p><span id="more-127"></span></p>
<p>The script queries your domain for all users and checks for the last password change date. This value is compared against you max password age value and then sends an email reminder to the user that is password is about to expire in x days. This email reminder is sent 9, 6 and 3 days before the actual password expiry date, giving the user enough time to reset the password without getting locked out.</p>
<p>You can schedule the script to run every day in which case you will need to write a simple batch file to call this script and maybe even log the output to a file. The script can be run under the system account. You can save the following line as a batch file that can be used to call the script:</p>
<blockquote><p><span style="color: #000000;">cscript “Path\to\the\vbs\script” &gt; PwdExpyEmail.log</span></p></blockquote>
<p>You can download the script <a href="http://www.sheenaustin.com/wp-content/uploads/2009/06/PasswordExpiryEmail.zip">here</a>.</p>
<p>Note: You will have to edit the values between the **** to suit your environment.</p>


<p>Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2008/12/06/script-to-kill-processes-older-than-x-days/' rel='bookmark' title='Permanent Link: Script to kill processes older than x days.'>Script to kill processes older than x days.</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Get list of machines by OS type from Active Directory</title>
		<link>http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/</link>
		<comments>http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/#comments</comments>
		<pubDate>Mon, 18 May 2009 08:19:19 +0000</pubDate>
		<dc:creator>Sheen</dc:creator>
				<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[DSQuery]]></category>
		<category><![CDATA[Windows Server 2003]]></category>

		<guid isPermaLink="false">http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/</guid>
		<description><![CDATA[Here is an easy way of getting a list of computers that have a particular OS type from Active Directory using DSQuery. dsquery * domainroot -filter &#8220;(&#38;(objectCategory=computer)(operatingSystem=Windows XP*))&#8221; The command above would give you a list of all computers that have a Windows XP operating system. For Windows Servers, change the command as follows: dsquery [...]


Related posts:<ol><li><a href='http://www.sheenaustin.com/2010/07/20/dsquery-operating-system-service-pack-version/' rel='bookmark' title='Permanent Link: DSQuery Operating System Service Pack Version'>DSQuery Operating System Service Pack Version</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/19/diskpartexe-warning-when-expanding-drive/' rel='bookmark' title='Permanent Link: Diskpart.exe Warning when expanding drive'>Diskpart.exe Warning when expanding drive</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here is an easy way of getting a list of computers that have a particular OS type from Active Directory using DSQuery.</p>
<blockquote><p>dsquery * domainroot -filter &#8220;(&amp;(objectCategory=computer)(operatingSystem=Windows XP*))&#8221;</p></blockquote>
<p><span style="color: #000000;">The command above would give you a list of all computers that have a Windows XP operating system. For Windows Servers, change the command as follows:</span></p>
<blockquote><p>dsquery * domainroot -filter &#8220;(&amp;(objectCategory=computer)(operatingSystem=Windows Server*))&#8221;</p></blockquote>
<p>The output of the commands above would look something like this:</p>
<blockquote><p><span style="color: #000000;">samid</span></p>
<p><span style="color: #000000;">server1$</span></p>
<p><span style="color: #000000;">server2$</span></p>
<p><span style="color: #000000;">server3$</span></p>
<p><span style="color: #000000;">dsget succeeded</span></p></blockquote>
<p>Note the ‘samid’ at the head and ‘dsget succeeded’ at the end and the ‘$’ at the end tail of every server name.</p>
<p>If you are like me, and you would like just get a nice clean output with only server names, you can run this command:</p>
<p><span id="more-117"></span></p>
<blockquote><p>for /f &#8220;Tokens=1 delims=$&#8221; %a in (&#8216;dsquery * domainroot -filter &#8220;(&amp;(objectCategory=computer)(operatingSystem=Windows Server*))&#8221;^| dsget computer -samid^|find /V &#8220;samid&#8221; ^| find /V &#8220;dsget&#8221;&#8216;) do echo %a</p></blockquote>
<p>The output of the command shown above would be:</p>
<blockquote><p><span style="color: #000000;">server1</span></p>
<p><span style="color: #000000;">server2</span></p>
<p><span style="color: #000000;">server3</span></p></blockquote>
<p>… and can be used as input to a file or another command etc…</p>


<p>Related posts:<ol><li><a href='http://www.sheenaustin.com/2010/07/20/dsquery-operating-system-service-pack-version/' rel='bookmark' title='Permanent Link: DSQuery Operating System Service Pack Version'>DSQuery Operating System Service Pack Version</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/' rel='bookmark' title='Permanent Link: Active Directory Audit Script'>Active Directory Audit Script</a></li>
<li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/19/diskpartexe-warning-when-expanding-drive/' rel='bookmark' title='Permanent Link: Diskpart.exe Warning when expanding drive'>Diskpart.exe Warning when expanding drive</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory Audit Script</title>
		<link>http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/</link>
		<comments>http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/#comments</comments>
		<pubDate>Tue, 05 May 2009 06:41:14 +0000</pubDate>
		<dc:creator>Sheen</dc:creator>
				<category><![CDATA[Windows Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Audit]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/</guid>
		<description><![CDATA[Paul Bergson wrote this brilliant script that queries active directory and gives you a wealth of information that can be used to audit active directory. I have slightly modified this script and added a few lines to get information like the email address and the exchange home server of the user using the mail and [...]


Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2010/01/29/script-to-hot-backup-vmware-esx-virtual-machines/' rel='bookmark' title='Permanent Link: Script to Hot Backup VMWare ESX Virtual Machines'>Script to Hot Backup VMWare ESX Virtual Machines</a></li>
<li><a href='http://www.sheenaustin.com/2008/12/06/script-to-kill-processes-older-than-x-days/' rel='bookmark' title='Permanent Link: Script to kill processes older than x days.'>Script to kill processes older than x days.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pbbergs.com" target="_blank">Paul Bergson</a> wrote <a href="http://www.pbbergs.com/windows/downloads.htm#AcctAttrib" target="_blank">this</a> brilliant script that queries active directory and gives you a wealth of information that can be used to audit active directory.</p>
<p>I have slightly modified this script and added a few lines to get information like the email address and the exchange home server of the user using the mail and msExchHomeServerName attributes.</p>
<p>You can download the modified script <a href="http://www.sheenaustin.com/wp-content/uploads/2009/05/accountattribs.vbs" target="_blank">here</a>.</p>
<p>How the script works:</p>
<p> <span id="more-113"></span>
<p>It queries Active Directory using LDAP for a bunch of known user attributes and writes them to a .csv file in the same directory as the script. The file is will be named yyyymmdd_audit.csv </p>
<p>NOTE: I am NOT the original author of this script. Please give all credit to <a href="http://www.pbbergs.com/windows/downloads.htm#AcctAttrib" target="_blank">Paul Bergson</a> who is an MVP for Directory Services.</p>


<p>Related posts:<ol><li><a href='http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/' rel='bookmark' title='Permanent Link: Active Directory Password Expiry Reminder Email'>Active Directory Password Expiry Reminder Email</a></li>
<li><a href='http://www.sheenaustin.com/2009/05/18/get-list-of-machines-by-os-type-from-active-directory/' rel='bookmark' title='Permanent Link: Get list of machines by OS type from Active Directory'>Get list of machines by OS type from Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2009/10/07/how-to-backup-and-restore-active-directory/' rel='bookmark' title='Permanent Link: How to Backup and Restore Active Directory'>How to Backup and Restore Active Directory</a></li>
<li><a href='http://www.sheenaustin.com/2010/01/29/script-to-hot-backup-vmware-esx-virtual-machines/' rel='bookmark' title='Permanent Link: Script to Hot Backup VMWare ESX Virtual Machines'>Script to Hot Backup VMWare ESX Virtual Machines</a></li>
<li><a href='http://www.sheenaustin.com/2008/12/06/script-to-kill-processes-older-than-x-days/' rel='bookmark' title='Permanent Link: Script to kill processes older than x days.'>Script to kill processes older than x days.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sheenaustin.com/2009/05/04/active-directory-audit-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
