<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Cluebat-man to the rescue : SysAdmin</title><link>http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx</link><description>Tags: SysAdmin</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Could not create NTDS settings on domain controller...</title><link>http://msmvps.com/blogs/vandooren/archive/2009/04/14/could-not-create-ntds-settings-on-domain-controller.aspx</link><pubDate>Tue, 14 Apr 2009 16:24:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1687421</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1687421</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1687421</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2009/04/14/could-not-create-ntds-settings-on-domain-controller.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Could not create NTDS settings yadayadayada on domain controller CN=yadayadayada. The RPC server is unavailable.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This was the error message greeting me (with some meaningful text instead of the yadayadayada of course :)) when I tried to add a backup domain controller to the domain of our test and development network. It was the first time I encountered an error at the DC promotion stage.&lt;/p&gt;
&lt;p&gt;I checked the usual things (network connections, privileges, etc) but nothing jumped out at me. Now, if an error dialog mentions RPC, then the usual error is either a DNS error, or a DNS server that has not yet refreshed its zone information.&lt;/p&gt;
&lt;p&gt;So I opened the DNS config, and discovered that only 1 NIC of our the new DC was registered in DNS. Our networks are multihomed (3 networks in parallel) and yet only 1 address was registered for the NIC. This was a bit odd. There should be 2 (one network has no DNS on purpose).&lt;/p&gt;
&lt;p&gt;A quick ping revealed that one of the NICs had no connectivity. It turned out that the primary DC was a bad network connection, due to some wiggling with the cables.&amp;nbsp;Plugging it all the way and then re-registereing the NICs of the new DC with DNS solved the problem.&lt;/p&gt;
&lt;p&gt;I still don&amp;#39;t understand why we got that problem, because the disconnected NIC was last in the binding order, so the&amp;nbsp;new DC should have used the available&amp;nbsp;connection anyway. My guess is that it retrieved the address via DNS, and got the address of the NIC that was disconnected. Ah well. Live and learn.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1687421" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>The kerberos client received a KRB_AP_ERR_MODIFIED error</title><link>http://msmvps.com/blogs/vandooren/archive/2009/04/02/the-kerberos-client-received-a-krb-ap-err-modified-error.aspx</link><pubDate>Thu, 02 Apr 2009 10:43:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1684118</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1684118</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1684118</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2009/04/02/the-kerberos-client-received-a-krb-ap-err-modified-error.aspx#comments</comments><description>&lt;p&gt;This is what I got in the event logs yesterday afternoon:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Event Type:&amp;nbsp;Error&lt;br /&gt;Event Source:&amp;nbsp;Kerberos&lt;br /&gt;Event Category:&amp;nbsp;None&lt;br /&gt;Event ID:&amp;nbsp;4&lt;br /&gt;Computer:&amp;nbsp;SE-SMURF01&lt;br /&gt;Description:&lt;br /&gt;The kerberos client received a KRB_AP_ERR_MODIFIED error from the server PC-BLABLA09$.&amp;nbsp; The target name used was . This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named&amp;nbsp; machine accounts in the target realm (FOO.BAR.STRIPE.LOCAL), and the client realm.&amp;nbsp;&amp;nbsp; Please contact your system administrator.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Event Type:&amp;nbsp;Error&lt;br /&gt;Event Source:&amp;nbsp;Kerberos&lt;br /&gt;Event Category:&amp;nbsp;None&lt;br /&gt;Event ID:&amp;nbsp;4&lt;br /&gt;Computer:&amp;nbsp;SE-SMURF01&lt;br /&gt;Description:&lt;br /&gt;The kerberos client received a KRB_AP_ERR_MODIFIED error from the server PC-BLA09$.&amp;nbsp; The target name used was RPCSS/PC-BLA10. This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named&amp;nbsp; machine accounts in the target realm (FOO.BAR.STRIPE.LOCAL), and the client realm.&amp;nbsp;&amp;nbsp; Please contact your system administrator.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I had replaced those machines a week ago, and everything seemed to work fine. So I didn&amp;#39;t understand why these errors were suddenly popping up. The applications running on those computers where throwing a wobbler as well. Some googling later I found 2 remarks that were useful.&lt;/p&gt;
&lt;p&gt;The first one was that someone fixed it by taking the computer out of the domain, renaming it, changing the SID, and changing the IP address. While this is overkill on the scale of killing a mouse with a thermonuclear weapon, it pointed in the direction of a network level problem.&lt;/p&gt;
&lt;p&gt;The second remark was by a Microsoft employee who explained that DNS misconfiguration can be the source of problems like this. If kerberos thinks it is communicating with pcA it encrypts the kerb ticket with the password of pcA. but if the ticket then ends up on pcB because of the DNS mismatch, the above events will be logged.&lt;/p&gt;
&lt;p&gt;At that moment I realized that I had changed the IP address of an adapter on PC-BLA10 because it conflicted with PC-BLA09. The reason everything worked fine initially was because that port had been left disconnected until 2 days ago when I configured the correct IP address. The conflict was resolved and the DNS information was updated, but that didn&amp;#39;t mean that the DNS caches were up to date. So I cleared the DNS cache of the DNS server, and used ipconfig /flushdns to clear the resolver cache on the domain controller and PC-BLA10, and the problem disappeared.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1684118" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Windows+Platform/default.aspx">Windows Platform</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Scheduled task would not run</title><link>http://msmvps.com/blogs/vandooren/archive/2009/02/25/scheduled-task-would-not-run.aspx</link><pubDate>Wed, 25 Feb 2009 08:13:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1673693</guid><dc:creator>vanDooren</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1673693</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1673693</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2009/02/25/scheduled-task-would-not-run.aspx#comments</comments><description>&lt;p&gt;The scheduled task for running ntbackup on our fileserver would not run anymore. It would stop with a return code of 0x80, and nothing worthwhile in the log file or event log. It ran fine for months, apart from the occasional hickup such as having no more free tapes in the loader, or a tape not being imported correctly.&lt;/p&gt;
&lt;p&gt;I tried running the backup batch file manually, and that worked fine. I ran it under the dedicated backup account, and that worked fine too. But it wouldn&amp;#39;t run automatically, and starting the task manually when logged in didn&amp;#39;t work either. I couldn&amp;#39;t find any useful debugging info so I turned to google. I found several people who has similar problems, but most had to do with a bug in the HID service which somehow interfered with ntbackup. I looked around some more and finally I &lt;a href="http://forums.techarena.in/windows-server-help/953052.htm"&gt;found something&lt;/a&gt; that ended up giving me the final clue.&lt;/p&gt;
&lt;p&gt;I opened up the task manager and noticed that there were 21 instances of xcopy still running, 23 instances of psexec, and 3 instances of ntbackup. These were probably left over from some tests I had done with the backup script of one of the new servers (a backup domain controller) which uses the 3 aforementioned programs.&lt;/p&gt;
&lt;p&gt;After killing these dead processes I tried to run the backup task again, and everything worked fine this time. In my naivety, I had assumed that ending a task would end the processes it had spawned, but that seems to have been a mistake. Ah well, everything is working again, and now that I know the cause, I can prevent this from happening again.&lt;/p&gt;
&lt;p&gt;This is why I try to understand a problem, rather than just rebooting the machine. A reboot would have fixed the problem in less time then I needed to figure this out. But then I wouldn&amp;#39;t have known what happened (I hate that) and I wouldn&amp;#39;t be able to prevent this from happening again. I would have been stuck in a regular but unknown problem -&amp;gt; reboot cycle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1673693" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Windows+Platform/default.aspx">Windows Platform</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>More Terminal Server License Server  weirdness</title><link>http://msmvps.com/blogs/vandooren/archive/2009/01/06/more-terminal-server-license-server-weirdness.aspx</link><pubDate>Tue, 06 Jan 2009 06:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1658616</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1658616</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1658616</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2009/01/06/more-terminal-server-license-server-weirdness.aspx#comments</comments><description>&lt;p&gt;Last week I had a very peculiar problem with the Terminal Server licensing.&lt;/p&gt;
&lt;p&gt;I couldn&amp;#39;t connect to the licensing server anymore, even though it was running. The Terminal Server Licensing app couldn&amp;#39;t detect it anymore. The only thing that still worked was a network ping, but as far as Windows was concerned, we were running unlicensed.&lt;/p&gt;
&lt;p&gt;The weird thing was that Terminal Server itself disagreed, and kept working without complaints. One of these servers had been running for a year already, so it was not the 120 day grace period that was hiding an underlying problem.&lt;/p&gt;
&lt;p&gt;At the time I didn&amp;#39;t really understand why it still worked, but my colleague pointed out the the system time was wrong. The licensing server is a virtual machine, and for some reason, the time of the virtual machine was not linked to the NTP controlled time of the host. And as we all know, if the system times are off by n minutes, the mutual authentication fails and no secure connection can be established.&lt;/p&gt;
&lt;p&gt;As it turns out, Terminal Server Licensing is ever more stupid &lt;a href="http://msmvps.com/blogs/vandooren/archive/2008/03/19/license-server-doesn-t-serve-license.aspx" title="http://msmvps.com/blogs/vandooren/archive/2008/03/19/license-server-doesn-t-serve-license.aspx"&gt;than I already knew&lt;/a&gt;. Not only doesn&amp;#39;t it count licenses, but the Terminal Servers don&amp;#39;t even connect to the license server to ask for licensing. Because if they did, then they would have complained about it since connecting was no longer possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1658616" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Backing up event logs in their normal binary format</title><link>http://msmvps.com/blogs/vandooren/archive/2008/12/19/backing-up-event-logs-in-their-normal-binary-format.aspx</link><pubDate>Fri, 19 Dec 2008 13:15:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1657238</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1657238</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1657238</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/12/19/backing-up-event-logs-in-their-normal-binary-format.aspx#comments</comments><description>&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Times New Roman;"&gt;Some time ago I was looking for a way to make backups of the eventlogs of our server, preferably without me ever having to do anything anymore &lt;/span&gt;&lt;span style="font-family:Wingdings;mso-ascii-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;span style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;This was not success. There are a couple of tools to make text exports from eventlogs. These have the disadvantage that they make the logs very large and unsuitable for looking at with the even viewer. As an added bonus, these are slow too (since every item has to be read individually).&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;EventQuery.vbs is one of these tools and it is so dog slow that it is almost a crime that it has been included with Windows. Ever wanted to bring a domain controller slow to a crawl? Simple: Use EventQuery.vbs to export the security event log. That&amp;rsquo;ll do it.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;Anyway, I checked with my fellow MVPs, and there is no built-in (or free) tool to save event logs as binary event log files, so I gave up.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;But then I accidentally discovered that there is a win32 API that exposes the event log functionality. And as luck would have it, I am a programmer and thus perfectly suited to make such a thing myself. It would have been trivial to make it at work, but I decided to do this at home so that I could share the code.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;It is of course perfectly possible that such a free tool exists and I simply didn&amp;#39;t find it.&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="margin:12pt 0cm 3pt;"&gt;&lt;em&gt;&lt;span style="font-size:large;font-family:Arial;"&gt;The code&lt;/span&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The code is simple, though the line count was increased by the desire to implement error handling.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:10pt;color:blue;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;int&lt;/span&gt;&lt;span style="font-size:10pt;font-family:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt; _tmain(&lt;span style="color:blue;"&gt;int&lt;/span&gt; argc, _TCHAR* argv[])&lt;br /&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;_TCHAR* computerName = NULL;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;_TCHAR* logName = NULL;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;_TCHAR* file = NULL;&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;//populate the variables, based on the input arguments&lt;br /&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;(argc == 3)&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;computerName = NULL;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;logName = argv[1];&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;file = argv[2];&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;else&lt;/span&gt; &lt;span style="color:blue;"&gt;if&lt;/span&gt;(argc == 4)&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;computerName = argv[1];&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;logName = argv[2];&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;file = argv[3];&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;else&lt;br /&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Usage();&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;return&lt;/span&gt; -1;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;//Open the eventlog&lt;br /&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;HANDLE hEventLog = OpenEventLog(computerName, logName);&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;(NULL == hEventLog)&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_tprintf_s(TEXT(&lt;span style="color:#a31515;"&gt;&amp;quot;Could not open eventlog %s on computer %s\n&amp;quot;&lt;/span&gt;),&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;logName, computerName);&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PrintError();&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;return&lt;/span&gt; -1;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:green;"&gt;//backup the event log to file&lt;br /&gt;&lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;(FALSE == BackupEventLog(hEventLog, file))&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;{&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;_tprintf_s(TEXT(&lt;span style="color:#a31515;"&gt;&amp;quot;Could not save eventlog to file %s\n&amp;quot;&lt;/span&gt;), file);&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PrintError();&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CloseEventLog(hEventLog);&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;return&lt;/span&gt; -1;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;CloseEventLog(hEventLog);&lt;br /&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;return&lt;/span&gt; 0;&lt;br /&gt;}&lt;/span&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;There is little to tell about the code. It can be invoked with either 2 or 3 command line arguments:&lt;/span&gt;&lt;/p&gt;
&lt;ul style="margin-top:0cm;"&gt;
&lt;li style="margin:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The name of the computer of which the logs have to be backed up. (optional)&lt;/span&gt;&lt;/li&gt;
&lt;li style="margin:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The name of the event lot to back up&lt;/span&gt;&lt;/li&gt;
&lt;li style="margin:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The path of the file to which the event log needs to be saved.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The application opens the event log, and then makes the backup and closes the eventlog. If something goes wrong, the error code and error message are printed to the command line.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;I thought about making the error handing a little more elegant (so that PrintError and CloseEventlog were not used multiple times in the code) but with only 2 function calls, the amount of error handling code would not diminish or be any better.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;I left the PrintError function out of this blog because it doesn&amp;rsquo;t do anything exciting. It retrieves the error code and prints out the corresponding error message.&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="margin:12pt 0cm 3pt;"&gt;&lt;em&gt;&lt;span style="font-size:large;font-family:Arial;"&gt;What you need to know before using this tool&lt;/span&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;I&amp;rsquo;ve been using this tool for a week now, and it is working splendidly, but there are a couple of things that aren&amp;rsquo;t mentioned in the MSDN documentation of the API.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The first is that the supplied path is absolute for the computer of which you are making an even log backup. So if the path is D:\app.evt, it will make the backup to D:\app.evt on the remote computer.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The second thing you need to know is that providing a UNC name for the target file doesn&amp;rsquo;t really improve things all that much. Because what is happening under the hood is that it is not &lt;i style="mso-bidi-font-style:normal;"&gt;you&lt;/i&gt; who is making the backup.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The event log service is in charge of the event log files, and you are asking it to make a backup. And that is where it all goes pear shaped. The event log service runs with &lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;LOCAL_SYSTEM credentials. This means that by default, it has no credentials that are valid on a remote computer. So you cannot make backup files in network locations, because the event log service of the remote computer has no privileges to access the location.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;There are 2 exceptions to this rule. 1) the remote location is on the remote computer itself. 2) the remote computer is a backup domain controller.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;It is a little known fact (I didn&amp;rsquo;t know it either) that LOCAL_SYSTEM on a domain controller is a domain administrative account that can pretty much do anything and everything on any domain computer, including the things that even a domain admin cannot.&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="margin:12pt 0cm 3pt;"&gt;&lt;em&gt;&lt;span style="font-size:large;font-family:Arial;"&gt;Conclusion&lt;/span&gt;&lt;/em&gt;&lt;/h2&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;I needed a convenient tool for making backups of event log files, and now I have one. Both the source and the binary are included as attachments. The source is available under the MIT license, and the exes are available for free to do with them what you want, &lt;span style="text-decoration:underline;"&gt;as long as it is understood that whatever you do with them is your responsibility, not mine&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;The eventtool_clr exe is something I made to create and delete event logs. I don&amp;rsquo;t think I blogged about it yet, but what it does is so simple it&amp;rsquo;s hardly worth mentioning. Have a look at the sources for more info.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;"&gt;&lt;span style="font-family:Times New Roman;"&gt;The binary is for those who just want to use it and don&amp;rsquo;t care. The source is for those who&amp;rsquo;d rather not run an untrusted binary from some guy on the internet on their internal servers &lt;/span&gt;&lt;span style="font-family:Wingdings;mso-ascii-font-family:&amp;#39;Times New Roman&amp;#39;;mso-hansi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;&lt;span style="mso-char-type:symbol;mso-symbol-font-family:Wingdings;"&gt;J&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt; The sources are simple enough to audit and compile.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;On a side note, The API to backup event logs is not exposed on the .NET api for event logs. I don&amp;rsquo;t know exactly why, but I suspect that it is because of the problems I mentioned. The API is confusing enough that it is really not fit for generic use. After all, you can&amp;rsquo;t backup to remote systems, and the path is absolute for the remote computer.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;I also didn&amp;rsquo;t want a .NET program, because for this type of thing, nothing beats the convenience and performance of a compiled binary that needs no runtime DLLs or external frameworks. &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0cm 0cm 12pt;" class="MsoNormal"&gt;&lt;span style="font-size:small;font-family:Times New Roman;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1657238" width="1" height="1"&gt;</description><enclosure url="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.01.65.72.38/EvtLogTools.zip" length="65637" type="application/x-zip-compressed" /><category domain="http://msmvps.com/blogs/vandooren/archive/tags/C_2B002B00_/default.aspx">C++</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Windows+Platform/default.aspx">Windows Platform</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/cplusplus/default.aspx">cplusplus</category></item><item><title>Passed 70-290 today</title><link>http://msmvps.com/blogs/vandooren/archive/2008/11/14/passed-70-290-today.aspx</link><pubDate>Fri, 14 Nov 2008 21:48:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1654166</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1654166</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1654166</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/11/14/passed-70-290-today.aspx#comments</comments><description>&lt;p&gt;I have been silent on my blog for the last couple of weeks. This is because I spent all my time preparing for my first Microsoft exam in a couple of years. But it has been worth it. Today I passed the Microsoft certification exam 70-290: Managing and Maintaining a Windows Server 2003 Environment.&lt;/p&gt;
&lt;p&gt;As I am really a software developer, cunningly disguished as a sysadmin, I doubted I would make it at the first attempt. But I took a lot of time to prepare, and tested all the topics in a test environment.&lt;br /&gt;&lt;br /&gt;Long story short: I aced the exam with a perfect 100% score :)&lt;br /&gt;The lady in the test centre told me that I was only the second to ever ace a Microsoft exam like that in that test centre, and the first outsider. The other guy &lt;br /&gt;worked there as a trainer.&lt;br /&gt;&lt;br /&gt;What makes this particular exam score even sweeter is that&lt;br /&gt;a) I only used the MSPress book (no exam cram crap)&lt;br /&gt;b) I pulverized the record high scores of the guys in the ICT department. :D&lt;br /&gt;&lt;br /&gt;Definitely a nice way to start the weekend.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1654166" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Installing Zune software without internet connection</title><link>http://msmvps.com/blogs/vandooren/archive/2008/10/24/installing-zune-software-without-internet-connection.aspx</link><pubDate>Fri, 24 Oct 2008 05:42:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1651832</guid><dc:creator>vanDooren</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1651832</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1651832</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/10/24/installing-zune-software-without-internet-connection.aspx#comments</comments><description>&lt;p&gt;Last week I bought myself a zune, and since my main computer during the day is my company laptop, I wanted to install it on that one. Unfortunately, going to zune.net didn;t help because the first thing the installer does is to check if Windows Update is enabled. And if it isn&amp;#39;t, it aborts. Of course, if you don;t have an internet connection at all, it aborts as well.&lt;/p&gt;
&lt;p&gt;My laptop is ruled by company policies, and security is not a laughing matter here. Regardless of what my opinions are, I am not going to tamper with that, since that would be very much a &amp;#39;Bad Thing (tm)&amp;#39;.&lt;/p&gt;
&lt;p&gt;After a lof of googling I discovered that a lot of people have this problem, and the folks at Zune.net seem to think that this situation needs no special attention. Luckily I found &lt;a href="http://www.zune-online.com/forum/index.php?topic=1047.msg6830#msg6830" title="http://www.zune-online.com/forum/index.php?topic=1047.msg6830#msg6830"&gt;the solution on a zune forum&lt;/a&gt;. There are lot of alternate approches, but they require some degree of hacking with settings, which I do not want to do.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the &lt;a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=6136349f-2b32-4946-83b5-a09775531ef4&amp;amp;displayLang=en" title="http://www.microsoft.com/downloads/thankyou.aspx?familyId=6136349f-2b32-4946-83b5-a09775531ef4&amp;amp;displayLang=en#"&gt;client package which contains all the files&lt;/a&gt;, and not the setup shim you can find on Zune.net&lt;/li&gt;
&lt;li&gt;Extract the files&lt;/li&gt;
&lt;li&gt;Navigate to the packages folder in x86 folder.&lt;/li&gt;
&lt;li&gt;Install wmfdist11-windowsxp-x86-enu.exe&lt;/li&gt;
&lt;li&gt;Install windowsxp-kb915865-v11-x86-enu.exe&lt;/li&gt;
&lt;li&gt;Install zune-x86.msi&lt;/li&gt;
&lt;li&gt;Restart the computer&lt;/li&gt;
&lt;li&gt;Connect your Zune and wait for the driver isntallation and device detection&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For x64 the setup will be similar, but you won&amp;#39;t need the kb patch. It shouldn&amp;#39;t be too hard to figure out which files to install if you have an x64 system.&lt;/p&gt;
&lt;div&gt;I have to admit I am a bit disappointed by Microsoft and the Zune folks for not explaining this in the FAQ on Zune.net or somewhere else where you can easily find it.&lt;/div&gt;
&lt;div&gt;I am not the only one with a corporate laptop and a zune, and many people seem to have had this problem, judging by the number of hits I got.&lt;/div&gt;
&lt;div&gt;It seems the Zune decision makers want to force people to be online.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1651832" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Zune/default.aspx">Zune</category></item><item><title>Windows Instant On</title><link>http://msmvps.com/blogs/vandooren/archive/2008/10/17/windows-instant-on.aspx</link><pubDate>Fri, 17 Oct 2008 09:54:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1651124</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1651124</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1651124</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/10/17/windows-instant-on.aspx#comments</comments><description>&lt;p&gt;Something I picked up on slashdot today: &lt;a href="http://www.pcpro.co.uk/news/230988/windows-7-to-be-instant-on.html" title="http://www.pcpro.co.uk/news/230988/windows-7-to-be-instant-on.html"&gt;Microsoft is checking if people would want an &amp;#39;instant on&amp;#39; version of Windows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As compelling as it sounds, I don&amp;#39;t think it is that big a deal, and they shouldn&amp;#39;t waste their time with it. These days, evey computer and laptop supports Standby or Hibernation. Between the 2 of those, there is no reason why Microsoft should invent an &amp;#39;Instant On&amp;#39; option that is limited in what you can do, if it is perfectly possible to resume from hibernation or standby in the same amount of time and have a fully functional system at your fingertips.&lt;/p&gt;
&lt;p&gt;But let&amp;#39;s for the moment assume that my computer support neither of those options.&lt;/p&gt;
&lt;p&gt;My home laptop is an old P3 1GHz with 700 MB RAM. It is not part of a domain , and is fully usable 15 - 20 seconds after I touch the power button. Instant enough for me. My workstations are the same, only it takes 20 seconds or something like that for the system to POST. So even the instant on feature would not save me from having to wait.&lt;/p&gt;
&lt;p&gt;Then there are my machines at work. They are part of an enterprise domain. Booting windows takes a relatively short time. It&amp;#39;s only when I log in that the wait begins. The delay before I can actually use my laptop is long enough that I can go to the coffee machine, get hot water and brew my own coffee by manually pouring hot water over a drip filter with hand ground beans. By the time my cup of coffee is full, it &lt;em&gt;can&lt;/em&gt; happen that I can access the start menu, though that is not a given. Usually it takes another 5 - 10 minutes before the system has finished doing whatever it needs to do.&lt;/p&gt;
&lt;p&gt;The reason of course is that -as in a typical enterprise- there are so many group policies which are refreshed. Then there is the virus scanner that is starting its scan, remote management software&amp;nbsp;(sms)&amp;nbsp;that is started, system checks that are performed, services that are started, ...&lt;/p&gt;
&lt;p&gt;So Instant On wouldn&amp;#39;t help me much there, because the amount of stuff that is going on would be the same. Of course they could prevent this prom happening, but I am pretty sure that no domain admin wants to allow a computer on the network if it hasn&amp;#39;t jumped through all the hoops to make sure that it is compliant with all the policies and limitations that are required by the corporate policies.&lt;/p&gt;
&lt;p&gt;It would probably best if they ditch Instant On right now, and start focusing on Windows 7, making it robust and responsive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1651124" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Windows+Platform/default.aspx">Windows Platform</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Installing a service pack: how much space do you need.</title><link>http://msmvps.com/blogs/vandooren/archive/2008/10/07/installing-a-service-pack-how-much-space-do-you-need.aspx</link><pubDate>Tue, 07 Oct 2008 09:57:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1649978</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1649978</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1649978</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/10/07/installing-a-service-pack-how-much-space-do-you-need.aspx#comments</comments><description>&lt;p&gt;Yesterday I had to install VS2008 SP1 on a computer with limited disk space on C:\&lt;/p&gt;
&lt;p&gt;Even though VS2008 itself was installed on D:\ the installer (which is 800MB) still required 3.3 GB of space on C:\&lt;/p&gt;
&lt;p&gt;I molested C: until I had enough space to perform the upgrade, but I felt something was wrong.&amp;nbsp;After some searching it turns out that due to various issues, the rule of thumb for Microsoft issued service packs is that you should have approximately 4 times the size of the service pack itself as free space.&lt;/p&gt;
&lt;p&gt;So for VS2008 SP1 update, you need 4 x 800MB == 3.2GB of free space on C:\&lt;br /&gt;It might be possible to&amp;nbsp;manipulate it a bit by setting %temp% to another drive or so. Whatever.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1649978" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/Windows+Platform/default.aspx">Windows Platform</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Configuring an application through a batch file: what domain am I in?</title><link>http://msmvps.com/blogs/vandooren/archive/2008/09/25/configuring-an-application-through-a-batch-file-what-domain-am-i-in.aspx</link><pubDate>Thu, 25 Sep 2008 06:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1648765</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1648765</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1648765</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/09/25/configuring-an-application-through-a-batch-file-what-domain-am-i-in.aspx#comments</comments><description>&lt;p&gt;I recently had to make an install script for one of my applications which manipulates the Active Directory. The app itself&amp;nbsp;is executed via a scheduled batch file, and it&amp;nbsp;expects the domain name as a command line parameter. I wanted the batch file to figure out on its own what the domain was of the computer on which it is executed. That turned out to be harder than I thought, but in the end I found an elegant, if rather hairy solution.&lt;/p&gt;
&lt;p&gt;FOR /F &amp;quot;tokens=1* delims=REG_SZ&amp;nbsp;&amp;quot; %%A IN (&amp;#39;REG QUERY HKLM\System\CurrentControlSet\Services\Tcpip\Parameters /v Domain&amp;#39;) DO (&lt;br /&gt;SET CURR_DOMAIN=%%B&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;This code snippet will query the registry to get the Domain the computer belongs to. Of course, the REG QUERY command returns not just the name, but a tab separated table with the key name, the key type and the key value. That table is then munged by the &amp;#39;FOR&amp;#39; loop which uses &amp;#39;REG_SZ &amp;#39; (the whitespace is a tab character) as a delimiter. The actual domain name itself is then stored in the variable &amp;#39;CURR_DOMAIN&amp;#39;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s crude, but it works rather well. This trick saves me the necessity of having someone configure this by hand when the application is installed. Apart from the fact that this is error prone, it would make the installation procedure more verbose.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried this on computer that is not part of a domain.&amp;nbsp;&amp;nbsp;Luckily, that is not a situation that will ever occurr on the network that I have to maintain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1648765" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Scheduling tasks via a batch file: where am I?</title><link>http://msmvps.com/blogs/vandooren/archive/2008/06/09/scheduling-tasks-via-a-batch-file-where-am-i.aspx</link><pubDate>Mon, 09 Jun 2008 13:14:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1633268</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1633268</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1633268</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/06/09/scheduling-tasks-via-a-batch-file-where-am-i.aspx#comments</comments><description>&lt;p&gt;One of the things that comes with configuring software for a controlled environment is that every single thing involved has to be documented. Some people fail to realize what this means.&lt;/p&gt;
&lt;p&gt;It means that my installation cannot contain a trivial phrase like &amp;#39;Add xyz.exe to the scheduled tasks, and have it run every night with these credentials&amp;#39;. Instead, I have to write something fit for &amp;#39;Deployment for dummies&amp;#39;, mentioning every single click, selection and user entry.&lt;/p&gt;
&lt;p&gt;This may seem ridiculous, but otoh the purpose of these procedures is that someone without knowledge of this specific deployment can simply follow the procedure, and end up with a system that is identical to the previous / other one. And it also has the advantage that the procedure documents which files / user accounts / other resources are required for the system.&lt;/p&gt;
&lt;p&gt;It also means that it can be a daunting task to create and test app deployment. In my case I often choose to build a script file that is part of an XCOPY deployment, and have the administrator (me) run a script.&lt;/p&gt;
&lt;p&gt;I usually opt for the script, because it is human readable (with a definition of human = administrator) and you can read them later in case you need to check how something was done. And the major advantage of scripting things is that I don&amp;#39;t need human interaction -&amp;gt; I don&amp;#39;t need to write an installation manual that is as verbose and comprehensible as the Silmarillion.&lt;/p&gt;
&lt;p&gt;Anyway...&lt;/p&gt;
&lt;p&gt;One of the issues with scripts is that a script has to know where the other stuff is which it is supposed to install. Sometimes you can get away with assuming it is in the present working directory %CD%, but oftentime you can&amp;#39;t. And hard coding path names is not a safe option.&lt;/p&gt;
&lt;p&gt;It took some googling, but it turns out that the environment variable %~dp0 does what I want (thank you&amp;nbsp;&lt;a class="" href="http://weblogs.asp.net/whaggard/archive/2005/01/28/get-directory-path-of-an-executing-batch-file.aspx"&gt;Wes Haggard&lt;/a&gt;)&amp;nbsp;. It expands to the physical location of the script file that is currently being executed. From that point you only need to know the location of the other files relative to the installation script, and Bjorn Stronginthearm&amp;#39;s your uncle.&lt;/p&gt;
&lt;p&gt;Some of the software I develop runs on systems where it gets scheduled to execute at specific times, and I use schtasks.exe to configure those tasks in my installation script. Interesting tidbit: if you want to use schtasks to schedule a command which contains spaces, you have to enclose the command path inside the /TR argument with &lt;strong&gt;\&amp;quot;&lt;/strong&gt; quotations so that the task scheduler doesn&amp;#39;t get confused. It cannot handle spaces in paths.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1633268" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/General/default.aspx">General</category><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Ntbackup.exe and the task scheduler</title><link>http://msmvps.com/blogs/vandooren/archive/2008/05/13/ntbackup-exe-and-the-task-scheduler.aspx</link><pubDate>Tue, 13 May 2008 07:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1621687</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1621687</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1621687</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/05/13/ntbackup-exe-and-the-task-scheduler.aspx#comments</comments><description>&lt;p&gt;Last week we discovered that our weekly backup had failed. The only clue we had was the return code 0x1f. There were no log files, or messages in any of the event logs.&lt;/p&gt;
&lt;p&gt;It was already the second time this had happened, but the first time the return code was 0.&lt;/p&gt;
&lt;p&gt;After some googling I discovered that the return code can sometimes be 0, even if there was an error. So that might explain why I got that the first time. Then I also discovered that 0x1f seems to be a very generic error.&lt;/p&gt;
&lt;p&gt;I read a lot of articles, but finally found the reason buried deep in this &lt;a class="" href="http://support.microsoft.com/?id=314844"&gt;Microsoft KB article&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you use the &lt;b&gt;/um&lt;/b&gt; option, it is recommended that you not use the &lt;b&gt;/n&lt;/b&gt; option to label the media. Instead, permit Ntbackup to use the default date/time as the label name and description. This eliminates the problem of multiple tapes&amp;#39; having the same label name, which can cause RSM to ask for a manual tape mount and prevent Ntbackup from continuing to completion unattended.&lt;/em&gt; &lt;/p&gt;
&lt;p&gt;The tape names and description were all unique, but the tape label was simlpy &amp;#39;Weekly DCS Backup&amp;#39;.&lt;/p&gt;
&lt;p&gt;The reason we didn&amp;#39;t notice this earlier is that I remove the tapes in time. Only last week I was importing some older tapes to retrieve old data, and the tapes were still in the loader, thus causing a label name conflict.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1621687" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>License server doesn't serve license</title><link>http://msmvps.com/blogs/vandooren/archive/2008/03/19/license-server-doesn-t-serve-license.aspx</link><pubDate>Wed, 19 Mar 2008 11:41:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1547460</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1547460</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1547460</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/03/19/license-server-doesn-t-serve-license.aspx#comments</comments><description>&lt;p&gt;Did you know that a Windows2003 Licensing server does not manage&amp;nbsp;Terminal Server &amp;#39;Per User&amp;#39;&amp;nbsp;CALs?&lt;/p&gt;
&lt;p&gt;It is really stupid, but from a licensing point of view, a terminal server that is configured to use &amp;#39;Per User&amp;#39; licenses only checks if it can find a license server. As soon as it does, the license server does the Jedi mind trick (&lt;em&gt;These are not the licenses you are looking for.&lt;/em&gt;..) and the terminal server becomes a free for all, limited only by the maximum number of connections configured by the administrator.&lt;/p&gt;
&lt;p&gt;At first I thought this could not possibly be true (noone would design anything that stupid, right?) but&amp;nbsp;&lt;a class="" href="http://technet2.microsoft.com/windowsserver/en/library/d49fd61f-ba70-4ed7-a2af-238c30929e851033.mspx?mfr=true"&gt;this&lt;/a&gt; and &lt;a class="" href="http://www.brianmadden.com/content/article/Windows-2003-Terminal-Server-Licensing-Technical-QA-Yields-Surprising-Answers"&gt;this&lt;/a&gt; quickly convinced me otherwise.&lt;br /&gt;What makes it double stupid is that the license server allows me to add &amp;#39;per user&amp;#39; licenses, and then forces me to go through the whole activation obstacle course, only to ignore whatever licenses were added.&lt;/p&gt;
&lt;p&gt;The only way to make sure that our licensing is in order, is to run a nightly script to determine how many&amp;nbsp;TS users we have, and then check if we have enough licenses.&lt;br /&gt;This also means that no matter how many per user licenses you install, they will always show &amp;#39;N licenses installed, N available, 0 used&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1547460" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Getting rid of the duplicate SPN in Active Directory</title><link>http://msmvps.com/blogs/vandooren/archive/2008/03/11/getting-rid-of-the-duplicate-spn-in-active-directory.aspx</link><pubDate>Tue, 11 Mar 2008 10:04:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1539874</guid><dc:creator>vanDooren</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1539874</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1539874</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/03/11/getting-rid-of-the-duplicate-spn-in-active-directory.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Last week I noticed an error in the domain controller event log with Event ID 11:&lt;/font&gt;&lt;/p&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;font size="3"&gt;Event Type:&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Error&lt;br /&gt;Event Source:&lt;span style="mso-tab-count:1;"&gt; &lt;/span&gt;KDC&lt;br /&gt;Event Category:&lt;span style="mso-tab-count:1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;None&lt;br /&gt;Event ID:&lt;span style="mso-tab-count:1;"&gt; &lt;/span&gt;11&lt;br /&gt;Date:&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2/29/2008&lt;br /&gt;Time:&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1:43:18 PM&lt;br /&gt;User:&lt;span style="mso-tab-count:2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;N/A&lt;br /&gt;Computer:&lt;span style="mso-tab-count:1;"&gt; &lt;/span&gt;SE-DOMAINCONTROLLER01&lt;br /&gt;Description:&lt;br /&gt;There are multiple accounts with name MSSQLSvc/ComputerName.DomainName.SysName.Company.Local:1433 of type DS_SERVICE_PRINCIPAL_NAME.&lt;br /&gt;For more information, see Help and Support Center at &lt;/font&gt;&lt;a href="http://go.microsoft.com/fwlink/events.asp"&gt;&lt;font size="3"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;The name of the computer in the SPN&amp;nbsp;was one of the process control databases I had replaced earlier. Our process control servers each have a specific role, and their computer names are tied to that role. This is a side effect from the process control system software that we use, and I cannot change this.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;This means that the old server and the new server will have the same name.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;The process software also doesn’t allow me to change domain membership while the software is installed, and if anything goes wrong with installing and configuring the new server, I should be able to bring the old system back online as soon as possible.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;So I simply disconnected it, made the new server with the same name a domain member, installed the application, synchronized everything and the system worked fine. I checked the event log of the new server, but couldn’t see anything suspect. However, looking back through the DC system log, I discovered that the problem started at that exact time.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I did a little bit of research, and I found out that the servicePrincipalName attribute basically tells anyone who wants to know that a service with a certain principal name (duh) is running with the credentials of the Active Directory account with which it is registered.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Since a service with a specific ID can only run with 1 account, having duplicates on the network is bad.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;Using ldifde, I found out that the service principal name &lt;/font&gt;&lt;span style="FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;MSSQLSvc/ComputerName.DomainName.SysName.Company.Local:1433 &lt;/span&gt;&lt;font face="Times New Roman"&gt;was linked to the user account ‘XyzAdmin’ and the computer account ‘SE-XYZ01’&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Using adsiedit.msc, I had to delete one of the SPNs from its containing account. I checked the service on the SE-XYZ01 server, and the SQL server was configured to run as local service. This means that the correct SPN link is to the server account, and not the XyzAdmin account.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Unfortunately I couldn’t check anymore because the old server was already ‘recycled’ but I seemed to remember that the SQL service was configured to run with the XyzAdmin account instead. When I deleted the link, I wrote an entry in the server logbook, writing down exactly what I removed where, and I also saved the deleted info in a text file ‘just in case’.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;From the moment I did this the error did not occur anymore, so I deleted the right SPN. Even if it would have been the wrong one, I could have put it back easily with either setspn, or adsiedit.msc.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I think I will make it part of the server replacement procedure to make an ldifde dump before and after, so that I can more easily diagnose possible problems. I also added a line in my daily backup scripts to make a backup of this dump every night for solving problems like this.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Another thing I thought of later was to make a disk image of the old server that needs to be replaced. That way I can uninstall the application, take the computer out of the domain correctly, and install the new server and still know for certain that if anything goes wrong, I can restore the old system to the exact same state from which I started without having to waste any time with the backup and recovery procedures, which can take a long time for certain servers.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;As an afterthought I asked my fellow MVPs what the point was of having SPNs in AD in the first place. After all, if a service runs with certain credentials, it will be authenticated when it starts, so what is the added value of registering that information persistent in AD?&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;This is what MVP Joe Kaplan had to say:&lt;/font&gt;&lt;/p&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;Kerberos uses SPNs extensively.&lt;br /&gt;&lt;br /&gt;When a Kerberos client uses its TGT to request a service ticket for a specific &lt;br /&gt;service, the service is actually identified by its SPN.&amp;nbsp; The KDC will grant &lt;br /&gt;the client a service ticket that is encrypted in part with a shared secret &lt;br /&gt;that the service account as identified by the AD account that matches the &lt;br /&gt;SPN has (basically the account password).&lt;br /&gt;&lt;br /&gt;In the case of a duplicate SPN, what can happen is that the KDC will &lt;br /&gt;generate a service ticket that may be created based on the shared secret of &lt;br /&gt;the wrong account.&amp;nbsp; Then, when the client provides that ticket to the service &lt;br /&gt;during authentication, the service itself cannot decrypt it and the auth &lt;br /&gt;fails.&amp;nbsp; The server will typically log an &amp;quot;AP Modified&amp;quot; error and the client &lt;br /&gt;will see a &amp;quot;wrong principal&amp;quot; error code.&amp;nbsp; I forget the exact error code and &lt;br /&gt;description, but hopefully that&amp;#39;s close enough.&amp;nbsp; :)&lt;br /&gt;&lt;br /&gt;So, duplicate SPNs are very bad, much in the same way that duplicate UPNs &lt;br /&gt;are bad.&amp;nbsp; Both can cause Kerb auth to break and Windows uses Kerb for auth &lt;br /&gt;everywhere it can.&lt;sub&gt;&lt;/sub&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1539874" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>gpupdate and psexec, and a moment of D'oh </title><link>http://msmvps.com/blogs/vandooren/archive/2008/02/23/gpupdate-and-psexec-and-a-moment-of-d-oh.aspx</link><pubDate>Sat, 23 Feb 2008 13:46:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1522547</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1522547</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1522547</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/02/23/gpupdate-and-psexec-and-a-moment-of-d-oh.aspx#comments</comments><description>&lt;p&gt;I had to do a security change today which required each XP machine to first update its policies, and then reboot to make sure that the required changes went into effect immediately.&lt;/p&gt;
&lt;p&gt;To do the update I used &lt;a class="" href="http://www.microsoft.com/technet/sysinternals/utilities/sysinternalssuite.mspx" target="_blank"&gt;psexec&lt;/a&gt;&amp;nbsp;in conjunction with gpupdate /force to tell each machine to update its policies remotely, and I discovered something funny: if no user is logged on to the remote machine, you&amp;#39;ll get an error that the user settings could not be updated. Which is fair enough I suppose, except that it took me&amp;nbsp;a while to figure out.&lt;/p&gt;
&lt;p&gt;To do the reboot I used &lt;a class="" href="http://www.microsoft.com/technet/sysinternals/utilities/sysinternalssuite.mspx" target="_blank"&gt;psshutdown&lt;/a&gt;. Mental note to self: &amp;#39;If I want to use psshutdown again to reboot all client machines on the network, I should not forget to specify -r&amp;#39; The maintenance people entered the server room just as I thought &amp;#39;Hm, why is it taking so long for the computers to come back online...?&amp;#39; &lt;img src="http://msmvps.com/emoticons/emotion-40.gif" alt="Hmm" /&gt;&lt;/p&gt;
&lt;p&gt;Of course when manufacturing noticed that they went down and didn&amp;#39;t come back up, they were &amp;#39;worried&amp;#39;. Luckily all our client machines&amp;nbsp;are located in the server room, with kvm cables running through the plant so booting all of them&amp;nbsp;back on was done in a minute.&lt;/p&gt;
&lt;p&gt;It was really cool to have the diagnostics window open and then &amp;#39;BAM&amp;#39; drop every client node from the network at the same time.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1522547" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Active Directory disjointed namespace problems</title><link>http://msmvps.com/blogs/vandooren/archive/2008/01/22/active-directory-disjointed-namespace-problems.aspx</link><pubDate>Tue, 22 Jan 2008 07:17:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1474677</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1474677</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1474677</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2008/01/22/active-directory-disjointed-namespace-problems.aspx#comments</comments><description>&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Last week I was redlining SOPs (Standard Operating Procedures) on a test network for some of the Windows Domain specific situations we sometimes encounter on our process control network.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;This specific SOP handled Domain Controller promotion and demotion for our process network. It should be noted that in our process control network, Domain Controllers are&amp;nbsp;also DNS servers.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I made a mistake and completely screwed up the Active Directory. Instead of reloading the network, I decided to figure out what was wrong and solve it properly, since there was no rush.&lt;/font&gt;&lt;/p&gt;
&lt;h2 style="MARGIN:12pt 0cm 3pt;"&gt;&lt;em&gt;How I screwed up the domain controllers&lt;/em&gt;&lt;/h2&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Just before I promoted the 2&lt;sup&gt;nd&lt;/sup&gt; DC, I went to the system properties tab, where I made a crucial mistake. My procedure said to clear the DNS suffix, and I cleared the checkbox that said ‘change DNS suffix when domain membership changes’ instead.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;With 20/20 hindsight this was a pretty stupid thing to do. What this does is it prevents the new DC from getting the name ‘DC2.networkname.companyname.local’ and instead let it keep its old name ‘DC2’&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;This problem is known as a disjointed namespace, where the FQDN of a server does not match the domain of which it is a member. Active Directory looks for FQDNs when it needs to replicate or do other things, so without a FQDN you get all sorts of helpful errors like ‘&lt;i style="mso-bidi-font-style:normal;"&gt;The RPC server is unavailable, this might be a DNS problem&lt;/i&gt;’&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Again looking with hindsight, the error details and the requested names should have made it obvious that DNS was working just fine, but that the specified name was indeed not available in DNS.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I tried various things to solve this problem, but the most stupid one was probably renaming DC2. I still don’t know why I thought this was a good idea. Perhaps to force a new name registration in AD?&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Of course this failed because Active Directory didn’t replicate, so the name change never propagated either. I had only made the problem worse. DC1 still thought that DC2 had its original name, and it wouldn’t even try to find DC2 at its new name.&lt;/font&gt;&lt;/p&gt;
&lt;h2 style="MARGIN:12pt 0cm 3pt;"&gt;&lt;em&gt;What I did to make it right again&lt;/em&gt;&lt;/h2&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Making things right when you hose Active Directory is not easy (or sometimes downright impossible perhaps) but there is a way out of the aforementioned mess.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Google turned up&amp;nbsp;&lt;a class="" title="http://www.windowsitpro.com/Windows/Article/ArticleID/39696/39696.html" href="http://www.windowsitpro.com/Windows/Article/ArticleID/39696/39696.html"&gt;this page&lt;/a&gt;&amp;nbsp;which explains what a disjointed namespace is, and it links to a &lt;a class="" title="http://support.microsoft.com/?kbid=257623" href="http://support.microsoft.com/?kbid=257623"&gt;Microsoft KB&lt;/a&gt; that has a script for making the DNS suffix of a server equal to the domain name.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;When that was done, I renamed the DC2 computer object on DC1 (which still had its old name) to the new name of DC2. I changed the TCPIP settings of both DCs so that DC1 became the preferred DNS server for DC2, and vice versa. This was to insure that they could resolve each other.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I fixed the records in the DNS so that DC2s original name was not mentioned anymore, and I verified that the GUID associated with the DC2 alias record was indeed correct.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;At this point I could already synchronize from DC1 to DC2, but not the other way around. Running netdiag on DC1 I was informed that LDAP still had a reference to the original name of DC2, and that some DNS records of this DC were not registered correctly on the DNS running on DC2. It told me to wait 30 minutes in order for DNS server replication to succeed.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;I used adsiedit.msc on DC1 to throw away a couple of references in AD to the original name of DC2, as well as the FRS settings for DC1 and DC2. There wasn;t much more to do, so I decided to wait for the DNS replication.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;One cup of coffee later netdiag gave no errors anymore, and I could successfully replicate between all Domain Controllers.&lt;/font&gt;&lt;/p&gt;
&lt;h2 style="MARGIN:12pt 0cm 3pt;"&gt;&lt;em&gt;Moral of the story&lt;/em&gt;&lt;/h2&gt;
&lt;p class="MsoNormal" style="MARGIN:0cm 0cm 12pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;There are several conclusions I could make now:&lt;/font&gt;&lt;/p&gt;
&lt;ul style="MARGIN-TOP:0cm;"&gt;
&lt;li class="MsoNormal" style="MARGIN:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;DNS and Active Directory are complex things, and I don’t know enough about them yet. As long as everything keeps working, it is easy enough to administer a Windows Domain, but as soon as there is a serious problem, the administrative wheat is separated from the chaff, so to speak.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;If you are running an important network, you have to have SOPs for all the things you do on the network, no matter how simple, and you have to follow them. And as important: test them so that you know they will work.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Have a test environment where you can horse around and experiment to your heart’s content. Knowing what could go wrong if you make mistakes, and knowing how to solve the mess can be invaluable. If you don’t have lots of hardware lying around to simulate your environment, try to run a virtual network using vmware and an old server. I use a DELL 2900 with $g RAM, 4 cores and a RAID5 configuration of 15 KRpm SAS drives which we have on standby as a spare.&lt;/font&gt;&lt;/li&gt;
&lt;li class="MsoNormal" style="MARGIN:0cm 0cm 12pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;But the most important conclusion: in this business you are never done learning. It will take a lot of effort to bring my understanding of Active Directory and DNS to the same level as my understanding of C++ and software development. Lucky for me that I like the world of Systems Engineering.&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1474677" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Terminal Server licensing pitfall</title><link>http://msmvps.com/blogs/vandooren/archive/2007/12/17/terminal-server-licensing-pitfall.aspx</link><pubDate>Mon, 17 Dec 2007 12:16:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1401667</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1401667</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1401667</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2007/12/17/terminal-server-licensing-pitfall.aspx#comments</comments><description>&lt;p&gt;Today I got a phone call from one of the automation engineers, who told me that he couldn&amp;#39;t connect to one of the terminal servers anymore.&lt;/p&gt;
&lt;p&gt;I set out to investigate, and while verything seemed to be in order, the server management page indicated that the terminal services were not licensed for the offending server. It also said that the evaluation period would end after 120 days, after which it would stop working.&lt;/p&gt;
&lt;p&gt;This was odd, because I remember installing the CALs... about 4 months ago when we had to rebuild the network... which is about 120 days approximately. Too much of a coincidence, so I checked the system event log and sure enough there was a message that the grace period had expired. This also told me that the same thing was about to happen for our other terminal servers.&lt;/p&gt;
&lt;p&gt;On each of the terminal servers I could open the licensing configuration, and get the error message that no licensing servers were found. I could then manually specify a server name and it would find all licenses, but if I closed it and then opened it again I got the same error. I even got this error on the terminal server that was also acting as a license server, which was ultimate stupidity imo.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I consulted the Windows 2003 Admin companion, which turned up nothing, and the Windows 2003 help files were equally useless.&lt;/p&gt;
&lt;p&gt;Then I found this page:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/technet/community/en-us/terminal/terminal_faq.mspx"&gt;http://www.microsoft.com/technet/community/en-us/terminal/terminal_faq.mspx&lt;/a&gt;&lt;br /&gt;and this one:&lt;br /&gt;&lt;a href="http://www.msterminalservices.org/articles/Terminal-Server-License-Service-Discovery-Part1.html"&gt;http://www.msterminalservices.org/articles/Terminal-Server-License-Service-Discovery-Part1.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Especially the last one is very useful because it has flowcharts detailing how server discovery works for terminal servers. As it turns out, there are quite a few stupid design decisions in there.&lt;/p&gt;
&lt;p&gt;First of all, there is no easy way to manually specify licensing servers. Even the licensing configuration snap in doesn&amp;#39;t allow this.&amp;nbsp;You have to configure this in the registry of each individual server.&lt;/p&gt;
&lt;p&gt;Secondly, terminal servers don&amp;#39;t check if they have a license server running locally. Especially in small networks this will be the case. It would be trivial to implement, and makes life easier for end users.&lt;/p&gt;
&lt;p&gt;But thirdly and most importantly, the license server setup itself is braindead. You have the option to choose between enterprise mode and domain or workgroup mode. The former should be for large multidomain enterprises, and the latter for small single domains. When the license server was installed, we chose the latter because we are only running a single domain forest.&lt;/p&gt;
&lt;p&gt;Unfortunately, in domain mode, the license server record is only broadcast via active directory if the license server itself is a domain controller. If that&amp;#39;s not the case, the license server will just sit there without anyone knowing it&amp;#39;s there. Even the local terminal service won&amp;#39;t know. With the entrprise license server option this is not an issue, because it will always be discovered, even if it is not running on&amp;nbsp;a domain controller.&lt;/p&gt;
&lt;p&gt;So once I figured all this out, it took only 5 minutes to manually configure the extra registry keeps to force the terminal service to look at our licensing server. We still get discovery errors in the event log because the discovery process still runs, and still can&amp;#39;t find any license servers despite the fact that it uses that server. The &amp;#39;manage your server&amp;#39; screen also thinks that we are still running without a license.&lt;/p&gt;
&lt;p&gt;For this last thing there is a hotfix, but since that is not approved by the software vendor of our process control software, I decided to ignore these messages and simply put an entry in the logbook to explain what happens.&lt;/p&gt;
&lt;p&gt;Another day, another example of the lack of usefulnes of the windows&amp;nbsp;documentation. I think it would have been a good idea to document things like discovery process / configuration implications etc in the documentation, but that&amp;#39;s just me of course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1401667" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Group Policy gotchas</title><link>http://msmvps.com/blogs/vandooren/archive/2007/12/04/group-policy-gotchas.aspx</link><pubDate>Tue, 04 Dec 2007 11:20:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1377858</guid><dc:creator>vanDooren</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1377858</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1377858</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2007/12/04/group-policy-gotchas.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yesterday I discovered 2 Group Policy gotchas the hard way.Since these things are not written down anywhere, I figured I&amp;#39;d post them on my blog.Note that I am not an enterprise level systems administrator. I am a systems administrator for a single forest single trees single domain network. As such, whatever is a good solution for me might possible not be a good solution at the enterprise level. &lt;/p&gt;
&lt;h2&gt;&lt;em&gt;Default ‘apply&amp;#39; permission for authenticated users&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Whenever you create a new policy object, it&amp;#39;s ACL will have the ‘Apply&amp;#39; permission set for all authenticated users.This seems innocuous enough, since you change it anyway when you configure the policy permissions as required. Except that this has a side effect.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Suppose you create a new policy object, configure it (which might take time) and then only change the permissions afterwards. What happens? If someone refreshes its policy settings or applies them before you had the chance to change the security, the policy gets applied without regard for which targets it was really meant.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is especially insidious in this scenario is that a Domain Controller refreshes its policies every 5 minutes. If the policy contains only user settings this might not be a problem, but in my case the policy contained settings to disable all external mass storage...Goodbye USB, goodbye CDRom...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What&amp;#39;s even nastier is that afterwards there is no visible trace that this has happened. The Resultant Set of Policy clearly shows (afterwards) that the policy is not in effect on the DC, so why-oh-why doesn&amp;#39;t it see its external mass storage anymore...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The moral of the story: whenever you create a new policy object, either make sure that it is not applied to anyone before you configure the policy settings. Or configure the security settings first so that it only gets applied to the correct targets&lt;/b&gt;. &lt;/p&gt;
&lt;h2&gt;&lt;em&gt;Persistent results of previous policies&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Another beginner mistake is failing to realize that sometimes the results of a policy application are permanent.For example, if you create a policy to force some values for certain registry keys, those keys will keep their value even if the policy is removed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This will leave computers in a state that is not logically consistent with their Resultant Set of Policy, because 2 computers with the same set of applicable policies could end up with different configurations.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One way to achieve this is to have 2 policies: One policy to enable a configuration change, and another to reverse or disable the change when it is not needed anymore. In the group policy list, you can then apply the ‘undo&amp;#39; policy first to all computers, and then apply the ‘do&amp;#39; policy afterwards to the required computers.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another way would be to have 2 security groups so that all computers or users are members of just one of them. Apply the ‘do&amp;#39; policy to the first group and the ‘undo&amp;#39; policy to the second group. By moving computers from group to group you can then either apply or negate the policies. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The moral of the story: In order to ensure consistency and to make your life easier, you should have some mechanism to revert the results of a policy with persistent results.&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1377858" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item><item><title>Disabling mass storage in a Windows network environment</title><link>http://msmvps.com/blogs/vandooren/archive/2007/12/04/disabling-mass-storage-in-a-windows-network-environment.aspx</link><pubDate>Tue, 04 Dec 2007 10:58:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1377879</guid><dc:creator>vanDooren</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/rsscomments.aspx?PostID=1377879</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/vandooren/commentapi.aspx?PostID=1377879</wfw:comment><comments>http://msmvps.com/blogs/vandooren/archive/2007/12/04/disabling-mass-storage-in-a-windows-network-environment.aspx#comments</comments><description>&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;One of the issues involved in running a pharmaceutical process network is that QA has to give its blessing to the network&amp;nbsp;to allow your company to produce meds. For example, QA has to be convinced that all actions are auditable, that people don&amp;#39;t have more rights than they should...&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;One of the other things is that it should not be possible for users to copy data from the network, or put data on local computers. To achieve this, I needed to disable mass storage (floppy, CD, USB) on all computers that aer accessible by non-administrators. Lucky for me, there are only a handful of computers that are outside of a security controlled environment.&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;I wanted to solve this with Group Policy to make it easy to modify&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;I also found &lt;/font&gt;&lt;a href="http://msmvps.com/blogs/vandooren/archive/2007/12/04/group-policy-gotchas.aspx"&gt;&lt;span style="mso-bidi-font-size:10.0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;2 gotchas&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;font face="Times New Roman" size="3"&gt; that you might want to avoid.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;The first thing you need to do is to create a new policy using the administrative template described in this &lt;/font&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;555324"&gt;&lt;font face="Times New Roman" size="3"&gt;KB article&lt;/font&gt;&lt;/a&gt;&lt;font face="Times New Roman" size="3"&gt;, and then configure the correct settings to disable specific mass storage devices.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;This alone is not enough, since it only works for devices that were already on the system when the policy was applied. If a user plugs in a new USB disk, the policy will be overridden and overwritten by the system.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;To prevent that, you have to add a registry key to the registry security settings, and then set the permission for ‘SYSTEM’ and ‘domain\users’ to ‘Deny full control’&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;This will prevent the system and the user from accessing the USB mass storage driver when a new device is plugged in.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;And because these changes persist even if the Group Policy is lifted, you need to make a second policy to undo these changes. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1377879" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/vandooren/archive/tags/SysAdmin/default.aspx">SysAdmin</category></item></channel></rss>