<?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>Marc Valk dot Net &#187; Active Directory</title>
	<atom:link href="http://www.marcvalk.net/category/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcvalk.net</link>
	<description>blogging about...... Microsoft, Cloud Computing and all other things I find interesting</description>
	<lastBuildDate>Thu, 02 Sep 2010 08:55:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PowerShell: Last Logon</title>
		<link>http://www.marcvalk.net/2009/11/powershell-last-logon/</link>
		<comments>http://www.marcvalk.net/2009/11/powershell-last-logon/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:32:30 +0000</pubDate>
		<dc:creator>mvalk</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.marcvalk.net/2009/11/powershell-last-logon/</guid>
		<description><![CDATA[I wanted to write a powershell script to retrieve the last logon property of an Active Directory User. Here is&#160; how I came to the final script. First of all: to get the domain users, use the command: Get-QADUser This will return a list of all the domain users. As it will not return the [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to write a powershell script to retrieve the last logon property of an Active Directory User. Here is&#160; how I came to the final script.</p>
<p>First of all: to get the domain users, use the command:</p>
<ul>
<li><em><font size="2">Get-QADUser</font></em> </li>
</ul>
<p>This will return a list of all the domain users. As it will not return the property LastLogon, you have to include it. And for a better performance you can exclude the default properties</p>
<ul>
<li><font size="2"><em>Get-QADUser&#160; -IncludedProperties name,lastlogon</em> </font></li>
</ul>
<p>You will now have all your domain users and the property Lastlogon. To list them:</p>
<ul>
<li><em>Get-QADUser -DontUseDefaultIncludedProperties -IncludedProperties lastlogon&#160; | Select-Object Name,LastLogon</em> </li>
</ul>
<p>Next, to export it to a csv file (use the NoTypeInformation parameter to remove the .NET object header):</p>
<ul>
<li><em>Get-QADUser -DontUseDefaultIncludedProperties -IncludedProperties lastlogon&#160; | Select-Object Name,LastLogon | Export-Csv c:\ADusers.csv -NoTypeInformation</em> </li>
</ul>
<p>BTW: I used <a title="PowerGUI Site" href="http://www.powergui.org/index.jspa" target="_blank">PowerGUI Script Editor</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcvalk.net/2009/11/powershell-last-logon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting FRS &#8211; SYSVOL Sync</title>
		<link>http://www.marcvalk.net/2009/10/troubleshooting-frs-sysvol-sync/</link>
		<comments>http://www.marcvalk.net/2009/10/troubleshooting-frs-sysvol-sync/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 09:52:48 +0000</pubDate>
		<dc:creator>mvalk</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.marcvalk.net/2009/10/troubleshooting-frs-sysvol-sync/</guid>
		<description><![CDATA[A customer had a problem with synchronization between 2 domain controllers. Changes on the NETLOGON share on DC1 we’re not synchronized to DC2. First thing to look for is events in the File Replication Service Event Log. On DC1 I did not find any events being logged but on DC2 I found a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>A customer had a problem with synchronization between 2 domain controllers. Changes on the NETLOGON share on DC1 we’re not synchronized to DC2.</p>
<p>First thing to look for is events in the File Replication Service Event Log. On DC1 I did not find any events being logged but on DC2 I found a couple of warnings with eventid 13508:    <br /><em><font size="2">The File Replication Service is having trouble enabling replication from DC1 to DC2 for c:\windows\sysvol\domain using the DNS name ad01gimd.directory.gimd.nl. FRS will keep retrying</font>.</em>……</p>
<p>So I restarted the File Replication Service on DC2. After the restart there was no warning anymore, just an informational message eventid 13516 stating:   <br /><em>The File Replication Service is no longer preventing the computer DC2 from becoming a domain controller. The system volume has been successfully initialized and the Netlogon service has been notified that the system volume is now ready to be shared as SYSVOL…….</em></p>
<p>I did the same service restart on DC1. This did produce a event Error with eventid 13568, stating:   <br /><em>The File Replication Service has detected that the replica set &quot;DOMAIN SYSTEM VOLUME (SYSVOL SHARE)&quot; is in JRNL_WRAP_ERROR.      <br /> Replica set name is&#160;&#160;&#160; : &quot;DOMAIN SYSTEM VOLUME (SYSVOL SHARE)&quot;       <br /> Replica root path is&#160;&#160; : &quot;c:\windows\sysvol\domain&quot;       <br /> Replica root volume is : &quot;\\.\C:&quot;       <br /> A Replica set hits JRNL_WRAP_ERROR when the record that it is trying to read from the NTFS USN journal is not found.&#160; This can occur because of one of the following reasons…….</em></p>
<p> To resolve this error execute the following steps, just make sure you’re not using a post Windows 2000 SP3 Operating System, as this solution is not recommended to&#160; use on this OS:</p>
<ul>
<li>open the registry editor and navigate to the key:     <br />HKLM\SYSTEM\CurrentControlSet\Services\NtFrs\Paramaters</li>
<li>Create a new DWORD value named: “Enable journal wrap automatic restore”&#160; and give it a value of 1</li>
<li>restart your File Replication Service</li>
</ul>
<p>This should produce a warning in your File Replication Service Event log (13560) stating:   <br /><em>The File Replication Service is deleting this computer from the replica set &quot;DOMAIN SYSTEM VOLUME (SYSVOL SHARE)&quot; as an attempt to recover from the error state,      <br /> Error status = FrsErrorSuccess       <br /> At the next poll, which will occur in 5 minutes, this computer will be re-added to the replica set. The re-addition will trigger a full tree sync for the replica set….</em></p>
<p>So I gave the server 5 minutes. After that I got some informational messages in the event log (13553, 13554, 13516)   </p>
<table border="0" cellspacing="0" cellpadding="2" width="518">
<tbody>
<tr>
<td valign="top" width="72">13553</td>
<td valign="top" width="444">
<p><em>The File Replication Service successfully added this computer to the following replica set:              <br />&#160;&#160;&#160; &quot;DOMAIN SYSTEM VOLUME (SYSVOL SHARE)&quot;</em> </p>
</td>
</tr>
<tr>
<td valign="top" width="72">13554</td>
<td valign="top" width="444">
<p><em>The File Replication Service successfully added the connections shown below to the replica set:              <br />&#160;&#160;&#160; &quot;DOMAIN SYSTEM VOLUME (SYSVOL SHARE)&quot;               <br />&#160;&#160;&#160;&#160;&#160; &quot;DC2.&lt;Domain&gt;&quot;               <br />&#160;&#160;&#160;&#160;&#160; &quot;DC2&lt;Domain&gt;&quot;</em> </p>
</td>
</tr>
<tr>
<td valign="top" width="72">13516</td>
<td valign="top" width="444"><em>The File Replication Service is no longer preventing the computer DC1 from becoming a domain controller. The system volume has been successfully initialized and the Netlogon service has been notified that the system volume is now ready to be shared as SYSVOL.</em> </td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>After creating a text file on one of the netlogon shares, it replicated correctly to the other domain controller.   <br />Another problem solved, another happy customer <img src='http://www.marcvalk.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcvalk.net/2009/10/troubleshooting-frs-sysvol-sync/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
