<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>faq-o-matic.net &#187; Nils Kaczenski</title>
	<atom:link href="http://www.faq-o-matic.net/author/nils-kaczenski/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.faq-o-matic.net</link>
	<description>Die technische Online-Community</description>
	<lastBuildDate>Fri, 19 Mar 2010 07:26:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>heise-Security-Tour: Wir sind dabei!</title>
		<link>http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/</link>
		<comments>http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 07:00:00 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Virtualisierung]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/</guid>
		<description><![CDATA[ Im April und Mai 2010 veranstaltet das Fachportal “heise Security” eine Security-Tour mit dem Schwerpunkt Virtualisierung und verteilten Systemen. faq-o-matic.net ist live dabei: Nils Kaczenski beleuchtet Sicherheitsfragen in der Servervirtualisierung. Ein Thema, das oft vernachl&#228;ssigt wird, wie auch eine aktuelle Gartner-Studie belegt.
Kurzentschlossenen Lesern k&#246;nnen wir ein besonderes Bonbon bieten: Wer sich &#252;ber uns anmeldet, [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/08/30/heise-konferenz-virtualisierung/' rel='bookmark' title='Permanent Link: heise-Konferenz: Virtualisierung'>heise-Konferenz: Virtualisierung</a> <small> Im November 2009 veranstaltet heise Netze eine Konferenz-Reihe zur...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/' rel='bookmark' title='Permanent Link: Vortr&auml;ge auf der CeBIT'>Vortr&auml;ge auf der CeBIT</a> <small>Auf der diesj&auml;hrigen CeBIT, die schon in der n&auml;chsten Woche...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/09/08/technet-auf-tour-mit-neuem-format/' rel='bookmark' title='Permanent Link: TechNet auf Tour mit neuem Format'>TechNet auf Tour mit neuem Format</a> <small> Ein interessantes neues Veranstaltungsformat bietet Microsofts Technik-Communiy TechNet in...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image3.png"><img style="margin: 0px 10px 10px 0px; display: inline; border-width: 0px;" title="image" src="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image_thumb3.png" border="0" alt="image" width="244" height="70" align="left" /></a> Im April und Mai 2010 veranstaltet das Fachportal “heise Security” eine Security-Tour mit dem Schwerpunkt Virtualisierung und verteilten Systemen. faq-o-matic.net ist live dabei: Nils Kaczenski beleuchtet Sicherheitsfragen in der Servervirtualisierung. Ein Thema, das oft vernachl&auml;ssigt wird, wie auch <a href="http://www.heise.de/security/meldung/Studie-Server-Virtualisierung-fuehrt-zu-weniger-Sicherheit-956637.html" target="_blank">eine aktuelle Gartner-Studie</a> belegt.</p>
<p>Kurzentschlossenen Lesern k&ouml;nnen wir ein besonderes Bonbon bieten: <strong>Wer sich &uuml;ber uns anmeldet, kann 100 Euro sparen!</strong> N&auml;heres siehe unten.</p>
<p><span id="more-2188"></span></p>
<p>Die Tour hat folgende Stationen:</p>
<ul>
<li>22. April: Stuttgart</li>
<li>27. April: Hamburg</li>
<li>6. Mai: D&uuml;sseldorf</li>
<li>11. Mai: M&uuml;nchen</li>
</ul>
<p>Die Termine sind als jeweils ganzt&auml;gige Konferenz organisiert, Verpflegung und Unterlagen sind im Preis inbegriffen. Die Referenten sind namhafte Spezialisten der deutschen IT-Szene. Anders als bei vielen anderen Veranstaltungen dieser Art handelt es sich nicht um Werbung oder Firmen-Marketing: Im Vordergrund stehen Know-how, Praxiserfahrung und Diskussion. Auf der B&uuml;hne stehen:</p>
<ul>
<li>J&uuml;rgen Schmidt</li>
<li>Joerg Heidrich</li>
<li>Nils Kaczenski</li>
<li>Volker Weber</li>
<li>Christoph Wegener</li>
<li>Dominick Baier</li>
<li>Lutz Donnerhacke</li>
</ul>
<p>N&auml;here Informationen und das ausf&uuml;hrliche Programm gibt es hier:</p>
<p>[Heise Events | 2010 | heise Security Konferenz]<br />
<a href="http://www.heise.de/events/2010/heisec_konferenz/">http://www.heise.de/events/2010/heisec_konferenz/</a></p>
<h4>100 Euro sparen</h4>
<p>Und hier ist das Bonbon f&uuml;r die Leser von faq-o-matic.net: Wer sich <strong>bis zum 6. April 2010, 15:00 Uhr</strong>, &uuml;ber unser <a href="http://www.faq-o-matic.net/impressum/" target="_blank">Kontaktformular</a> bei uns meldet und als Teilnehmer zur Tour m&ouml;chte, <strong>spart 100 Euro</strong> vom Teilnehmerpreis (395 Euro statt 495 Euro, jeweils inkl. MWSt.)! Der Rechtsweg ist nat&uuml;rlich ausgeschlossen. Bitte vergesst nicht, euren realen Namen und eure g&uuml;ltige Mailadresse anzugeben.</p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/08/30/heise-konferenz-virtualisierung/' rel='bookmark' title='Permanent Link: heise-Konferenz: Virtualisierung'>heise-Konferenz: Virtualisierung</a> <br /><small> Im November 2009 veranstaltet heise Netze eine Konferenz-Reihe zur...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/' rel='bookmark' title='Permanent Link: Vortr&auml;ge auf der CeBIT'>Vortr&auml;ge auf der CeBIT</a> <br /><small>Auf der diesj&auml;hrigen CeBIT, die schon in der n&auml;chsten Woche...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/09/08/technet-auf-tour-mit-neuem-format/' rel='bookmark' title='Permanent Link: TechNet auf Tour mit neuem Format'>TechNet auf Tour mit neuem Format</a> <br /><small> Ein interessantes neues Veranstaltungsformat bietet Microsofts Technik-Communiy TechNet in...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dsmove und sein best&#228;ndiger Fehler</title>
		<link>http://www.faq-o-matic.net/2010/03/18/dsmove-und-sein-bestndiger-fehler/</link>
		<comments>http://www.faq-o-matic.net/2010/03/18/dsmove-und-sein-bestndiger-fehler/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 09:29:51 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[AD: Daten bearbeiten]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Batch]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/18/dsmove-und-sein-bestndiger-fehler/</guid>
		<description><![CDATA[Mit dem Kommando “dsmove” kann man seit Windows Server 2003 AD-Objekte per Kommandozeile verschieben. Anders als die anderen ds*-Tools kommt dsmove leider nicht mit dem Piping klar: Zwar kann man etwa die Ausgabe eines “dsquery”-Befehls per Pipe an dsmove weiterleiten und so nacheinander mehrere Objekte an den Befehl verf&#252;ttern – doch dsmove wird nur das [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2006/11/29/active-directory-massenoperationen-mit-admod-und-adfind/' rel='bookmark' title='Permanent Link: Active-Directory-Massenoperationen mit AdMod und AdFind'>Active-Directory-Massenoperationen mit AdMod und AdFind</a> <small>Windows Server 2003 enth&auml;lt die so genannten &quot;ds*-Tools&quot;: Eine Sammlung...</small></li>
<li><a href='http://www.faq-o-matic.net/2004/10/22/wo-erhalte-ich-informationen-zu-einem-stop-fehler-bluescreen/' rel='bookmark' title='Permanent Link: Wo erhalte ich Informationen zu einem Stop-Fehler (Bluescreen)?'>Wo erhalte ich Informationen zu einem Stop-Fehler (Bluescreen)?</a> <small>Ein &quot;Blue Screen of Death&quot; (BSOD oder schlicht Bluescreen) zeigt...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/03/29/wie-finde-ich-inaktive-computerkonten/' rel='bookmark' title='Permanent Link: Wie finde ich inaktive Computerkonten?'>Wie finde ich inaktive Computerkonten?</a> <small>Im Laufe der Zeit sammeln sich leider durch Rechnertausch, Defekte...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Mit dem Kommando “dsmove” kann man seit Windows Server 2003 AD-Objekte per Kommandozeile verschieben. Anders als die anderen ds*-Tools kommt dsmove leider nicht mit dem Piping klar: Zwar kann man etwa die Ausgabe eines “dsquery”-Befehls per Pipe an dsmove weiterleiten und so nacheinander mehrere Objekte an den Befehl verf&uuml;ttern – doch dsmove wird nur das erste &uuml;bergebene Objekt verschieben und danach einen Fehler ausgeben. Leider gilt das auch noch in Windows Server 2008 R2.</p>
<p> <span id="more-2185"></span>
<p>M&ouml;chte man eine Massenverschiebung ausf&uuml;hren, so muss man sich mit folgendem Trick behelfen. Das Kommando verschiebt alle Objekte, deren Anmeldename mit “A” beginnt, in eine andere OU. Achtung, die “for”-Zeile bis zur zweiten &ouml;ffnenden Klammer ist eine einzige Zeile.</p>
<ol>
<li><font face="Courier New">for /f &quot;delims=&quot; %%a in (&#039;dsquery user &quot;OU=AlteOU,DC=dom,DC=faq-o-matic,DC=net&quot; -samid a* -limit 0&#039;) do ( </font></li>
<li><font face="Courier New">&#160; dsmove %%a -newparent &quot;OU=NeueOU,OU=DC=dom,DC=faq-o-matic,DC=net&quot; </font></li>
<li><font face="Courier New">)</font> </li>
</ol>
<p>Diese Syntax gilt bei Ausf&uuml;hrung per Batch – direkt auf der Kommandozeile muss man “%%a” in “%a” &auml;ndern. M&ouml;chte man das zun&auml;chst gefahrlos testen, so f&uuml;gt man vor dem “dsmove” noch das Kommando “ECHO” ein und leitet die Ausgabe in eine Datei um. Dann wird dsmove nicht aktiv, sondern das Kommando erzeugt nur die Kommandos.</p>
<p>Achtung: Auch mit Umlauten kommt diese Technik nur unter bestimmten Umst&auml;nden klar, n&auml;mlich dann, wenn die Codepage des CMD-Fensters auf 850 steht. Das ist zwar normalerweise der Fall, aber um sicherzugehen, sollte man in einem Batch zu Beginn das Kommando “chcp 850” einf&uuml;gen. Die Schalter “uc/uci/uco” der ds*-Tools helfen nicht, weil sie keine g&uuml;ltigen Daten weitergeben.</p>
<p>(Hier noch der Verweis auf meine Fundstelle – wie immer bei ExpertsExchange ganz nach unten scrollen:   <br /><a title="http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_22997808.html" href="http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_22997808.html">http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_22997808.html</a>)</p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2006/11/29/active-directory-massenoperationen-mit-admod-und-adfind/' rel='bookmark' title='Permanent Link: Active-Directory-Massenoperationen mit AdMod und AdFind'>Active-Directory-Massenoperationen mit AdMod und AdFind</a> <br /><small>Windows Server 2003 enth&auml;lt die so genannten &quot;ds*-Tools&quot;: Eine Sammlung...</small></li>
<li><a href='http://www.faq-o-matic.net/2004/10/22/wo-erhalte-ich-informationen-zu-einem-stop-fehler-bluescreen/' rel='bookmark' title='Permanent Link: Wo erhalte ich Informationen zu einem Stop-Fehler (Bluescreen)?'>Wo erhalte ich Informationen zu einem Stop-Fehler (Bluescreen)?</a> <br /><small>Ein &quot;Blue Screen of Death&quot; (BSOD oder schlicht Bluescreen) zeigt...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/03/29/wie-finde-ich-inaktive-computerkonten/' rel='bookmark' title='Permanent Link: Wie finde ich inaktive Computerkonten?'>Wie finde ich inaktive Computerkonten?</a> <br /><small>Im Laufe der Zeit sammeln sich leider durch Rechnertausch, Defekte...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/18/dsmove-und-sein-bestndiger-fehler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anmeldezeiten f&#252;r AD-Benutzer per Skript ausgeben</title>
		<link>http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/</link>
		<comments>http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 21:15:25 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[AD: Erweiterte Abfragen]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/</guid>
		<description><![CDATA[ Seit jeher l&#228;sst Windows zu, f&#252;r einen Benutzer Anmeldezeiten zu definieren – seit Windows NT und auch jetzt in Active Directory. Dar&#252;ber l&#228;sst sich festlegen, an welchen Wochentagen und zu welchen Uhrzeiten dem Benutzer die Anmeldung mit dem jeweiligen Konto gestattet ist. Nicht ganz einfach ist es allerdings, diese Zeiten auszulesen. Zwar gibt es [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2005/03/17/ad-informationen-schnell-auslesen/' rel='bookmark' title='Permanent Link: AD-Informationen schnell auslesen'>AD-Informationen schnell auslesen</a> <small>Neben eineAm klassischen ADSI-Skript gibt es eine relativ einfache M&ouml;glichkeit,...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/' rel='bookmark' title='Permanent Link: Datum des AD-Backup per Skript herausfinden'>Datum des AD-Backup per Skript herausfinden</a> <small>M&ouml;chte man das Datum herausfinden, zu dem Active Directory zuletzt...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Permanent Link: Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image2.png"><img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image_thumb2.png" width="184" height="107" /></a> Seit jeher l&auml;sst Windows zu, f&uuml;r einen Benutzer Anmeldezeiten zu definieren – seit Windows NT und auch jetzt in Active Directory. Dar&uuml;ber l&auml;sst sich festlegen, an welchen Wochentagen und zu welchen Uhrzeiten dem Benutzer die Anmeldung mit dem jeweiligen Konto gestattet ist. Nicht ganz einfach ist es allerdings, diese Zeiten auszulesen. Zwar gibt es nat&uuml;rlich ein GUI daf&uuml;r, und auch der Kommandozeilenbefehl “net user” gibt dar&uuml;ber Auskunft. Das war es aber auch schon. Insbesondere per Skript ist es alles andere als bequem, an diese Daten zu kommen.</p>
<p> <span id="more-2181"></span>
<p>Intern speichert Windows diese Information in einem etwas h&auml;sslichen Format, n&auml;mlich als Bitmap von 168 Bits, wobei jedes Bit eine Stunde der Woche repr&auml;sentiert (24 multipliziert mit 7). Ist das Bit 1, so darf der Benutzer sich anmelden, ist es 0, so wird der Logon verweigert.</p>
<p>Auf der Seite von US-MVP Richard L. Mueller (<a href="http://www.rlmueller.net">www.rlmueller.net</a>) fand ich ein VBScript, das die Daten ausliest. Es ist allerdings nicht besonders h&uuml;bsch und enth&auml;lt in der Fassung vom 25. 1. 2004 einen l&auml;stigen Fehler: Es geht n&auml;mlich leider nicht sauber mit internationalen Zeitzonen um.</p>
<p>[LogonHours.vbs – Hilltop Lab]    <br />http://www.rlmueller.net/Programs/LogonHours.txt</p>
<p>F&uuml;r mein AD-Dokutool José habe ich das Skript daher korrigiert, erweitert und auf meinen Bedarf angepasst, sodass es eine gut lesbare Zusammenfassung der Zeiten ausgibt (siehe Bild). Die eine oder andere hat vielleicht Verwendung daf&uuml;r, daher folgt hier der Scriptcode. Kopieren, in eine VBS-Datei speichern und wie folgt aufrufen:</p>
<p><em>cscript JoseLogonHours.vbs “CN=Ellen Bogen,OU=EDV,DC=faq-o-matic,DC=net”</em></p>
<p>Sollte das Skript einen Fehler ausgeben, so kann es sein, dass dem aufrufenden Benutzer Berechtigungen fehlen. In dem Fall das CMD-Fenster f&uuml;r den Aufruf ausdr&uuml;cklich als (Dom&auml;nen-)Administrator starten bzw. mit ausreichenden Rechten anmelden.</p>
<h4>Der Code</h4>
<div class="vb">
<ol>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; JoseLogonHours.vbs</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; VBScript program to document hours of the week when a given Active</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Directory user is allowed to logon, using the logonHours attribute.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Author: Nils Kaczenski, faq-o-matic.net</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Version 1.0, January 26, 2010</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Based on: LogonHours.vbs</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Copyright (c) 2002-2004 Richard L. Mueller, Hilltop Lab</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; This script is designed to be run at a command prompt, using the</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Cscript host. For example:</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; cscript //nologo JoseLogonHours.vbs DistinguishedName</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; DistinguishedName can be similar to:</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039;&#160;&#160;&#160;&#160; &quot;cn=TestUser,ou=Sales,dc=MyDomain,dc=com&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; You have a royalty-free right to use, modify, reproduce, and</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; distribute this script file in any way you find useful, provided that</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; you agree that the copyright owner above has no warranty, obligations,</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; or liability for such use.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Option</span> <span style="color: #b1b100">Explicit</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Dim</span> objShell, lngBias, strUserDN</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Dim</span> objUser</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Dim</span> lngBiasKey</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Check for required argument.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span>WScript.<span>Arguments</span>.<span style="color: #b1b100">Count</span> = <span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;Error, required argument missing.&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;JoseLogonHours.vbs&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;Program to document allowed logon hours&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;Syntax:&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;cscript JoseLogonHours.vbs DN&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;where DN is the DistinguishedName of an AD user.&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;For example, DN could be:&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;&#160; cn=TestUser,ou=Sales,dc=MyDomain,dc=com&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Quit</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">1</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">strUserDN = WScript.<span>Arguments</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Bind to the specified user object with the LDAP provider.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">On</span> <span style="color: #b1b100">Error</span> <span style="color: #b1b100">Resume</span> <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Set</span> objUser = <span style="color: #b1b100">GetObject</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;LDAP://&quot;</span> &amp; strUserDN<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span><span style="color: #b1b100">Err</span>.<span>Number</span> &lt;&gt; <span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">On</span> <span style="color: #b1b100">Error</span> <span style="color: #b1b100">Goto</span> <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;User not found in Active Directory&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> strUserDN</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Quit</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">1</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">On</span> <span style="color: #b1b100">Error</span> <span style="color: #b1b100">Goto</span> <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; Determine the time zone bias from the local registry.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; This bias does not change with Daylight Savings Time.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Set</span> objShell = <span style="color: #b1b100">CreateObject</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;Wscript.Shell&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">lngBiasKey = objShell.<span>RegRead</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;HKLM\System\CurrentControlSet\Control\&quot;</span> _</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; &amp; <span style="color: #ff0000">&quot;TimeZoneInformation\Bias&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span><span style="color: #b1b100">UCase</span><span style="color: #66cc66">(</span><span style="color: #b1b100">TypeName</span><span style="color: #66cc66">(</span>lngBiasKey<span style="color: #66cc66">)</span><span style="color: #66cc66">)</span> = <span style="color: #ff0000">&quot;LONG&quot;</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; lngBias = lngBiasKey</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">ElseIf</span> <span style="color: #66cc66">(</span><span style="color: #b1b100">UCase</span><span style="color: #66cc66">(</span><span style="color: #b1b100">TypeName</span><span style="color: #66cc66">(</span>lngBiasKey<span style="color: #66cc66">)</span><span style="color: #66cc66">)</span> = <span style="color: #ff0000">&quot;VARIANT()&quot;</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; lngBias = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">For</span> k = <span style="color: #cc66cc">0</span> <span style="color: #b1b100">To</span> <span style="color: #b1b100">UBound</span><span style="color: #66cc66">(</span>lngBiasKey<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; lngBias = lngBias + <span style="color: #66cc66">(</span>lngBiasKey<span style="color: #66cc66">(</span>k<span style="color: #66cc66">)</span> * <span style="color: #cc66cc">256</span>^k<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">lngBias = Round<span style="color: #66cc66">(</span>lngBias/<span style="color: #cc66cc">60</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #808080">&#039; this is for debug use</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">WScript.<span>Echo</span> <span style="color: #ff0000">&quot;Bias (Time Zone Correction): &quot;</span> &amp; lngBias</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">WScript.<span>Echo</span> GetLogonHours<span style="color: #66cc66">(</span>objUser<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">Function</span> GetLogonHours<span style="color: #66cc66">(</span>objAccount<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> DayNames</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> AllLogonHours<span style="color: #66cc66">(</span><span style="color: #cc66cc">20</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> LogonHoursBits<span style="color: #66cc66">(</span><span style="color: #cc66cc">167</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> LogonHours</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> LogonHourByte, LogonHour</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> k, Counter, LoopCounter, j, m</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> DayOfWeek<span style="color: #66cc66">(</span><span style="color: #cc66cc">6</span><span style="color: #66cc66">)</span>, DayLogon<span style="color: #66cc66">(</span><span style="color: #cc66cc">6</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Dim</span> DayCount, HourCount</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #808080">&#039; German day names (short), beginning with Sunday (US-like)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; DayNames = <span style="color: #b1b100">Array</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;So&quot;</span>, <span style="color: #ff0000">&quot;Mo&quot;</span>, <span style="color: #ff0000">&quot;Di&quot;</span>, <span style="color: #ff0000">&quot;Mi&quot;</span>, <span style="color: #ff0000">&quot;Do&quot;</span>, <span style="color: #ff0000">&quot;Fr&quot;</span>, <span style="color: #ff0000">&quot;Sa&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;User: &quot;</span> &amp; objAccount.<span style="color: #b1b100">name</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">On</span> <span style="color: #b1b100">Error</span> <span style="color: #b1b100">Resume</span> <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; Retrieve the user&#039;s logonHours attribute.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; objAccount.<span>GetInfoEx</span> <span style="color: #b1b100">Array</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;logonHours&quot;</span><span style="color: #66cc66">)</span>, <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; LogonHours = objAccount.<span style="color: #b1b100">Get</span><span style="color: #66cc66">(</span><span style="color: #ff0000">&quot;logonHours&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #b1b100">err</span>.<span>number</span> &lt;&gt; <span style="color: #cc66cc">0</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160; WScript.<span>Echo</span> <span style="color: #ff0000">&quot;Fehler: &quot;</span> &amp; <span style="color: #b1b100">err</span>.<span>number</span> &amp; <span style="color: #ff0000">&quot; (&quot;</span> &amp; <span style="color: #b1b100">err</span>.<span>description</span> &amp; <span style="color: #ff0000">&quot;)&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160; WScript.<span>Quit</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #808080">&#039; Populate a byte array.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">For</span> k = <span style="color: #cc66cc">1</span> <span style="color: #b1b100">To</span> <span style="color: #b1b100">LenB</span><span style="color: #66cc66">(</span>LogonHours<span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; AllLogonHours<span style="color: #66cc66">(</span>k &#8211; <span style="color: #cc66cc">1</span><span style="color: #66cc66">)</span> = <span style="color: #b1b100">AscB</span><span style="color: #66cc66">(</span><span style="color: #b1b100">MidB</span><span style="color: #66cc66">(</span>LogonHours, k, <span style="color: #cc66cc">1</span><span style="color: #66cc66">)</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #808080">&#039; Populate a bit array, offset by the time zone bias.</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; j = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">For</span> Each LogonHourByte In AllLogonHours</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">For</span> k = <span style="color: #cc66cc">7</span> <span style="color: #b1b100">To</span> <span style="color: #cc66cc">0</span> Step -<span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; m = <span style="color: #cc66cc">8</span>*j + k &#8211; lngBias</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span>m &lt; <span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; m = m + <span style="color: #cc66cc">168</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; *** correction Nils Kaczenski:</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; wrap the other way as well!</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span>m &gt; <span style="color: #cc66cc">167</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; m = m &#8211; <span style="color: #cc66cc">168</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span>LogonHourByte <span style="color: #b1b100">And</span> <span style="color: #cc66cc">2</span>^k<span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LogonHoursBits<span style="color: #66cc66">(</span>m<span style="color: #66cc66">)</span> = <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Else</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LogonHoursBits<span style="color: #66cc66">(</span>m<span style="color: #66cc66">)</span> = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; j = j + <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; Counter = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; LoopCounter = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; DayCount = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">For</span> Each LogonHour In LogonHoursBits</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; add logon hours to an array of days</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayOfWeek<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = DayOfWeek<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; LogonHour</div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; Counter&#160; = Counter + <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #66cc66">(</span>Counter = <span style="color: #cc66cc">24</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; this makes a full day, so check it</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> DayOfWeek<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = <span style="color: #b1b100">String</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">24</span>, <span style="color: #ff0000">&quot;1&quot;</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span> </div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; User may log on the whole day</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = <span style="color: #ff0000">&quot;immer&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Else</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; User has at least one exclusion, so walk through the hours</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; start counting at 1 so we can use the InStr 0 value</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; (but we need to adjust this in the code)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Do</span> Until HourCount = <span style="color: #cc66cc">25</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; find times the user may not log on</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = <span style="color: #b1b100">InStr</span><span style="color: #66cc66">(</span>HourCount, DayOfWeek<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span>, <span style="color: #ff0000">&quot;0&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> HourCount = <span style="color: #cc66cc">0</span> <span style="color: #b1b100">Then</span> </div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; no more exclusions, day complete</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = <span style="color: #cc66cc">25</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Else</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; add beginning of exclusion time</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; <span style="color: #ff0000">&quot;, nicht &quot;</span> &amp; HourCount &#8211; <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; find next allowed hour</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = <span style="color: #b1b100">InStr</span><span style="color: #66cc66">(</span>HourCount, DayOfWeek<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span>, <span style="color: #ff0000">&quot;1&quot;</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> HourCount = <span style="color: #cc66cc">0</span> <span style="color: #b1b100">Then</span> <span style="color: #808080">&#039; Or HourCount &gt; 24</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; no more allowed hours, day complete</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = <span style="color: #cc66cc">25</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; <span style="color: #ff0000">&quot; bis 24&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Else</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; add ending of exclusion time</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; <span style="color: #ff0000">&quot; bis &quot;</span> &amp; HourCount &#8211; <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HourCount = HourCount + <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Loop</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span>&#160; </div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; Clear the beginning of the string</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">If</span> <span style="color: #b1b100">Left</span><span style="color: #66cc66">(</span>DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span>, <span style="color: #cc66cc">2</span><span style="color: #66cc66">)</span> = <span style="color: #ff0000">&quot;, &quot;</span> <span style="color: #b1b100">Then</span> DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> = <span style="color: #b1b100">Mid</span><span style="color: #66cc66">(</span>DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span>, <span style="color: #cc66cc">3</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DayCount = DayCount + <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Counter = <span style="color: #cc66cc">0</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LoopCounter = LoopCounter + <span style="color: #cc66cc">1</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">If</span> Join<span style="color: #66cc66">(</span>DayOfWeek, <span style="color: #ff0000">&quot;&quot;</span><span style="color: #66cc66">)</span> = <span style="color: #b1b100">String</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">168</span>, <span style="color: #ff0000">&quot;1&quot;</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; User may logon any time</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetLogonHours = <span style="color: #ff0000">&quot;jederzeit&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">ElseIf</span> Join<span style="color: #66cc66">(</span>DayOfWeek, <span style="color: #ff0000">&quot;&quot;</span><span style="color: #66cc66">)</span> = <span style="color: #b1b100">String</span><span style="color: #66cc66">(</span><span style="color: #cc66cc">168</span>, <span style="color: #ff0000">&quot;0&quot;</span><span style="color: #66cc66">)</span> <span style="color: #b1b100">Then</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; User may never log on</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetLogonHours = <span style="color: #ff0000">&quot;niemals&quot;</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">Else</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; Output Monday to Saturday</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">For</span> DayCount = <span style="color: #cc66cc">1</span> <span style="color: #b1b100">To</span> <span style="color: #cc66cc">6</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetLogonHours = GetLogonHours &amp; DayNames<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; <span style="color: #ff0000">&quot;: &quot;</span> &amp; DayLogon<span style="color: #66cc66">(</span>DayCount<span style="color: #66cc66">)</span> &amp; <span style="color: #b1b100">vbNewLine</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #b1b100">Next</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #808080">&#039; Outside the US, Sunday is the last day, not the first one</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160;&#160;&#160;&#160;&#160; GetLogonHours = GetLogonHours &amp; DayNames<span style="color: #66cc66">(</span><span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span> &amp; <span style="color: #ff0000">&quot;: &quot;</span> &amp; DayLogon<span style="color: #66cc66">(</span><span style="color: #cc66cc">0</span><span style="color: #66cc66">)</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #b1b100">End</span> <span style="color: #b1b100">If</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; <span style="color: #808080">&#039;WScript.Echo GetLogonHours</span></div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal">&#160;&#160;&#160; </div>
</li>
<li style="font-style: normal; font-family: &#39;Courier New&#39;, courier, monospace; color: black; font-weight: normal">
<div style="font-family: &#39;Courier New&#39;, courier, monospace; font-weight: normal"><span style="color: #b1b100">End</span> <span style="color: #b1b100">Function</span> </div>
</li>
</ol></div>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2005/03/17/ad-informationen-schnell-auslesen/' rel='bookmark' title='Permanent Link: AD-Informationen schnell auslesen'>AD-Informationen schnell auslesen</a> <br /><small>Neben eineAm klassischen ADSI-Skript gibt es eine relativ einfache M&ouml;glichkeit,...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/' rel='bookmark' title='Permanent Link: Datum des AD-Backup per Skript herausfinden'>Datum des AD-Backup per Skript herausfinden</a> <br /><small>M&ouml;chte man das Datum herausfinden, zu dem Active Directory zuletzt...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Permanent Link: Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <br /><small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RDP &#8211; oder: die T&#252;cken der Gewohnheit</title>
		<link>http://www.faq-o-matic.net/2010/03/17/rdp-oder-die-tcken-der-gewohnheit/</link>
		<comments>http://www.faq-o-matic.net/2010/03/17/rdp-oder-die-tcken-der-gewohnheit/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:52:31 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Freie Wildbahn]]></category>
		<category><![CDATA[Gruppenrichtlinien]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/17/rdp-oder-die-tcken-der-gewohnheit/</guid>
		<description><![CDATA[ RDP ist eine wunderbare Technik, um remote auf Windows-Rechner zuzugreifen. Wer dies wie ich intensiv nutzt, gew&#246;hnt sich aber schnell so sehr daran, dass er nicht mehr bemerkt, dass es sich schon um eine besondere Art des Zugriffs handelt.
Gerade entwerfe ich f&#252;r einen Kunden einige Sicherheitseinstellungen f&#252;r Active Directory. Unter anderem wollen wir per [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2005/06/21/warum-funktioniert-die-aenderung-einer-gruppenmitgliedschaft-nicht/' rel='bookmark' title='Permanent Link: Warum funktioniert die &#196;nderung einer Gruppenmitgliedschaft nicht?'>Warum funktioniert die &#196;nderung einer Gruppenmitgliedschaft nicht?</a> <small>Windows nutzt ein Access Token, das bei der Anmeldung generiert...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/02/03/wie-finde-ich-heraus-ob-ein-benutzer-administrator-ist/' rel='bookmark' title='Permanent Link: Wie finde ich heraus, ob ein Benutzer Administrator ist?'>Wie finde ich heraus, ob ein Benutzer Administrator ist?</a> <small>Oft muss man herausfinden, ob ein Benutzer mit Administratorrechten arbeitet...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/01/17/ad-domnen-benutzer-per-ldap-abfragen/' rel='bookmark' title='Permanent Link: AD: &ldquo;Dom&auml;nen-Benutzer&rdquo; per LDAP abfragen'>AD: &ldquo;Dom&auml;nen-Benutzer&rdquo; per LDAP abfragen</a> <small>Wer per LDAP (oder auch per ADSI) die Mitglieder bestimmter...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 10px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.faq-o-matic.net/wp-content/uploads/2010/03/image_thumb.png" width="154" height="92" /></a> RDP ist eine wunderbare Technik, um remote auf Windows-Rechner zuzugreifen. Wer dies wie ich intensiv nutzt, gew&ouml;hnt sich aber schnell so sehr daran, dass er nicht mehr bemerkt, dass es sich schon um eine besondere Art des Zugriffs handelt.</p>
<p>Gerade entwerfe ich f&uuml;r einen Kunden einige Sicherheitseinstellungen f&uuml;r Active Directory. Unter anderem wollen wir per Gruppenrichtlinie steuern, wer sich an welchen Maschinen anmelden darf. Kein Problem – GPO auf die passende OU verlinken, in der die Computer stecken, und dort &uuml;ber die Sicherheitseinstellungen das Recht “Lokale Anmeldung erlauben” vorgeben. In meinem Fall sollen nur die “Administratoren” und die Gruppe “DOM\Abt02-Erlauben” drinstehen.</p>
<p> <span id="more-2178"></span>
<p>Tja – nur der Test schl&auml;gt fehl. Jeden Anmeldeversuch mit einem AD-Konto, das der Gruppe “Abt02-Erlauben” angeh&ouml;rt, wird von XP abgewiesen mit dem Hinweis: “Die lokale Richtlinie erlaubt es Ihnen nicht, sich interaktiv anzumelden.” Ja, Kruzi!</p>
<p>Nach langem Suchen und vielen vergeblichen Versuchen fiel es mir dann wie der Schuppen vom Stall: Ich versuchte die ganze Zeit, per RDP auf die XP-Maschine zuzugreifen. Vorher hatte ich das immer als Admin getan. Normale Benutzer d&uuml;rfen aber nur per RDP zugreifen, wenn man sie separat in die Gruppe “Remotedesktop-Benutzer” aufnimmt. Die Fehlermeldung, die XP gibt, bezieht sich aber (weil XP da eben noch sehr mit Windows 2000 verwandt ist) auf die “Interaktive Anmeldung”.</p>
<p>Tja, und das war’s dann auch: Beim Zugriff direkt auf der lokalen Konsole verhielten sich XP (und damit auch meine Gruppenrichtline) genau so, wie es geplant war …</p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2005/06/21/warum-funktioniert-die-aenderung-einer-gruppenmitgliedschaft-nicht/' rel='bookmark' title='Permanent Link: Warum funktioniert die &#196;nderung einer Gruppenmitgliedschaft nicht?'>Warum funktioniert die &#196;nderung einer Gruppenmitgliedschaft nicht?</a> <br /><small>Windows nutzt ein Access Token, das bei der Anmeldung generiert...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/02/03/wie-finde-ich-heraus-ob-ein-benutzer-administrator-ist/' rel='bookmark' title='Permanent Link: Wie finde ich heraus, ob ein Benutzer Administrator ist?'>Wie finde ich heraus, ob ein Benutzer Administrator ist?</a> <br /><small>Oft muss man herausfinden, ob ein Benutzer mit Administratorrechten arbeitet...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/01/17/ad-domnen-benutzer-per-ldap-abfragen/' rel='bookmark' title='Permanent Link: AD: &ldquo;Dom&auml;nen-Benutzer&rdquo; per LDAP abfragen'>AD: &ldquo;Dom&auml;nen-Benutzer&rdquo; per LDAP abfragen</a> <br /><small>Wer per LDAP (oder auch per ADSI) die Mitglieder bestimmter...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/17/rdp-oder-die-tcken-der-gewohnheit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dsacls in Extremsituation</title>
		<link>http://www.faq-o-matic.net/2010/03/11/dsacls-in-extremsituation/</link>
		<comments>http://www.faq-o-matic.net/2010/03/11/dsacls-in-extremsituation/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 16:33:04 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[AD: Daten bearbeiten]]></category>
		<category><![CDATA[Active Directory]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/11/dsacls-in-extremsituation/</guid>
		<description><![CDATA[dsacls.exe ist das Kommandozeilenwerkzeug, mit dem man Berechtigungen auf Objekte in Active Directory manipulieren kann. Heute hatte ich Gelegenheit, es in einer Extremsituation zu nutzen.
In einem Testszenario sollten f&#252;r 16.308 Benutzerkonten die AD-Zugriffsberechtigungen ge&#228;ndert werden. F&#252;r jedes einzelne Objekt gab es sieben &#196;nderungen: Zwei vorhandene Berechtigungen wurden entfernt und f&#252;nf neue hinzugef&#252;gt. Das Ganze wurde [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2008/06/23/ad-adressen-im-sekretariat-bearbeiten-lassen/' rel='bookmark' title='Permanent Link: AD-Adressen im Sekretariat bearbeiten lassen'>AD-Adressen im Sekretariat bearbeiten lassen</a> <small>Active Directory ist in vielen Unternehmen die zentrale Adressdatenbank f&uuml;r...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/10/01/massenaenderungen-mit-admodify/' rel='bookmark' title='Permanent Link: Massen&#228;nderungen mit ADModify'>Massen&#228;nderungen mit ADModify</a> <small>Sie wollten schon immer mal bei 400 Benutzern das Login-Skript...</small></li>
<li><a href='http://www.faq-o-matic.net/2003/11/17/wie-stelle-ich-das-ad-wieder-her/' rel='bookmark' title='Permanent Link: Wie stelle ich das AD wieder her?'>Wie stelle ich das AD wieder her?</a> <small>Grunds&auml;tzlich ist ein Restore des AD in einer richtig aufgebauten...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>dsacls.exe ist das Kommandozeilenwerkzeug, mit dem man Berechtigungen auf Objekte in Active Directory manipulieren kann. Heute hatte ich Gelegenheit, es in einer Extremsituation zu nutzen.</p>
<p>In einem Testszenario sollten f&uuml;r 16.308 Benutzerkonten die AD-Zugriffsberechtigungen ge&auml;ndert werden. F&uuml;r jedes einzelne Objekt gab es sieben &Auml;nderungen: Zwei vorhandene Berechtigungen wurden entfernt und f&uuml;nf neue hinzugef&uuml;gt. Das Ganze wurde &uuml;ber eine gro&szlig;e Batchdatei gesteuert, die f&uuml;r jedes der Objekte die sieben dsacls-Kommandos ausf&uuml;hrte. Das passierte auf einem Dom&auml;nencontroller unter Windows Server 2008 R2, der in einer nicht optimierten VM lief (nur 512 MB RAM und eine einzige virtuelle Festplatte).</p>
<p>Der Vorgang dauerte etwas weniger als zwei Stunden. Erst war ich &uuml;berrascht &uuml;ber die lange Bearbeitungszeit, aber dann habe ich mal nachgerechnet:</p>
<ul>
<li>16.308 Objekte mit jeweils sieben ACL-&Auml;nderungen ergibt 114.156 einzelne ACL-&Auml;nderungen.</li>
<li>Die Ausf&uuml;hrung dauerte etwas weniger als zwei Stunden, was etwa 1000 ACL-&Auml;nderungen pro Minute ergibt.</li>
<li>Das wiederum bedeutet, dass etwas mehr als 15 &Auml;nderungen pro Sekunde erfolgten.</li>
<li>Hierbei muss man – neben dem geringen Arbeitsspeicher des Servers – ber&uuml;cksichtigen, dass jede &Auml;nderung im Ereignisprotokoll mitgeschrieben wurde und dass dsacls bei jeder Ausf&uuml;hrung die Berechtigungen des Objekts als Text ausgibt, hier umgeleitet in eine Datei.</li>
<li>Die Datenbank-Dateigr&ouml;&szlig;e des AD &auml;nderte sich durch diesen Vorgang &uuml;brigens nicht, was wahrscheinlich auf die pro Objekt geringe Anzahl ge&auml;nderter ACLs zur&uuml;ckzuf&uuml;hren ist.</li>
</ul>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2008/06/23/ad-adressen-im-sekretariat-bearbeiten-lassen/' rel='bookmark' title='Permanent Link: AD-Adressen im Sekretariat bearbeiten lassen'>AD-Adressen im Sekretariat bearbeiten lassen</a> <br /><small>Active Directory ist in vielen Unternehmen die zentrale Adressdatenbank f&uuml;r...</small></li>
<li><a href='http://www.faq-o-matic.net/2005/10/01/massenaenderungen-mit-admodify/' rel='bookmark' title='Permanent Link: Massen&#228;nderungen mit ADModify'>Massen&#228;nderungen mit ADModify</a> <br /><small>Sie wollten schon immer mal bei 400 Benutzern das Login-Skript...</small></li>
<li><a href='http://www.faq-o-matic.net/2003/11/17/wie-stelle-ich-das-ad-wieder-her/' rel='bookmark' title='Permanent Link: Wie stelle ich das AD wieder her?'>Wie stelle ich das AD wieder her?</a> <br /><small>Grunds&auml;tzlich ist ein Restore des AD in einer richtig aufgebauten...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/11/dsacls-in-extremsituation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AddReplicaToPFRecursive.ps1 und Leerzeichen im Ordnernamen</title>
		<link>http://www.faq-o-matic.net/2010/03/09/addreplicatopfrecursive-ps1-und-leerzeichen-im-ordnernamen/</link>
		<comments>http://www.faq-o-matic.net/2010/03/09/addreplicatopfrecursive-ps1-und-leerzeichen-im-ordnernamen/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 20:40:29 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Migration]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/03/09/addreplicatopfrecursive-ps1-und-leerzeichen-im-ordnernamen/</guid>
		<description><![CDATA[Exchange Server 2007 bringt ein PowerShell-Skript mit, mit dem man zu allen &#214;ffentlichen Ordnern eines Exchange-Servers ein Replikat hinzuf&#252;gen kann. Muss es auch, denn die grafische Ordnerverwaltung hat diese Funktion leider nicht mehr …
Leider schl&#228;gt das Skript aber oft fehl und meldet, es k&#246;nne einen Parameter nicht erkennen. Dabei handelt es sich dann um einen [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2007/02/25/migration-von-exchange-2003-nach-exchange-2007/' rel='bookmark' title='Permanent Link: Migration von Exchange 2003 nach Exchange 2007'>Migration von Exchange 2003 nach Exchange 2007</a> <small>Es gibt mehrere M&ouml;glichkeiten, auf die aktuelle Version von Exchange...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/08/20/exchange-2007-migration-alias-bereinigen/' rel='bookmark' title='Permanent Link: Exchange-2007-Migration: Alias bereinigen'>Exchange-2007-Migration: Alias bereinigen</a> <small>Im Unterschied zu den Vorg&auml;ngerversionen erlaubt Exchange 2007 keine Leerzeichen...</small></li>
<li><a href='http://www.faq-o-matic.net/2007/11/29/exchange-2007-dienste-starten-nicht-nach-rollup-update-5/' rel='bookmark' title='Permanent Link: Exchange 2007: Dienste starten nicht nach Rollup Update 5'>Exchange 2007: Dienste starten nicht nach Rollup Update 5</a> <small>Mit dem Rollup Update 5 f&uuml;r den Exchange Server 2007...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Exchange Server 2007 bringt ein PowerShell-Skript mit, mit dem man zu allen &Ouml;ffentlichen Ordnern eines Exchange-Servers ein Replikat hinzuf&uuml;gen kann. Muss es auch, denn die grafische Ordnerverwaltung hat diese Funktion leider nicht mehr …</p>
<p>Leider schl&auml;gt das Skript aber oft fehl und meldet, es k&ouml;nne einen Parameter nicht erkennen. Dabei handelt es sich dann um einen Teil des Ordnernamens. Es liegt auf der Hand: Das Skript kommt nicht mit Leerzeichen klar. (Eigentlich ziemlich peinlich, aber lassen wir das.)</p>
<p>Die Abhilfe ist zwar einfach, aber man kommt kaum selbst drauf: Man f&uuml;ge in die Angabe des Ordnernamens innerhalb der doppelten Anf&uuml;hrungsstriche noch einmal “einfache” Anf&uuml;hrungsstriche hinzu (besser gesagt: Apostrophen). So:</p>
<pre>AddReplicatoPFRecursive.ps1 -TopPublicFolder &quot;'\PublicFolder with space'&quot; -ServerToAdd NeuerServer</pre>
<p>Hier noch die Quelle &#8211; Ehre, wem Ehre geb&uuml;hrt:</p>
<p>[Managing spaces in AddReplicaToPFRecursive.ps1 script | Zero Hour Sleep]<br />
  <br /><a href="http://www.zerohoursleep.com/2009/12/managing-spaces-in-addreplicatopfrecursiveps1-script/">http://www.zerohoursleep.com/2009/12/managing-spaces-in-addreplicatopfrecursiveps1-script/</a></p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2007/02/25/migration-von-exchange-2003-nach-exchange-2007/' rel='bookmark' title='Permanent Link: Migration von Exchange 2003 nach Exchange 2007'>Migration von Exchange 2003 nach Exchange 2007</a> <br /><small>Es gibt mehrere M&ouml;glichkeiten, auf die aktuelle Version von Exchange...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/08/20/exchange-2007-migration-alias-bereinigen/' rel='bookmark' title='Permanent Link: Exchange-2007-Migration: Alias bereinigen'>Exchange-2007-Migration: Alias bereinigen</a> <br /><small>Im Unterschied zu den Vorg&auml;ngerversionen erlaubt Exchange 2007 keine Leerzeichen...</small></li>
<li><a href='http://www.faq-o-matic.net/2007/11/29/exchange-2007-dienste-starten-nicht-nach-rollup-update-5/' rel='bookmark' title='Permanent Link: Exchange 2007: Dienste starten nicht nach Rollup Update 5'>Exchange 2007: Dienste starten nicht nach Rollup Update 5</a> <br /><small>Mit dem Rollup Update 5 f&uuml;r den Exchange Server 2007...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/03/09/addreplicatopfrecursive-ps1-und-leerzeichen-im-ordnernamen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Datum des AD-Backup per Skript herausfinden</title>
		<link>http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/</link>
		<comments>http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 23:25:37 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[AD: Erweiterte Abfragen]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Datensicherung]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/</guid>
		<description><![CDATA[M&#246;chte man das Datum herausfinden, zu dem Active Directory zuletzt gesichert wurde, so gibt es eine recht einfache Methode: Ab Windows 2003 (SP1) beantwortet repadmin diese Frage.
repadmin /showbackup
Die Ausgabe sieht ungef&#228;hr so aus:
 
Da ich gerade an der neuen Version 3.0 meines AD-Dokumentationswerkzeugs José arbeite, wollte ich diese Daten aber per Skript herausfinden, ohne auf [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2004/07/28/ein-ad-attribut-zu-einem-logon-namen-herausfinden/' rel='bookmark' title='Permanent Link: Ein AD-Attribut zu einem Logon-Namen herausfinden'>Ein AD-Attribut zu einem Logon-Namen herausfinden</a> <small>Das folgende Skript gibt den Wert eines beliebigen Attributs aus...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/' rel='bookmark' title='Permanent Link: Anmeldezeiten f&uuml;r AD-Benutzer per Skript ausgeben'>Anmeldezeiten f&uuml;r AD-Benutzer per Skript ausgeben</a> <small> Seit jeher l&auml;sst Windows zu, f&uuml;r einen Benutzer Anmeldezeiten...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Permanent Link: Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>M&ouml;chte man das Datum herausfinden, zu dem Active Directory zuletzt gesichert wurde, so gibt es eine recht einfache Methode: Ab Windows 2003 (SP1) beantwortet repadmin diese Frage.</p>
<p><em>repadmin /showbackup</em></p>
<p>Die Ausgabe sieht ungef&auml;hr so aus:</p>
<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/02/image22.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.faq-o-matic.net/wp-content/uploads/2010/02/image_thumb22.png" width="344" height="102" /></a> </p>
<p>Da ich gerade an der neuen Version 3.0 meines AD-Dokumentationswerkzeugs José arbeite, wollte ich diese Daten aber per Skript herausfinden, ohne auf repadmin angewiesen zu sein. Das stellte sich als gar nicht so einfach heraus, denn die Information ist im AD gut versteckt.</p>
<p> <span id="more-2158"></span>
<p>Schlie&szlig;lich brachte mich der AD-Supportengineer Ned Pyle auf den richtigen Weg (mit Vermittlung durch Yusuf Dikmenoglu). Er verwies mich auf diesen Blogartikel:</p>
<p>[Active Directory Powershell Blog : Accessing Replication Metadata using ADPowerShell]    <br /><a href="http://blogs.msdn.com/adpowershell/archive/2009/11/01/accessing-replication-metadata-using-adpowershell.aspx">http://blogs.msdn.com/adpowershell/archive/2009/11/01/accessing-replication-metadata-using-adpowershell.aspx</a> </p>
<p>OK, PowerShell ist ja wenigstens schon mal Skript. <img src='http://www.faq-o-matic.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Mit der Information, dass die gesuchten Daten sich in einem XML-&auml;hnlich formatierten berechneten Feld finden, hatte ich dann alles, was ich brauchte. Naja, fast alles. Der Abend ist dann schon noch dabei draufgegangen. <img src='http://www.faq-o-matic.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Dann soll es sich aber wenigstens gelohnt haben, daher hier jetzt der Skriptcode. Das folgende Beispiel in eine VBS-Datei kopieren und diese mit cscript (oder notfalls auch per Doppelklick) aufrufen.</p>
<div class="vb">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Set</span> objRootDSE = <span style="color: #b1b100;">GetObject</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;LDAP://rootDSE&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">strDomain = objRootDSE.<span style="color: #b1b100;">Get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;defaultNamingContext&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Set</span> objDomain = <span style="color: #b1b100;">GetObject</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;LDAP://&#034;</span> &amp; strDomain<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">WScript.<span style="">Echo</span> GetADBackupDate<span style="color: #66cc66;">&#40;</span>objDomain<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Function</span> GetADBackupDate<span style="color: #66cc66;">&#40;</span>objDom<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> ReplValue, Subvalue, DSASignature</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> timeLeft, timeRight, DCLeft, DCRight</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> TimeVal, DCName, BackupDate, BackupTime</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; systemBias = GetSystemBias</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080;">&#039; the attribute was introduced in Windows 2003, so we&#039;ll catch errors</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">Resume</span> <span style="color: #b1b100;">Next</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; objDom.<span style="">GetInfoEx</span> <span style="color: #b1b100;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;msDS-ReplAttributeMetaData&#034;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ReplValue = objDom.<span style="color: #b1b100;">Get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;msDS-ReplAttributeMetaData&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Err</span>.<span style="">number</span> &lt;&gt; <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; GetADBackupDate = <span style="color: #ff0000;">&#034;(keine Information vorhanden)&#034;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Function</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">Goto</span> <span style="color: #cc66cc;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; DSASignature = <span style="color: #ff0000;">&#034;&#034;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">For</span> Each Subvalue In ReplValue</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #b1b100;">instr</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span>SubValue<span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">&#034;dsasignature&#034;</span><span style="color: #66cc66;">&#41;</span> &gt;<span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">then</span> DSASignature = Subvalue</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Next</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080;">&#039; this is not too pretty but after all we do not need an XML parser here</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">If</span> DSASignature &lt;&gt; <span style="color: #ff0000;">&#034;&#034;</span> <span style="color: #b1b100;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; timeLeft = <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span>DSASignature<span style="color: #66cc66;">&#41;</span>, <span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;&lt;ftimeLastOriginatingChange&gt;&#034;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;&lt;ftimeLastOriginatingChange&gt;&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; timeRight = <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span>timeLeft, <span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span>DSASignature<span style="color: #66cc66;">&#41;</span>, <span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;&lt;/ftimeLastOriginatingChange&gt;&#034;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; DCLeft = <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span>DSASignature<span style="color: #66cc66;">&#41;</span>, <span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;&lt;pszLastOriginatingDsaDN&gt;&#034;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;&lt;pszLastOriginatingDsaDN&gt;&#034;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;CN=NTDS Settings,CN=&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; DCRight = <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span>DCLeft, DSASignature, <span style="color: #ff0000;">&#034;,&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; TimeVal = <span style="color: #b1b100;">Mid</span><span style="color: #66cc66;">&#40;</span>DSASignature, timeLeft, timeRight &#8211; timeLeft<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; DCName = <span style="color: #b1b100;">Mid</span><span style="color: #66cc66;">&#40;</span>DSASignature, DCLeft , DCRight &#8211; DCLeft<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BackupDate = <span style="color: #b1b100;">Left</span><span style="color: #66cc66;">&#40;</span>TimeVal, <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span>TimeVal, <span style="color: #ff0000;">&#034;T&#034;</span><span style="color: #66cc66;">&#41;</span> &#8211; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BackupTime = <span style="color: #b1b100;">Mid</span><span style="color: #66cc66;">&#40;</span>TimeVal, <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">&#40;</span>TimeVal, <span style="color: #ff0000;">&#034;T&#034;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BackupTime = <span style="color: #b1b100;">Left</span><span style="color: #66cc66;">&#40;</span>BackupTime, <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">&#40;</span>BackupTime<span style="color: #66cc66;">&#41;</span> &#8211; <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BackupTime = <span style="color: #b1b100;">CDate</span><span style="color: #66cc66;">&#40;</span>BackupDate &amp; <span style="color: #ff0000;">&#034; &#034;</span> &amp; BackupTime<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BackupTime = <span style="color: #b1b100;">DateAdd</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;n&#034;</span>, -<span style="color: #66cc66;">&#40;</span>systemBias<span style="color: #66cc66;">&#41;</span>, BackupTime<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; GetADBackupDate = BackupTime &amp; <span style="color: #ff0000;">&#034; von &#034;</span> &amp; DCName</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">&#039; AD seems not to have been backed up yet</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; GetADBackupDate = <span style="color: #ff0000;">&#034;bislang nicht gesichert&#034;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Function</span> GetSystemBias</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> biasKey, k</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> objShell : <span style="color: #b1b100;">Set</span> objShell = <span style="color: #b1b100;">CreateObject</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;WScript.Shell&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; biasKey = objShell.<span style="">RegRead</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&#034;HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias&#034;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">Set</span> objShell = <span style="color: #b1b100;">Nothing</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">If</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">TypeName</span><span style="color: #66cc66;">&#40;</span>biasKey<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #ff0000;">&#034;long&#034;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; GetSystemBias = biasKey</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">LCase</span><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">TypeName</span><span style="color: #66cc66;">&#40;</span>biasKey<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #ff0000;">&#034;variant()&#034;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; GetSystemBias = <span style="color: #cc66cc;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">For</span> k = <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">To</span> <span style="color: #b1b100;">UBound</span><span style="color: #66cc66;">&#40;</span>biasKey<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GetSystemBias = GetSystemBias + <span style="color: #66cc66;">&#40;</span>biasKey<span style="color: #66cc66;">&#40;</span>k<span style="color: #66cc66;">&#41;</span> * <span style="color: #cc66cc;">256</span>^k<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Next</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2004/07/28/ein-ad-attribut-zu-einem-logon-namen-herausfinden/' rel='bookmark' title='Permanent Link: Ein AD-Attribut zu einem Logon-Namen herausfinden'>Ein AD-Attribut zu einem Logon-Namen herausfinden</a> <br /><small>Das folgende Skript gibt den Wert eines beliebigen Attributs aus...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/03/17/anmeldezeiten-fr-ad-benutzer-per-skript-ausgeben/' rel='bookmark' title='Permanent Link: Anmeldezeiten f&uuml;r AD-Benutzer per Skript ausgeben'>Anmeldezeiten f&uuml;r AD-Benutzer per Skript ausgeben</a> <br /><small> Seit jeher l&auml;sst Windows zu, f&uuml;r einen Benutzer Anmeldezeiten...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Permanent Link: Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <br /><small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/02/26/datum-des-ad-backup-per-skript-herausfinden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 ohne Backup und dennoch sicher?</title>
		<link>http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/</link>
		<comments>http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 19:25:03 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Datensicherung]]></category>
		<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/</guid>
		<description><![CDATA[ Exchange-MVP Walter Steinsdorfer hat einen lesenswerten Artikel zu der Marketingaussage geschrieben, dass Exchange 2010 aufgrund seiner Verf&#252;gbarkeits-Architektur kein Backup mehr ben&#246;tige. Sein Fazit: “Exchange 2010 ohne Backup zu betreiben geht. Allerdings in engen Grenzen.”
Hier geht’s zum Artikel:
[Microsoft, Exchange 2010 und die Datensicherungsstory - Exchange, Security and Active Directory]   http://msmvps.com/blogs/wstein/archive/2010/02/24/microsoft-exchange-2010-und-die-datensicherungsstory.aspx


Verwandte Beitr&auml;ge:Exchange Server 2010: [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/12/16/exchange-server-2010-voraussetzungen-installieren/' rel='bookmark' title='Permanent Link: Exchange Server 2010: Voraussetzungen installieren'>Exchange Server 2010: Voraussetzungen installieren</a> <small>Exchange Server 2010 l&auml;sst sich unter Windows Server 2008 (x64,...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/04/24/windows-server-2008-und-ipv6-deaktivieren-fhrt-oft-zu-fehlern/' rel='bookmark' title='Permanent Link: Windows Server 2008 und IPv6: Deaktivieren f&uuml;hrt oft zu Fehlern'>Windows Server 2008 und IPv6: Deaktivieren f&uuml;hrt oft zu Fehlern</a> <small>Windows Server 2008 ist das erste Serversystem von Microsoft, das...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/11/19/exchange-server-2007-sp1-und-remote-streaming-backup/' rel='bookmark' title='Permanent Link: Exchange Server 2007 SP1 und Remote Streaming Backup'>Exchange Server 2007 SP1 und Remote Streaming Backup</a> <small>Um eine Exchange Server Datenbank zu sichern, wird in den...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/02/image21.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 10px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.faq-o-matic.net/wp-content/uploads/2010/02/image_thumb21.png" width="154" height="89" /></a> Exchange-MVP Walter Steinsdorfer hat einen lesenswerten Artikel zu der Marketingaussage geschrieben, dass Exchange 2010 aufgrund seiner Verf&uuml;gbarkeits-Architektur kein Backup mehr ben&ouml;tige. Sein Fazit: “Exchange 2010 ohne Backup zu betreiben geht. Allerdings in engen Grenzen.”</p>
<p>Hier geht’s zum Artikel:</p>
<p>[Microsoft, Exchange 2010 und die Datensicherungsstory - Exchange, Security and Active Directory]   <br /><a href="http://msmvps.com/blogs/wstein/archive/2010/02/24/microsoft-exchange-2010-und-die-datensicherungsstory.aspx">http://msmvps.com/blogs/wstein/archive/2010/02/24/microsoft-exchange-2010-und-die-datensicherungsstory.aspx</a></p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/12/16/exchange-server-2010-voraussetzungen-installieren/' rel='bookmark' title='Permanent Link: Exchange Server 2010: Voraussetzungen installieren'>Exchange Server 2010: Voraussetzungen installieren</a> <br /><small>Exchange Server 2010 l&auml;sst sich unter Windows Server 2008 (x64,...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/04/24/windows-server-2008-und-ipv6-deaktivieren-fhrt-oft-zu-fehlern/' rel='bookmark' title='Permanent Link: Windows Server 2008 und IPv6: Deaktivieren f&uuml;hrt oft zu Fehlern'>Windows Server 2008 und IPv6: Deaktivieren f&uuml;hrt oft zu Fehlern</a> <br /><small>Windows Server 2008 ist das erste Serversystem von Microsoft, das...</small></li>
<li><a href='http://www.faq-o-matic.net/2008/11/19/exchange-server-2007-sp1-und-remote-streaming-backup/' rel='bookmark' title='Permanent Link: Exchange Server 2007 SP1 und Remote Streaming Backup'>Exchange Server 2007 SP1 und Remote Streaming Backup</a> <br /><small>Um eine Exchange Server Datenbank zu sichern, wird in den...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vortr&#228;ge auf der CeBIT</title>
		<link>http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/</link>
		<comments>http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:18:45 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Sicherheit]]></category>
		<category><![CDATA[Virtualisierung]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/</guid>
		<description><![CDATA[Auf der diesj&#228;hrigen CeBIT, die schon in der n&#228;chsten Woche in meiner Heimatstadt stattfindet, werde ich zwei Vortr&#228;ge f&#252;r den heise-Verlag halten.

Am Mittwoch, 3. M&#228;rz um 12:00 Uhr geht es in Halle 5, Stand E 38 um IT-Sicherheit: “Sicherheit? Ich hab doch ‘ne Firewall! Was Sie vielleicht noch nicht bedacht haben”     [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/08/30/heise-konferenz-virtualisierung/' rel='bookmark' title='Permanent Link: heise-Konferenz: Virtualisierung'>heise-Konferenz: Virtualisierung</a> <small> Im November 2009 veranstaltet heise Netze eine Konferenz-Reihe zur...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/02/21/cebit-verkehrschaos-und-schwarzfahrer-wider-willen/' rel='bookmark' title='Permanent Link: CeBIT: &Ouml;PNV-Chaos scheint abgewendet'>CeBIT: &Ouml;PNV-Chaos scheint abgewendet</a> <small>Anders als k&uuml;rzlich verk&uuml;ndet scheinen sich die Messe AG und...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/' rel='bookmark' title='Permanent Link: heise-Security-Tour: Wir sind dabei!'>heise-Security-Tour: Wir sind dabei!</a> <small> Im April und Mai 2010 veranstaltet das Fachportal “heise...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Auf der diesj&auml;hrigen CeBIT, die schon in der n&auml;chsten Woche in meiner Heimatstadt stattfindet, werde ich zwei Vortr&auml;ge f&uuml;r den heise-Verlag halten.</p>
<ul>
<li>Am Mittwoch, 3. M&auml;rz um 12:00 Uhr geht es in Halle 5, Stand E 38 um IT-Sicherheit: “Sicherheit? Ich hab doch ‘ne Firewall! Was Sie vielleicht noch nicht bedacht haben”     <br />[Heise Events | 2010 | heise Forum | Programm]      <br /><a href="http://www.heise.de/events/2010/heise_forum/plan_tag2/">http://www.heise.de/events/2010/heise_forum/plan_tag2/</a></li>
<li>Am Donnerstag, 4. M&auml;rz um 15:30 stelle ich in Halle 3, Stand G06, ein Kundenprojekt mit Hyper-V vor.     <br />[iX-Konferenz: iX CeBIT Forum 2010]      <br /><a href="http://www.ix-konferenz.de/programm.php?vortyp=Cluster%2FVirtualisierung&amp;konferenzid=79&amp;st=Programm">http://www.ix-konferenz.de/programm.php?vortyp=Cluster%2FVirtualisierung&amp;konferenzid=79&amp;st=Programm</a></li>
</ul>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2009/08/30/heise-konferenz-virtualisierung/' rel='bookmark' title='Permanent Link: heise-Konferenz: Virtualisierung'>heise-Konferenz: Virtualisierung</a> <br /><small> Im November 2009 veranstaltet heise Netze eine Konferenz-Reihe zur...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/02/21/cebit-verkehrschaos-und-schwarzfahrer-wider-willen/' rel='bookmark' title='Permanent Link: CeBIT: &Ouml;PNV-Chaos scheint abgewendet'>CeBIT: &Ouml;PNV-Chaos scheint abgewendet</a> <br /><small>Anders als k&uuml;rzlich verk&uuml;ndet scheinen sich die Messe AG und...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/03/19/heise-security-tour-wir-sind-dabei/' rel='bookmark' title='Permanent Link: heise-Security-Tour: Wir sind dabei!'>heise-Security-Tour: Wir sind dabei!</a> <br /><small> Im April und Mai 2010 veranstaltet das Fachportal “heise...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/02/24/vortrge-auf-der-cebit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007/2010: Mail-Verteiler von au&#223;en nutzbar machen</title>
		<link>http://www.faq-o-matic.net/2010/02/19/exchange-20072010-mail-verteiler-von-auen-nutzbar-machen/</link>
		<comments>http://www.faq-o-matic.net/2010/02/19/exchange-20072010-mail-verteiler-von-auen-nutzbar-machen/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 08:49:48 +0000</pubDate>
		<dc:creator>Nils Kaczenski</dc:creator>
				<category><![CDATA[Exchange]]></category>

		<guid isPermaLink="false">http://www.faq-o-matic.net/2010/02/19/exchange-20072010-mail-verteiler-von-auen-nutzbar-machen/</guid>
		<description><![CDATA[In Exchange 2007 und 2010 sind neue Mail-Verteilergruppen standardm&#228;&#223;ig nur intern nutzbar. M&#246;chte man einen Verteiler einrichten, der von au&#223;en per Mail erreichbar ist, muss man dies ausdr&#252;cklich einstellen. Anderenfalls erh&#228;lt man die Fehlermeldung:
#550 5.7.1 RESOLVER.RST.AuthRequired; authentication required
Zur Umstellung &#246;ffnet man in der Exchange-Konsole (GUI) den Verteiler, dort die Registerkarte „Nachrichten&#252;bermittlungseinstellungen“ und dort „Einschr&#228;nkungen f&#252;r [...]

<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2010/02/12/exchange-20072010-besprechungsraum-kalender-einsehbar-machen/' rel='bookmark' title='Permanent Link: Exchange 2007/2010: Besprechungsraum-Kalender einsehbar machen'>Exchange 2007/2010: Besprechungsraum-Kalender einsehbar machen</a> <small>Mit Exchange 2007 ist der vormals separate “Auto-Accept Agent” Teil...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/08/18/exchange-2010-rc-ist-da/' rel='bookmark' title='Permanent Link: Exchange 2010 RC ist da!'>Exchange 2010 RC ist da!</a> <small>Hm, ich scheine noch zu den ersten zu geh&ouml;ren …...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/' rel='bookmark' title='Permanent Link: Exchange 2010 ohne Backup und dennoch sicher?'>Exchange 2010 ohne Backup und dennoch sicher?</a> <small> Exchange-MVP Walter Steinsdorfer hat einen lesenswerten Artikel zu der...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In Exchange 2007 und 2010 sind neue Mail-Verteilergruppen standardm&auml;&szlig;ig nur intern nutzbar. M&ouml;chte man einen Verteiler einrichten, der von au&szlig;en per Mail erreichbar ist, muss man dies ausdr&uuml;cklich einstellen. Anderenfalls erh&auml;lt man die Fehlermeldung:</p>
<p><em>#550 5.7.1 RESOLVER.RST.AuthRequired; authentication required</em></p>
<p>Zur Umstellung &ouml;ffnet man in der Exchange-Konsole (GUI) den Verteiler, dort die Registerkarte „Nachrichten&uuml;bermittlungseinstellungen“ und dort „Einschr&auml;nkungen f&uuml;r die Nachrichtenzustellung“. Die dortige Einstellung „Authentifizierung aller Absender anfordern“ ist bei Exchange 2007 und 2010 standardm&auml;&szlig;ig f&uuml;r neue Gruppen aktiviert. Wenn der Verteiler von au&szlig;en erreichbar sein soll, muss man das H&auml;kchen entfernen.</p>
<p><a href="http://www.faq-o-matic.net/wp-content/uploads/2010/02/clip_image002.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.faq-o-matic.net/wp-content/uploads/2010/02/clip_image002_thumb.jpg" width="224" height="244" /></a></p>


<h3>Verwandte Beiträge:</h3><ol><li><a href='http://www.faq-o-matic.net/2010/02/12/exchange-20072010-besprechungsraum-kalender-einsehbar-machen/' rel='bookmark' title='Permanent Link: Exchange 2007/2010: Besprechungsraum-Kalender einsehbar machen'>Exchange 2007/2010: Besprechungsraum-Kalender einsehbar machen</a> <br /><small>Mit Exchange 2007 ist der vormals separate “Auto-Accept Agent” Teil...</small></li>
<li><a href='http://www.faq-o-matic.net/2009/08/18/exchange-2010-rc-ist-da/' rel='bookmark' title='Permanent Link: Exchange 2010 RC ist da!'>Exchange 2010 RC ist da!</a> <br /><small>Hm, ich scheine noch zu den ersten zu geh&ouml;ren …...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/02/25/exchange-2010-ohne-backup-und-dennoch-sicher/' rel='bookmark' title='Permanent Link: Exchange 2010 ohne Backup und dennoch sicher?'>Exchange 2010 ohne Backup und dennoch sicher?</a> <br /><small> Exchange-MVP Walter Steinsdorfer hat einen lesenswerten Artikel zu der...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2010/02/19/exchange-20072010-mail-verteiler-von-auen-nutzbar-machen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
