<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>John Howard - Senior Program Manager in the Hyper-V team at Microsoft : Misc Factoids &amp;amp; Rambling</title><link>http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx</link><description>Tags: Misc Factoids &amp;amp; Rambling</description><dc:language>en-GB</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Hyper-V floppy trivia</title><link>http://blogs.technet.com/jhoward/archive/2009/03/21/hyper-v-floppy-trivia.aspx</link><pubDate>Sun, 22 Mar 2009 07:35:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3216397</guid><dc:creator>jhoward</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3216397.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3216397</wfw:commentRss><description>&lt;P&gt;"When I were a lad" (you have to say that in a northern British accent for authenticity), I used to catch the “&lt;A href="http://en.wikipedia.org/wiki/London_Buses_route_64" mce_href="http://en.wikipedia.org/wiki/London_Buses_route_64"&gt;Number 64&lt;/A&gt;” bus outside &lt;A href="http://en.wikipedia.org/wiki/Fairfield_Halls" mce_href="http://en.wikipedia.org/wiki/Fairfield_Halls"&gt;Fairfield Halls&lt;/A&gt; in Central &lt;A href="http://en.wikipedia.org/wiki/Croydon" mce_href="http://en.wikipedia.org/wiki/Croydon"&gt;Croydon&lt;/A&gt; as a leg of my journey to Junior school.&lt;IMG src="http://blogpics.dyndns.org/2009-mar-floppy-trivia.jpg" mce_src="http://blogpics.dyndns.org/2009-mar-floppy-trivia.jpg"&gt; &lt;/P&gt;
&lt;P&gt;The busses never arrived as scheduled some six or seven minutes apart during rush hour – instead, three of them nearly always arrived together. 1970’s London transport at it’s very best :). (Ask me about the “233 bus episode sometime – it has a different route these days, but ask only in person, and with a case of beer in hand…..”). &lt;/P&gt;
&lt;P&gt;What has this to do with Hyper-V? Bad 1970’s bus scheduling came to mind when the floppy disk controller in Hyper-V came up in three conversations in one week – I don’t recall it being mentioned for months beforehand. So I figured it was time to explain a little about the floppy disk controller in Hyper-V. &lt;/P&gt;
&lt;P&gt;The first thing to note is that it cannot be connected to a physical floppy disk drive (does anyone, apart from me, still have, and use, one....?). The floppy disk controller in Hyper-V can only hold virtual media in the form of .VFD files, otherwise known as Virtual Floppy Disks. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;The next thing to address is the media types the controller supports. It supports &lt;A href="http://en.wikipedia.org/wiki/Floppy_disk" mce_href="http://en.wikipedia.org/wiki/Floppy_disk"&gt;1.44KB&lt;/A&gt; and 720KB floppies. (Which also reminds me of "when I were a lad" cutting out a fake tab on 5 1/4" disks to write to them upside down for use on &lt;A href="http://en.wikipedia.org/wiki/Commodore_pet" mce_href="http://en.wikipedia.org/wiki/Commodore_pet"&gt;PETs&lt;/A&gt; and &lt;A href="http://en.wikipedia.org/wiki/RM_380Z" mce_href="http://en.wikipedia.org/wiki/RM_380Z"&gt;380Z's&lt;/A&gt;, doubling the available space to (IIRC) 720KB - saved me a fortune at the time, being a somewhat prolific collector and developer of PET programs ). I guess I'm not quite old enough to remember 8" floppies too well though.... &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Next, the question which cropped up twice. Why is there a file called "blank.vfd" in the “\Users\Public\Documents\Hyper-V\Blank floppy disk” directory when you enable the Hyper-V role? And further, when you try and insert the media into a VM, you get an error "Inserting the disk failed... The file blank.vfd does not have the required security settings. Error: 'General access denied error'". &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-insert_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-insert_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=floppy-insert border=0 alt=floppy-insert src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-insert_thumb.jpg" width=424 height=221 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-insert_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;To answer these questions requires cranking back the time machine to June 2006, a few months after I joined the Hyper-V team. Remember June 2006 was two years before we shipped Hyper-V “v1” RTM, so code was in flux and in full-scale development. We didn't plan back then to ship UI to create new floppy disk media. So it made sense to include a blank floppy disk image in the installation (and yes, I was responsible – in fact, I created blank.vfd using Virtual Server IIRC – could have been Virtual PC though). That’s why we laid the file down during installation.&amp;nbsp; (Note: The UI can only create 1.44KB .VFDs, but you can still use Virtual PC to create 720KB .VFDs). &lt;/P&gt;
&lt;P&gt;We didn't want people deleting blank.vfd accidentally, or writing to it (as it otherwise wouldn’t be blank), so we set security on the file so that users and administrators didn’t have write permission. That’s why you get the ‘General access denied error’ inserting the media.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-perms_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-perms_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=floppy-perms border=0 alt=floppy-perms src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-perms_thumb.jpg" width=401 height=549 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVfloppytrivia_12FA0/floppy-perms_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Wind forward a few months more (I don’t recall exactly when), plans changed, and the Hyper-V UI was extended to include the ability to create a new floppy disk from the MMC (or the “browser” as it was called then – the name “Hyper-V” was still way off in the future).&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Things being what they can be, it was an oversight that the UI now provided the ability to create a blank VFD file, and we installed one. On to June 2008 when we RTM’d, blank.vfd was still being installed. I guess in retrospect we didn’t do a lot of testing using blank.vfd – our test automation for floppies created a new file as part of the test. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;The last question which cropped up was “Why does Hyper-V even have a floppy controller?”. There’s a couple of reasons. For compatibility with unsupported older operating systems, it’s often necessary to boot from a floppy to install the OS. There’s clearly no business case for this though. The main reason for including support for floppies is Windows Server 2003 full system backup which uses a floppy disk as part of a full system backup. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Do please let me know if you have alternate reasons for using the floppy disk controller in Hyper-V, or even still use physical floppy disks (somewhat) regularly. I’d hate to be the only one (but suspect I might)…. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3216397" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V energy drink</title><link>http://blogs.technet.com/jhoward/archive/2009/02/13/hyper-v-energy-drink.aspx</link><pubDate>Sat, 14 Feb 2009 02:33:33 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3202052</guid><dc:creator>jhoward</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3202052.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3202052</wfw:commentRss><description>&lt;p&gt;Just thought I'd add a quick blog entry - cool thing at the office today. Cans of Hyper-V ‘Pure Consolidated Energy for your Server’ turned up at our office this afternoon for the development team. Thank you marketing team! More info at &lt;a href="http://www.serverunleashed.com"&gt;www.serverunleashed.com&lt;/a&gt;&lt;img src="http://blogpics.dyndns.org/2009-jan-can-of-hyper-v.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVenergydrink_DAC9/IMAGE_004_2.jpg" target="_blank"&gt;&lt;img title="IMAGE_004" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="610" alt="IMAGE_004" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVenergydrink_DAC9/IMAGE_004_thumb.jpg" width="276" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Cheers (literally!),   &lt;br /&gt;John.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3202052" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V Resolving Event ID 4096</title><link>http://blogs.technet.com/jhoward/archive/2008/12/28/hyper-v-resolving-event-id-4096.aspx</link><pubDate>Sun, 28 Dec 2008 22:25:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3174126</guid><dc:creator>jhoward</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3174126.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3174126</wfw:commentRss><description>&lt;P&gt;Over the break I’ve been taking over Christmas, one of my goals was to move the remainder of my Virtual Server “production” VMs across to Hyper-V. But when nearing completion, I noticed that Server Manager was reporting a role error:&lt;IMG src="http://blogpics.dyndns.org/2008-dec-eventid-4096.jpg" mce_src="http://blogpics.dyndns.org/2008-dec-eventid-4096.jpg"&gt; &lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=2008-dec-eventid-4096[1] border=0 alt=2008-dec-eventid-4096[1] src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_thumb.jpg" width=5 height=5 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error" border=0 alt="Role Error" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error_thumb.jpg" width=405 height=91 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Looking at the detail of the event logs, it was Event ID 4096 from Hyper-V-Config saying that The Virtual Machines Configuration {GUID} at ‘{Directory}’ is no longer accessible: The system cannot find the path specified. (0x80070003)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error2" border=0 alt="Role Error2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2_thumb.jpg" width=416 height=207 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This is a pretty common error many people hit, and in my case it was due to some rearranging of directories and moving virtual machines around until I had it “just right” in terms of how I like to set my own servers up. By personal preference (nothing more), I like to keep the configurations, snapshots and VHDs for my virtual machines under a single directory on a per VM basis – in my case v:\virtual machines. However, when playing earlier with my new server, I’d been using the v:\vms directory (hence the specific error in the screenshot below).&lt;/P&gt;
&lt;P&gt;So in Hyper-V Manager, under Hyper-V Settings, I enter V:\Virtual Machines in the text boxes for both Virtual Hard Disks and Virtual Machine Configuration files.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error4" border=0 alt="Role Error4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4_thumb.jpg" width=407 height=90 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, when using the New Virtual Machine wizard, I check “Store the virtual machine in a different location” but keep the default directory set above, and get to the Connect Virtual Hard Disk step, the wizard populates the default directory for a new VHD in a sub-directory under V:\Virtual Machines named the same as the Virtual Machine.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error6" border=0 alt="Role Error6" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6_thumb.jpg" width=408 height=140 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you examine the directory structure of V:\Virtual Machines\Test after completing the wizard, you end up with this (if you also take a snapshot)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_1.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_1.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error7" border=0 alt="Role Error7" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_thumb_1.jpg" width=412 height=174 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Your VHD is in the main directory, and the configuration and snapshot data-root are under the Virtual Machines and Snapshots subdirectories under “Test” (or whatever you name your virtual machine). In other words, everything for that virtual machine is in a single location which was the primary intent.&lt;/P&gt;
&lt;P&gt;Anyway, (as I frequently do in my blog posts), I somewhat digress. Back to the Event ID 4096 which indicated there was a problem with V:\VMs, the original location I was using when moving virtual machines across from Virtual Server.&lt;/P&gt;
&lt;P&gt;If you navigate to \ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines on your system drive (note that ProgramData is a hidden directory), you’ll notice that there are a number of symbolic links to configuration files. There are two in the screenshot below (one being highlighted) which points to the V:\VMs\… directory.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error3" border=0 alt="Role Error3" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3_thumb.jpg" width=414 height=240 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So it’s a simple case of &lt;STRONG&gt;very carefully &lt;/STRONG&gt;deleting that or those links (just use the “del” command) which refer to the old directory, and cycling the VMMS service (net stop vmms, then, net start vmms). After this, the error will no longer be logged. Please be extremely mindful not to delete links referring to VMs you want to keep! Onwards with the rest of the migration now…&lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3174126" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>How to detect UAC elevation from VBScript</title><link>http://blogs.technet.com/jhoward/archive/2008/11/19/how-to-detect-uac-elevation-from-vbscript.aspx</link><pubDate>Wed, 19 Nov 2008 23:32:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3156553</guid><dc:creator>jhoward</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3156553.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3156553</wfw:commentRss><description>&lt;P&gt;While working on the next version of &lt;A href="http://blogs.technet.com/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx"&gt;HVRemote&lt;/A&gt; yesterday evening, one of the things I wanted to address based on feedback from various people was to have the tool (written in VBScript) detect whether it is being run from an elevated command prompt. While this is relatively easy to determine using low-level languages from the &lt;A href="http://msdn.microsoft.com/en-us/library/aa446671(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa446671(VS.85).aspx"&gt;GetTokenInformation&lt;/A&gt; API, this is not callable from VBScript without a helper. I couldn't find a pre-existing COM object in Windows Vista or Windows Server 2008 which indirectly exposed this API, or anything built in to the Windows Scripting Host. As I didn't want to ship HVRemote with a separate helper binary, I had to go digging for an alternate solution.....).&lt;IMG src="http://blogpics.dyndns.org/2008-nov-am-i-elevated.jpg" mce_src="http://blogpics.dyndns.org/2008-nov-am-i-elevated.jpg"&gt;&lt;/P&gt;
&lt;P&gt;The one thing I didn't want to do was to have the script try to do something active which might (or might not) work, returning some form of permission denied in the failure case. I wanted something passive. I discovered the &lt;A href="http://technet.microsoft.com/en-us/library/cc771299.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc771299.aspx"&gt;whoami&lt;/A&gt; command displays the &lt;A href="http://msdn.microsoft.com/en-us/library/aa965848(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/aa965848(VS.85).aspx"&gt;System Manadatory Label&lt;/A&gt;. So,&amp;nbsp;if you can see where this is heading, although&amp;nbsp;this can be classified as a "glorious hack", it's straight-forward to passively determine elevation through examining the output of whoami /all (or whoami /groups which is a little more terse and still gives the information we need). All you need to know is the &lt;A class="" href="http://msdn.microsoft.com/en-us/library/bb625963.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb625963.aspx"&gt;SID strings&lt;/A&gt; for integrity levels.&lt;/P&gt;
&lt;P&gt;I also discovered an interesting thing about the &lt;A href="http://msdn.microsoft.com/en-us/library/ateytk4a(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/ateytk4a(VS.85).aspx"&gt;Exec&lt;/A&gt; method of the Windows Scripting Host along the way, which certainly bemused me for a while. I drew a blank on it from Internet searching too. It appears that if the command being "Exec"'d has a lot of output (such as whoami /all), unless StdOut is drained, Exec blocks indefinitely. You learn something new every day :)&lt;/P&gt;
&lt;P&gt;Here's the sample script - save it as elevated.vbs and run as "cscript elevated.vbs". I've stripped the sample code down to a bare minimum to just demonstrate the logic - you should add the appropriate error handling if you take advantage of it in your own scripts. (Or download &lt;A class="" href="http://blogpics.dyndns.org/2008/nov/elevated.txt" mce_href="http://blogpics.dyndns.org/2008/nov/elevated.txt"&gt;here&lt;/A&gt; and rename to a .vbs extension)&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;Dim&lt;/SPAN&gt; oShell, oExec, szStdOut&lt;/PRE&gt;&lt;PRE&gt;szStdOut = &lt;SPAN class=str&gt;""&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;Set&lt;/SPAN&gt; oShell = CreateObject(&lt;SPAN class=str&gt;"WScript.Shell"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=kwrd&gt;Set&lt;/SPAN&gt; oExec = oShell.Exec(&lt;SPAN class=str&gt;"whoami /groups"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=kwrd&gt;Do&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;While&lt;/SPAN&gt; (oExec.Status = cnWshRunning) &lt;/PRE&gt;&lt;PRE class=alt&gt;   WScript.Sleep 100&lt;/PRE&gt;&lt;PRE&gt;   &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;not&lt;/SPAN&gt; oExec.StdOut.AtEndOfStream &lt;SPAN class=kwrd&gt;then&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;       szStdOut = szStdOut &amp;amp; oExec.StdOut.ReadAll&lt;/PRE&gt;&lt;PRE&gt;   &lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;Loop&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;&lt;SPAN class=kwrd&gt;select&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;case&lt;/SPAN&gt; oExec.ExitCode&lt;/PRE&gt;&lt;PRE&gt;   &lt;SPAN class=kwrd&gt;case&lt;/SPAN&gt; 0&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;not&lt;/SPAN&gt; oExec.StdOut.AtEndOfStream &lt;SPAN class=kwrd&gt;then&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;           szStdOut = szStdOut &amp;amp; oExec.StdOut.ReadAll                   &lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; instr(szStdOut,&lt;SPAN class=str&gt;"S-1-16-12288"&lt;/SPAN&gt;) &lt;SPAN class=kwrd&gt;Then&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;           wscript.echo &lt;SPAN class=str&gt;"Elevated"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;           &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; instr(szStdOut,&lt;SPAN class=str&gt;"S-1-16-8192"&lt;/SPAN&gt;)  &lt;SPAN class=kwrd&gt;Then&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;               wscript.echo &lt;SPAN class=str&gt;"Not Elevated"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;           &lt;SPAN class=kwrd&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;               wscript.echo &lt;SPAN class=str&gt;"Unknown!"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;           &lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;   &lt;SPAN class=kwrd&gt;case&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;else&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;not&lt;/SPAN&gt; oExec.StdErr.AtEndOfStream &lt;SPAN class=kwrd&gt;then&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;           wscript.echo oExec.StdErr.ReadAll&lt;/PRE&gt;&lt;PRE class=alt&gt;       &lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN class=kwrd&gt;end&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;select&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;.csharpcode {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	FONT-SIZE: small; COLOR: black; FONT-FAMILY: consolas, "Courier New", courier, monospace; BACKGROUND-COLOR: #ffffff
}
.csharpcode PRE {
	MARGIN: 0em
}
.csharpcode .rem {
	COLOR: #008000
}
.csharpcode .kwrd {
	COLOR: #0000ff
}
.csharpcode .str {
	COLOR: #006080
}
.csharpcode .op {
	COLOR: #0000c0
}
.csharpcode .preproc {
	COLOR: #cc6633
}
.csharpcode .asp {
	BACKGROUND-COLOR: #ffff00
}
.csharpcode .html {
	COLOR: #800000
}
.csharpcode .attr {
	COLOR: #ff0000
}
.csharpcode .alt {
	MARGIN: 0em; WIDTH: 100%; BACKGROUND-COLOR: #f4f4f4
}
.csharpcode .lnum {
	COLOR: #606060
}
&lt;/STYLE&gt;

&lt;P&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/elevated.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/elevated.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=130 alt=elevated src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/elevated_thumb.jpg" width=431 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/elevated_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/Not%20Elevated.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/Not%20Elevated.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=108 alt="Not Elevated" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/Not%20Elevated_thumb.jpg" width=433 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HowtodetectUACelevationinVBScript_A4B8/Not%20Elevated_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Hope someone finds this snippet useful, but as always, see my blog disclaimer.&lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3156553" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category></item><item><title>Configure Hyper-V Remote Management in seconds</title><link>http://blogs.technet.com/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx</link><pubDate>Sat, 15 Nov 2008 03:02:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3153568</guid><dc:creator>jhoward</dc:creator><slash:comments>189</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3153568.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3153568</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;Update 19th Nov - v0.3 now released!&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has been a little quiet on the blog front, but sometimes, at least in this case, I hope I've come up with something worth waiting for. Announcing "HVRemote"...., a tool to "automagically" configure Hyper-V Remote Management. (Amazing what can be done with a few days vacation to kill before you lose them at the end of the year....).&lt;IMG src="http://blogpics.dyndns.org/2008-nov-hvremote.jpg" mce_src="http://blogpics.dyndns.org/2008-nov-hvremote.jpg"&gt;&lt;/P&gt;
&lt;P&gt;I'm not going into the gory detail here as I've created a PDF containing the documentation, and a site on &lt;A href="http://code.msdn.microsoft.com/HVRemote" mce_href="http://code.msdn.microsoft.com/HVRemote"&gt;http://code.msdn.microsoft.com/HVRemote&lt;/A&gt; where you can download the tool and the documentation. All I ask, is that if you find the tool useful, drop me an email or a comment. Thanks!&lt;/P&gt;
&lt;P&gt;What does the tool do: It reduces the manual configuration steps needed for Hyper-V Remote Management that I blogged about back in March this year &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-1-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-1-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;1&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-2-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-2-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;2&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/30/part-3-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/30/part-3-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;3&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/04/01/part-4-domain-joined-environment-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/04/01/part-4-domain-joined-environment-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;4&lt;/A&gt; and &lt;A href="http://blogs.technet.com/jhoward/archive/2008/04/04/part-5-domain-client-to-workgroup-server-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/04/04/part-5-domain-client-to-workgroup-server-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;5&lt;/A&gt;&amp;nbsp;down to one or two commands.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It can configure Full installations and Server Core Installations of Windows Server 2008 with the Hyper-V role enabled, plus&amp;nbsp;configure Microsoft Hyper-V Server. It runs across all locales (I've tested English and Japanese) and it&amp;nbsp;doesn't matter if the server is domain or workgroup joined. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;It can configure Vista SP1 and Server 2008 configured with the Hyper-V Remote Management tools. Again, doesn't matter if the client is domain or workgroup joined.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Quick how-to:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. Server: To give or remove a user access permissions: &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /add:domain\user&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or &lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /remove:domain\user&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=293 alt=Add src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add_thumb.jpg" width=432 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;2. Server &amp;amp; Client: Display current settings (server or client): (Screenshot is client side) &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /show &lt;/STRONG&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=399 alt=showclient src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient_thumb.jpg" width=435 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;The other useful options are:&lt;/P&gt;
&lt;P&gt;3. Find out all the command line options: &lt;STRONG&gt;hvremote /help or hvremote /?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=415 alt=usage src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage_thumb.jpg" width=435 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage_thumb.jpg"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;and a couple of client side options: &lt;BR&gt;&lt;BR&gt;4. Client: Add firewall exception for MMC: &lt;STRONG&gt;hvremote /mmc:enable&lt;/STRONG&gt; &lt;BR&gt;5. Client: Allow anonymous access to Distributed COM: &lt;STRONG&gt;hvremote /AnonDCOM:grant&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I've tried this out with a a lot of test "guinea pigs" internally at Microsoft, and using the script literally dropped their remote configuration time down to seconds.&amp;nbsp;Hopefully it will&amp;nbsp;do the same for you.&lt;/P&gt;
&lt;P&gt;But I must also point you to&amp;nbsp;the disclaimer on my blog, the disclaimer in the documentation, and the license conditions at &lt;A href="http://code.msdn.microsoft.com/HVRemote" mce_href="http://code.msdn.microsoft.com/HVRemote"&gt;http://code.msdn.microsoft.com/HVRemote&lt;/A&gt; before use: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800000&gt;HVRemote and the associated documentation are provided "as-is". You bear the risk of using it. No express warranties, guarantees or conditions are provided. It is not supported or endorsed by Microsoft Corporation and should be used at your own risk.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3153568" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Downloads/default.aspx">Downloads</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V: Why does Hyper-V Manager not always work over VPN connection? Access Denied or RPC server unavailable errors.</title><link>http://blogs.technet.com/jhoward/archive/2008/08/07/hyper-v-why-does-hyper-v-manager-not-always-work-over-vpn-connection-access-denied-or-rpc-server-unavailable-errors.aspx</link><pubDate>Fri, 08 Aug 2008 07:55:51 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3102448</guid><dc:creator>jhoward</dc:creator><slash:comments>39</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3102448.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3102448</wfw:commentRss><description>&lt;p&gt;This post examines a problem several people have reported when running Hyper-V Remote Management tools over a VPN connection&amp;#160; - specifically hitting an error &amp;#8220;Access denied. Unable to establish communication between &amp;#8216;SERVER&amp;#8217; and &amp;#8216;CLIENT&amp;#8217;&amp;#8221;. In some variations, I&amp;#8217;ve seen RPC errors such as &amp;#8220;RPC server unavailable. Unable to establish communication between &amp;#8216;SERVER&amp;#8217; and &amp;#8216;CLIENT&amp;#8217;.&amp;#8221;&lt;img src="http://blogpics.dyndns.org/2008-aug-VPN-remote-management-dns-issue.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn1_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="119" alt="vpn1" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn1_thumb.jpg" width="435" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;And an example of an RPC error case:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn2_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="133" alt="vpn2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn2_thumb.jpg" width="440" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To be explicit up front, I am talking about this only occurring over a VPN/RAS connection &amp;#8211; when connected using a wired or wireless connection without VPN, everything works normally. If things are not working on wired/wireless, follow my series of remote management posts to configure everything first.&amp;#160; &lt;br /&gt;    &lt;br /&gt;Diagnosing the issue took a bit of sleuthing. So let&amp;#8217;s dive in. A big clue is in the first message &amp;#8211; it implies there is some form of communication between the Hyper-V enabled server and the Remote Management client. Indeed, that is correct &amp;#8211; there is a DCOM callback. So let&amp;#8217;s start by looking at the IP configuration on the laptop machine I&amp;#8217;m using for this walkthrough after the VPN connection has been established.     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="193" alt="vpn3" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn3_3.jpg" width="441" border="0" /&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;Note that the DHCP assigned address for the VPN connection is 192.168.200.6, and the DHCP assigned address for the Internet connection is 192.168.1.119.     &lt;br /&gt;    &lt;br /&gt;Let&amp;#8217;s run a network trace network trace on the Hyper-V enabled server to see what&amp;#8217;s going on. I&amp;#8217;m running the network trace while starting Hyper-V Manager on the laptop:     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="198" alt="vpn4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn4_3.jpg" width="428" border="0" /&gt;     &lt;br /&gt;The two highlighted lines show that the Hyper-V enabled server is making an attempt to connect to my local wireless IP address on my broadband connection, 192.168.1.119, rather than the DHCP assigned IP address for my machine on the internal network, 192.168.200.6.     &lt;br /&gt;    &lt;br /&gt;What&amp;#8217;s also interesting in the trace are ARP packets from the Hyper-V enabled server at 192.168.200.218 to &amp;#8220;HPCRAPTOP&amp;#8221;:     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn5_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="105" alt="vpn5" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn5_thumb.jpg" width="431" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Notice that the server is asking where 192.168.200.14 is, and netmon is resolving 192.168.200.14 to the IP address of the laptop. So that indicates all is not well with DNS since we know above that the DHCP assigned address on the VPN connection is 192.168.200.6. Let&amp;#8217;s do an nslookup to examine the DNS entry for the laptop.     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="123" alt="vpn6" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn6_3.jpg" width="365" border="0" /&gt;     &lt;br /&gt;    &lt;br /&gt;Indeed, the laptop from a DNS perspective is incorrect and explains why netmon is resolving 192.168.200.14 to my laptop. (Although I didn&amp;#8217;t mention it, I happen to know that this DNS entry, 192.168.200.14, was the IP address assigned to the laptop when it was last connected directly to the internal network.)     &lt;br /&gt;    &lt;br /&gt;So as an experiment and first workaround, let&amp;#8217;s edit \windows\system32\drivers\etc on the Hyper-V enabled server to add an entry for my laptop as 192.168.200.6, the current IPv4 address for VPN and see what happens.     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="127" alt="vpn7" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn7_3.jpg" width="431" border="0" /&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn8_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="113" alt="vpn8" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn8_thumb.jpg" width="426" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;Yes, that works. But it&amp;#8217;s hardly what I could describe as a desirable or every-day-workable solution. If you&amp;#8217;re walking through with me, remember to remove that entry hosts to see if there are any other workarounds.     &lt;br /&gt;    &lt;br /&gt;Well there is one interesting workaround which I mentioned in my remote management configuration series. However, I absolutely do NOT recommend this one unless you really need to as you are lowering the security of your machine. Changing this setting is NOT necessary for remote management in a domain environment, but it is in a workgroup environment (my home environment I&amp;#8217;m using for this is domain based).&amp;#160; Here are the settings to change in dcomcnfg on the management client:     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="415" alt="vpn9" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn9_3.jpg" width="346" border="0" /&gt;     &lt;br /&gt;    &lt;br /&gt;Why this works is related to WMI/DCOM fallback, but I&amp;#8217;m far from claiming to be an expert here and will walk swiftly away from any further explanation. However, I re-iterate, I absolutely do not recommend you change this setting unless you need to.     &lt;br /&gt;So let&amp;#8217;s step back a bit now and try and understand a bit more about the DNS issue. The obvious thing to think may be to run &amp;#8220;ipconfig /registerdns&amp;#8221; from an elevated command prompt on the remote management machine to correct the DNS registration. Let&amp;#8217;s see what happens, while at the same time running a network trace on the ISA server with a filter for just the DNS protocol.&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn10_4.jpg" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="258" alt="vpn10" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn10_thumb_1.jpg" width="433" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;If you&amp;#8217;re ahead of the game, you may notice this is a very interesting capture! Maybe not if you&amp;#8217;re aware of my home setup, so let me explain why. 192.168.15.2 is the external internet address of my ISA server (in turn connected to a VOIP router). The destination being resolved to a host with name starting &amp;#8216;ns&amp;#8217; is my ISP&amp;#8217;s DNS server. Looking at the frame details, you can see the packet is a DNS update request for the laptop. Unsurprisingly, if you look at the response from the ISP in packet 3949, the response is &amp;#8220;NotAuth&amp;#8221;. Afterall, they&amp;#8217;re not authoritative for DNS of my domain. I am!     &lt;br /&gt;    &lt;br /&gt;This routing to the external network through ISA is normal expected behaviour. So I&amp;#8217;m still yet to find a good solution. But all is not lost (of course). Let&amp;#8217;s take a different tactic and look a little closer at the Vista SP1 inbox VPN client configuration (as in one which hasn&amp;#8217;t been created by what-ever the equivalent of CMAK, or Connection Manager Administration Kit, for Vista &amp;#8211; and no, I&amp;#8217;ve no idea what the replacement technology is. But it does remind me to do some research for another day....).     &lt;br /&gt;    &lt;br /&gt;I&amp;#8217;m assuming you&amp;#8217;re already familiar with configuring a PPTP or L2TP VPN connection in Vista &amp;#8211; that&amp;#8217;s a little outside of the scope of this post. But here&amp;#8217;s the IPv4/Properties/Advanced/DNS dialog tab of the VPN connection I&amp;#8217;ve created to connect back to my home network. Look at the bottom three items relating to DNS registration:     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="452" alt="vpn11" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn11_3.jpg" width="381" border="0" /&gt;     &lt;br /&gt;    &lt;br /&gt;Hmmmm. These look extremely promising . Logically, it sounds like I want all three: I want to specify a DNS suffix for this connection which is that of my internal domain; Yes, I want to register the connection&amp;#8217;s address in DNS; and I&amp;#8217;d like to use the DNS suffix in the DNS registration. So I changed it to look like this:     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="449" alt="vpn12" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn12_3.jpg" width="379" border="0" /&gt;     &lt;br /&gt;After saving the changes, let&amp;#8217;s run that DNS-filtered network trace on the ISA server again while re-establishing the VPN connection:     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn13_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="247" alt="vpn13" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn13_thumb.jpg" width="426" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Looks good as a DNS update was sent to the internal DNS servers, not to the external ISP. It shows the update for the IPv4 address of the remote management client as 192.168.200.4 with a success response in the following packet. And ipconfig on the client?     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="vpn14" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn14_3.jpg" width="427" border="0" /&gt;     &lt;br /&gt;This confirms the trace above &amp;#8211; the remote management client has IP address 192.168.200.4. What about an nslookup of the laptop?     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="92" alt="vpn15" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn15_3.jpg" width="416" border="0" /&gt;     &lt;br /&gt;Excellent. Everything is looking rosey &amp;#8211; the DHCP assigned IP address of the laptop acquired from the VPN connection is in DNS on the internal servers. Therefore, the Hyper-V enabled server should be able to locate the laptop when making it&amp;#8217;s DCOM callback, so let&amp;#8217;s fire up Hyper-V manager and see what happens:     &lt;br /&gt;    &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="168" alt="vpn16" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhydoesHyperVManagernotalwayswork_13416/vpn16_3.jpg" width="436" border="0" /&gt;     &lt;br /&gt;Voila! Hope you found that useful.     &lt;br /&gt;    &lt;br /&gt;Cheers,     &lt;br /&gt;John.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3102448" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Desktop+Operating+Systems/default.aspx">Desktop Operating Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Network+Infrastructure+Systems/default.aspx">Network Infrastructure Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Do I have the latest BIOS installed? (And a cheap laptop repair)</title><link>http://blogs.technet.com/jhoward/archive/2008/08/03/do-i-have-the-latest-bios-installed-and-a-cheap-laptop-repair.aspx</link><pubDate>Sun, 03 Aug 2008 21:45:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3097837</guid><dc:creator>jhoward</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3097837.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3097837</wfw:commentRss><description>&lt;p&gt;For Hyper-V to operate correctly, it is strongly advised, and in many cases, required, to install the latest BIOS onto your hardware for hardware virtualization features to operate correctly.&lt;img src="http://blogpics.dyndns.org/2008-aug-latest-bios.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;While some OEMs provide fantastic information, my experience is that all too often, you get frustratingly minimal information about BIOS updates:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A release date&lt;/li&gt;    &lt;li&gt;A version number&lt;/li&gt;    &lt;li&gt;Verbiage like &amp;#8220;This improves stuff&amp;#8221;. &lt;font color="#808080"&gt;(Thanks. Really helpful!)&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;What they don&amp;#8217;t generally tell you is what you really wanted to know:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Do I need it?&lt;/li&gt;    &lt;li&gt;What will it mend or break?&lt;/li&gt;    &lt;li&gt;How do I tell whether I already have this version?&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;While most folks would need psychic powers to answer the first of those two, this off-topic post focuses on the last question.&lt;/p&gt;  &lt;p&gt;Why is this relevant? As it happens, I was rummaging through drawers a couple of days back as we're moving offices at work, and stumbled across a very old laptop of mine. I figured it was worth trying to revive &amp;#8211; it had a few problems with overheating and a noisy fan which was why it had been ignored for so long. I stripped it down (there&amp;#8217;s frighteningly useful information on the Internet for this), removed the CPU cooler and found the fan blades had been scraping the casing (in fact, it had worn a groove in the metal). &lt;/p&gt;  &lt;p&gt;The choice was around $70+ for a replacement, or a bit of packing material and a clean with the Hoover.&amp;#160; That was a really tough decision when the laptop is worth little more than $70 and was already on its way out to pasture. So a bit of thermal grease before re-installing the cooler and reassembly to see whether things had improved. (Amazingly, without a single screw left over! Way ahead of my track record or expectations.)&lt;/p&gt;  &lt;p&gt;Sure, the laptop ran. In fact, I&amp;#8217;m typing this post on it now. The fan was much quieter due to not scraping any more, but it was still permanently running, even when idle. It was still was on the noisy side, but that&amp;#8217;s cheap mechanics for you. Next stop then was the BIOS, the whole point of this post.&lt;/p&gt;  &lt;p&gt;Off to the Internet to find a new BIOS was released a year or so back. I knew that this laptop hadn&amp;#8217;t been turned on in way over a year, so it was out of date for sure. But how would most users would know what version of the BIOS they currently have? I came up with four ways &amp;#8211; I&amp;#8217;m sure there&amp;#8217;s plenty more. &lt;/p&gt;  &lt;p&gt;1) msinfo32&amp;#160; &lt;br /&gt;&amp;#160;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="BIOS1" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS1_6.jpg" width="441" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;2) The registry &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="BIOS2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS2_6.jpg" width="446" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;3) Query WMI either through a script, scriptomatic, or a built in tool called wbemtest. Hit connect and select root\cimv2. Hit the query button and enter &amp;#8220;select *from win32_bios&amp;#8221; and apply. Double click the returned result and hit &amp;#8220;Show MOF&amp;#8221;&lt;/p&gt;  &lt;p&gt;4) Reboot the machine, and examine the BIOS splash screen (some computers), or enter BIOS setup and it will be in there somewhere usually. &lt;/p&gt;  &lt;p&gt;&lt;font color="#808080"&gt;(Which then got me sidetracked and I found one computer which didn&amp;#8217;t tell me anywhere what version was installed. But fair enough, I think the way to update it is to rip out an EPROM and shove it in a burner. A sticker told me the version instead though. Classic computing!).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;But back to the plot&amp;#8230; Alas, on the laptop, the BIOS updater didn&amp;#8217;t run under Vista. Uuuuurgh. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="97" alt="BIOS4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS4_3.jpg" width="432" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Problem solved with a separate disk and a temporary XP installation, but why on earth this particular OEM requires a separately downloaded program be installed to flash the BIOS, I&amp;#8217;ll never know&amp;#8230;&amp;#160; &lt;/p&gt;  &lt;p&gt;And did the BIOS update fix the fan running permanently? Sadly, not that I could notice except when first turned on. But the CPU temperature at idle was around 3 degrees cooler, so the new thermal paste probably helped. But as always, it was &amp;#8220;fun&amp;#8221; finding these things out &amp;#8230;. Now to &lt;a href="http://bozthx.blogspot.com/2008/07/new-java-jre-7.html" target="_blank"&gt;get&lt;/a&gt; &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6635144" target="_blank"&gt;rid&lt;/a&gt; of Java JRE 7 on it. Uuuuurgh (again).&amp;#160; &lt;/p&gt;  &lt;p&gt;Cheers,   &lt;br /&gt;John.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3097837" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_+Rambling/default.aspx">Misc Factoids &amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>How to remove a failed server from DFS in Windows Server 2003 R2</title><link>http://blogs.technet.com/jhoward/archive/2006/05/20/how-to-remove-a-failed-server-from-dfs-in-windows-server-2003-r2.aspx</link><pubDate>Sat, 20 May 2006 18:12:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:429588</guid><dc:creator>jhoward</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.technet.com/jhoward/comments/429588.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=429588</wfw:commentRss><description>&lt;P&gt;This week has been a little strained, hence quiet on the blogging front. Apart from a hectic week at work (more to follow on that shortly), the reason was a "disaster" which happened late last Sunday evening - everything was working at home one moment, and dead the next. &lt;/P&gt;
&lt;P&gt;Since the move over from the UK, I'm still in temporary accomodation. To save space, although my servers were couriered over, I didn't bring a monitor as all the monitors I owned only ran on 240v. The servers arrived a little shaken, but not too stirred - a few cards were loose, but no failed disks. Just a little prodding into place and they came back perfectly. Humming away for 6 weeks or so without fault.&lt;/P&gt;
&lt;P&gt;If you've ever tried to figure out why a machine won't boot without a monitor attached, I know where you're coming from. Short answer is, it's next to impossible. It also happened that this machine was not just any machine, but a Domain Controller. And not just any domain controller, the domain controller holding all the FSMO roles for my home domain. Of course, it will probably come as no surprise to you it's also running a further 5 virtual machines including my website hosting, ISA and Exchange. So yes, it was somewhat of a disaster.&lt;/P&gt;
&lt;P&gt;On Monday morning, I took the machine into the office and with a monitor attached, it was obvious it was continually rebooting (off both plexes in the boot mirror) before the GUI portion of the boot came up. Safe mode, last known good gave same symptoms. Similarly, boot logging didn't help as the boot log doesn't get written to disk until the GUI part of the boot comes up.&lt;/P&gt;
&lt;P&gt;I borrowed another disk from &lt;A href="http://blogs.msdn.com/virtual_pc_guy" mce_href="http://blogs.msdn.com/virtual_pc_guy"&gt;Ben&lt;/A&gt;, plugged it in and installed XP SP2 (only 32 bit OS immediately to hand). However, during the first boot, it blue-screened. Sure enough, there was a problem with the hardware - either motherboard or memory.&lt;/P&gt;
&lt;P&gt;Running a memory tester showed something wrong with one or more of the (expensive!) ECC memory slots. I saw a big bill coming :(. It was a tedious process of elimination by swapping DIMMs around until the failed chip or chips was identified. That at least got to the point of XP booting. Attempting to boot back with the failed DIMM removed (actually a pair as the system needs matched pairs), same symptoms as before. At this point, going back to XP, I discovered XP didn't have drivers for the RAID SCSI Controller for the system boot disk and worse, none were available. Onto plan B for recovery.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;I re-installed a Windows Server 2003 on the loan disk with the recovery console enabled to attempt to see what was going on. Chkdsk showed the SCSI disks being corrupt and the mirror needing repair. Fixing those still wasn't getting past the text mode part of the boot.&lt;/P&gt;
&lt;P&gt;Not being one to give up, I took the machine home on Monday night. During the day, my wife had bought a second hand 17" monitor for $20.00 - given it's in next to perfect condition, I thought that was pretty good value. &lt;/P&gt;
&lt;P&gt;From the recovery console of Windows Server installed on the loan disk, I spent two very long and tedious evenings going through disabling drivers one-by-one in the hope I'd find the driver failing to load - every time the same 0x0000007b with 0xc000007b in the parameter list - inaccessible_boot_disk.&lt;/P&gt;
&lt;P&gt;Well, two days later I did give up. In some ways I'm glad I did - when I took the decision to blow away the machine for real, I discovered the disks were also corrupt in some way - both of them. Blue screens on reinstall. Possibly the RAID controller? Nope, tried a spare one too :( Anyway, I've more disks on order and more memory on order - at least they're much cheaper in the US than in the UK.&lt;/P&gt;
&lt;P&gt;In the meantime, with reduced RAM, on the loan disk I at least got the ISA server and the Exchange server back running. Cleaning up AD to seize the FSMO roles which were held by the previous installation is easy enough (&lt;A href="http://support.microsoft.com/?id=255504" mce_href="http://support.microsoft.com/?id=255504"&gt;http://support.microsoft.com/?id=255504&lt;/A&gt;). They're now safely on a Virtual domain controller running on another server.&lt;/P&gt;
&lt;P&gt;However, there was one interesting side effect relating to DFS in Windows Server 2003 R2. Yes, the machine also was a file server replicating to another server using RDC using domain based DFS. Some of the DFS roots had the now decommissioned server as the preferred target. What this unfortunately means is that when you go into the DFS console from another machine (either another server or from an XP machine with the console installed), when examining the DFS Root, you get the error below: &lt;A href="file://domain.com/share" mce_href="file://domain.com/share"&gt;\\domain.com\share&lt;/A&gt;: The namespace cannot be queried. The RPC server is unavailable. &lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.msblogcasts.com/jhoward/dfsrpsunavailable.jpg" mce_src="http://www.msblogcasts.com/jhoward/dfsrpsunavailable.jpg"&gt;&lt;/P&gt;
&lt;P&gt;This only happens on roots which were configured to have the failed server as the preferred target. Clients were still OK accessing the still working server as they failed over automatically&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.msblogcasts.com/jhoward/dfsclientfailover.jpg" mce_src="http://www.msblogcasts.com/jhoward/dfsclientfailover.jpg"&gt;&lt;/P&gt;
&lt;P&gt;So, from the File Server Management Console, you're stuck - you can't remove the failed server. However, you can use the command line utility, dfsutil to forceably remove it.&lt;/P&gt;
&lt;P&gt;First, run &lt;FONT face="Courier New" size=2&gt;dfsutil /root:\\domain.com\share /export:share.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Share.txt will look something like&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;BR&gt;&amp;lt;Root Name="&lt;/FONT&gt;&lt;A href="file://domain/Share" mce_href="file://DOMAIN/Share"&gt;&lt;FONT face="Courier New" size=2&gt;\\DOMAIN\Share&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New" size=2&gt;" State="1" Timeout="300" &amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;Target Server="FAILEDSERVER" Folder="Share" State="2"/&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;Target Server="GOODSERVER" Folder="Share" State="2"/&amp;gt;&lt;BR&gt;&amp;lt;/Root&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;To delete the failedserver, and remember this is a last ditch thing, run (on one line)&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;dfsutil /unmapftroot /root:\\domain\share &lt;BR&gt;/server:failedserver /share:share&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You're now close. To make this work, you must have access to the share on a good server. You must also bounce (at least I had to) the DFS Replication service on the good server AND restart the File Server Management Console. However, once done, everything will be good again. Just need to re-introduce the new server once the new disks arrive.&lt;/P&gt;
&lt;P&gt;So now you know one reason why it's been a quiet week of blogging!&lt;BR&gt;Cheers,&lt;BR&gt;John.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=429588" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Network+Infrastructure+Systems/default.aspx">Network Infrastructure Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2003/default.aspx">Windows Server 2003</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category></item><item><title>Improved Generic Exchange Backup Script</title><link>http://blogs.technet.com/jhoward/archive/2005/11/04/improved-generic-exchange-backup-script.aspx</link><pubDate>Sat, 05 Nov 2005 04:36:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:413678</guid><dc:creator>jhoward</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/jhoward/comments/413678.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=413678</wfw:commentRss><description>&lt;P&gt;So after numerous emails about this, and some comments on my previous &lt;A href="http://blogs.technet.com/jhoward/archive/2005/06/29/406876.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2005/06/29/406876.aspx"&gt;blog post back in June&lt;/A&gt;, I spent a couple of hours this afternoon improving the backup script (which although was written as a generic Exchange backup script, is suitable for file system, system state and more - it just depends entirely what you set the selection criteria as). I've got it running now at home great, so it's worth sharing to the bigger audience now.&lt;/P&gt;
&lt;P&gt;The biggest request I had was for email notification if an error occurs. Sending an email is simple (honestly). However, I didn't just want to send any old boring email, I wanted to utilise some of the more advanced features capable in Outlook, and show you how you can use the extended version of CDO for Exchange (CDOEx) rather than CDO. That having been said, to keep it generic and so that this script would run on &lt;EM&gt;any&lt;/EM&gt; Windows Server, I ended up using CDO and SMTP rather than the more advanced capabilities of CDOEx. I've left the CDOEx code in there if you want to go that route, and I have tested it and it does work, so is a good example if you need it. The advanced features are so that the message flag is set to highlight some action is required. It is complicated due to timezone issues, but I think they're pretty well sust, so it should work all the way from Seattle to Sydney.&lt;/P&gt;
&lt;P&gt;Here's an example of what I mean by "advanced" - notice that the email is red, and flagged with a follow-up&amp;nbsp;action&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogpics.dyndns.org/backupfailureexample.jpg" mce_src="http://blogpics.dyndns.org/backupfailureexample.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Here's the revised script. I have a question though for someone &lt;EM&gt;really&lt;/EM&gt; techy which I just can't find the answer to. I'll post a followup entry shortly. Cut/Paste and save as backup.vbs. Generate your Windows Backup selection file as before, and change the series of constants at the top of the file according to your needs - recipients for error emails, SMTP servers etc. Note that I haven't tested anything &lt;EM&gt;except&lt;/EM&gt; anonymous SMTP drop.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;' ************************************************************************************&lt;BR&gt;' * Weekly Backup Script for Exchange&lt;BR&gt;' * John Howard, Microsoft UK. Created 25th June 2005&lt;BR&gt;' * History:&lt;BR&gt;' *&amp;nbsp; 04 Nov 2005 - Added Email Sending on Failure (see inline comments)&lt;BR&gt;' * &lt;BR&gt;' * Feel free to use/modify for your own needs. &lt;BR&gt;' * No guarantees though although it works for me :-)&lt;BR&gt;' * However, if you can do better, contact me through &lt;A href="http://blogs.technet.com/jhoward"&gt;http://blogs.technet.com/jhoward&lt;/A&gt;&lt;BR&gt;' ************************************************************************************&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Option Explicit&lt;BR&gt;On error resume next&lt;BR&gt;Const NO_ERROR = 0&lt;BR&gt;Const BACKUP_PROGRAM&amp;nbsp;&amp;nbsp; = "c:\windows\system32\ntbackup.exe "&lt;BR&gt;Const cdoImportance&amp;nbsp;&amp;nbsp;&amp;nbsp; = "urn:schemas:httpmail:importance"&lt;BR&gt;Const cdoHigh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 2 ' Importance&lt;BR&gt;Const cdoAnonymous&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0&lt;BR&gt;Const cdoBasic&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1&lt;BR&gt;Const cdoNTLM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 2&lt;BR&gt;Dim&amp;nbsp;&amp;nbsp; SMTP_AUTH&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;' TAILOR THESE NEXT CONSTANTS TO YOUR REQUIREMENTS&lt;BR&gt;Const DEFAULT_SENDER&amp;nbsp;&amp;nbsp; = "Backup Job &amp;lt;&lt;A href="mailto:servername@contoso.com"&gt;servername@contoso.com&lt;/A&gt;&amp;gt;"&lt;BR&gt;Const DEFAULT_RECIP&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;A href="mailto:user@contoso.com"&gt;user@contoso.com&lt;/A&gt;"&lt;BR&gt;Const DEFAULT_SUBJECT&amp;nbsp; = "Backup Failure on Exchange!"&lt;BR&gt;Const SMTP_SERVER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "exchange.contoso.com"&lt;BR&gt;Const SMTP_PORT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; 25&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SMTP_AUTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = cdoAnonymous&amp;nbsp; ' Choose one of the above&lt;BR&gt;Const SMTP_TIMEOUT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 60 ' Seconds to wait for SMTP Server&lt;BR&gt;Const MESSAGE_FLAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "URGENT: Backup Job has failed"&lt;BR&gt;Const BACKUP_SHARE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "&lt;A href="file://remoteserver/ExchangeBackups"&gt;\\RemoteServer\ExchangeBackups&lt;/A&gt;"&lt;BR&gt;Const BACKUP_SELECTION = "Exchange Backup Selection.bks"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT face="Courier New" size=2&gt;
&lt;P&gt;&lt;BR&gt;Dim szYYWW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Date in YYYY-WW format (Week of year)&lt;BR&gt;Dim szYYMMDD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Date in YYYY-MM-DD format&lt;BR&gt;Dim szFlagsSelection&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' The backup selection script, prepopulated&lt;BR&gt;Dim szSetDescription&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' The description of the backup set&lt;BR&gt;Dim szDestinationFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' The destination file in the destination directory&lt;BR&gt;Dim szFlagsJobName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for the name of the job&amp;nbsp; [/j "jobname")&lt;BR&gt;Dim szFlagsVerify&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for verify the backup&amp;nbsp;&amp;nbsp;&amp;nbsp; [yes|no]&lt;BR&gt;Dim szFlagsRemoteStorage&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for remote storage&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/rs:no|yes]&lt;BR&gt;Dim szFlagsHardwareCompress&amp;nbsp;&amp;nbsp; ' Flags for hardware compression [/hc:off|on]&lt;BR&gt;Dim szFlagsLogging&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for logging in ntbackup&amp;nbsp; [/l:f|s|n] Full SUmmary None&lt;BR&gt;Dim szFlagsAppend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for appending data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/a] or nothing&lt;BR&gt;Dim szFlagsRestrict&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for restricting access&amp;nbsp;&amp;nbsp; [/r:yes|no]&lt;BR&gt;Dim szFlagsType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for backup type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/m normal|Incremental|Differential...]&lt;BR&gt;Dim szFlagsTapeName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Flags for name of tape &lt;BR&gt;Dim oFSO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' File System Object to see if file already exists&lt;BR&gt;Dim owShell&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' To execute a shell command&lt;BR&gt;Dim rc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Return code&lt;BR&gt;Dim szError&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' If we have an error, record it in here&lt;BR&gt;Dim szCommandLine&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' What we are going to run as a backup&lt;BR&gt;Dim szUTC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' UTC Date/Time for SMTP Reply-By field &lt;/P&gt;
&lt;P&gt;Set oFSO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Nothing&lt;BR&gt;set owShell&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Nothing&lt;BR&gt;rc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = NO_ERROR&amp;nbsp; ' OK So far&lt;BR&gt;szCommandLine&amp;nbsp;&amp;nbsp; = ""&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Not sure what we're running yet&lt;BR&gt;szError&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ""&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Not had an error yet&lt;/P&gt;
&lt;P&gt;' Setup our variables&lt;BR&gt;if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szYYWW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = year(now()) &amp;amp; " w" &amp;amp; formatNumber(DatePart("WW",now()))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szYYMMDD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = year(now()) &amp;amp; "-" &amp;amp; formatNumber(month(now())) &amp;amp; "-" &amp;amp; formatNumber(day(now()))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsSelection&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = chr(34) &amp;amp; "@" &amp;amp; BACKUP_SHARE &amp;amp; "\" &amp;amp; BACKUP_SELECTION &amp;amp; chr(34)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsJobName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/j " &amp;amp; chr(34) &amp;amp; "Exchange Backup" &amp;amp; chr(34)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsVerify&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/v:yes"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Verify YES|NO&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsRemoteStorage&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/rs:no" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsHardwareCompress&amp;nbsp; = "/hc:off"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Hardware compression off - this is to disk&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsLogging&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/l:f"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' f=full s=summary n=none&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsAppend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/a"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' /a for Append or leave blank to overwrite&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsRestrict&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/r:no"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' no|yes Restrict access to administrators&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsTapeName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/t:Exchange " &amp;amp; szYYWW&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szDestinationFile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "Exchange " &amp;amp; szYYWW &amp;amp; ".bkf"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szSetDescription&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/d " &amp;amp; chr(34) &amp;amp; "Created " &amp;amp; szYYMMDD &amp;amp; chr(34)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szUTC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = GetUTCSMTPDateString()&lt;BR&gt;end if&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;' Instantiate File System Object&lt;BR&gt;if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oFSO = CreateObject("Scripting.FileSystemObject")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (err.number) or (oFSO is nothing) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = -1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szError = "Failed Creating FSO: " &amp;amp; err.description &amp;amp; " -0x" &amp;amp; hex(err.number)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;end if&lt;/P&gt;
&lt;P&gt;' Look to see if the file exists to determine the backup type&lt;BR&gt;if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not oFSO.FileExists(BACKUP_SHARE &amp;amp; "\" &amp;amp; szDestinationFile) then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Normal | Copy | Differential | Incremental&amp;nbsp; Backup Type&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/m normal "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsAppend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ""&amp;nbsp; ' Don't Append if does not exist&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' File exists, so incremental backup. We are already in Append mode&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "/m incremental "&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szSetDescription&amp;nbsp; = "/d " &amp;amp; chr(34) &amp;amp; "Inc " &amp;amp; szYYMMDD &amp;amp; chr(34)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Release File SYstem Object&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oFSO = Nothing&lt;BR&gt;end if&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;' Create a Shell Object to be able to run the backup executable&lt;BR&gt;if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set owShell = wscript.createobject("wscript.shell")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (err.number) or (owShell is nothing) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = -2&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szError = "Failed Creating wscript.shell: " &amp;amp; err.description &amp;amp; " -0x" &amp;amp; hex(err.number)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;end if&lt;/P&gt;
&lt;P&gt;' Build the backup command and run it&lt;BR&gt;if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szCommandLine&amp;nbsp; = BACKUP_PROGRAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "backup"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsSelection&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szSetDescription &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "/f " &amp;amp; chr(34) &amp;amp; BACKUP_SHARE &amp;amp; "\" &amp;amp; szDestinationFile &amp;amp; chr(34) &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsAppend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsLogging&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsVerify&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsRestrict&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsRemoteStorage&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsHardwareCompress &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFlagsJobName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; " "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc=owshell.run(szCommandLine,,True)&lt;BR&gt;end if&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;set owShell = Nothing&lt;BR&gt;if (rc) Then SendErrorEmail&lt;BR&gt;wscript.quit(rc)&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Function FormatNumber(szIn)&lt;BR&gt;&amp;nbsp;&amp;nbsp; FormatNumber = szIn&lt;BR&gt;&amp;nbsp;&amp;nbsp; if len(szIn) = 1 then FormatNumber = "0" &amp;amp; szIn&lt;BR&gt;End Function&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;' Function Added: JJH 04 Nov 2005&lt;BR&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;' For Sending an Email. We have the option to use send using exchange, but&lt;BR&gt;' this can only be done on the Exchange server itself and requires CDOEx which&lt;BR&gt;' is only installed on an Exchange Server. However CDO (CDOSys in old speak) is&lt;BR&gt;' also installed on any Windows 2003 Server, and is a subset of CDOEx, we can&lt;BR&gt;' use SMTP to send from any server pointing towards our Exchange Server.&lt;BR&gt;' HOWEVER: It is nice to be able to get a reminder in Outlook to say that &lt;BR&gt;' we need to do something rather than just an email. This requires an additional&lt;BR&gt;' message header Reply-By which is in the Format (eg) Fri, 4 Nov 2005 15:23:08 -0000.&lt;BR&gt;' Now, rather than mess around with timezones etc, I just use UTC. Seems to work, &lt;BR&gt;' but it probably also helps that I'm in the UK so don't have to worry too much&lt;BR&gt;' about timezones generally :-) However, appreciate many people may use this&lt;BR&gt;' who are outside of UK, so best to make an effort!&lt;BR&gt;'&lt;BR&gt;' Note: We also fail safe to assume no time bias if we can't read registry&lt;BR&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;Function GetUTCSMTPDateString()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dtUTC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' UTC Date&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim szUTC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' UTC Date string in SMTP RFC Format&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oShell&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' To read registry&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim szATBRegKey&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Registry key for Active Time Bias&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim lMinutesOffset ' From UTC&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Function return&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; On error resume next&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szATBRegKey = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lMinutesOffset = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (NO_ERROR = rc) Then&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oShell = CreateObject("WScript.Shell") &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (err.number) or (oShell = Nothing) Then rc = -1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lMinutesOffset = oShell.RegRead(szATBRegKey) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (err.number) then &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = -1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lMinutesOffset = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Regardless of error, we do the formatting (default to zero offset)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtUTC = dateadd("n", lMinutesOffset, now()) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szUTC = WeekdayName(Weekday(dtUTC),True) &amp;amp; ", " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(dtUTC) &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(Month(dtUTC),True) &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(dtUTC) &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FormatNumber(Hour(dtUTC)) &amp;amp; ":" &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FormatNumber(Minute(dtUTC)) &amp;amp; ":" &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FormatNumber(Second(dtUTC)) &amp;amp; " " &amp;amp; _&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "-0000"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oShell = Nothing&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear ' Don't pass any error back as we will have _something_&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetUTCSMTPDateString = szUTC&lt;/P&gt;
&lt;P&gt;End Function&lt;/P&gt;
&lt;P&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;' Function Added: JJH 04 Nov 2005&lt;BR&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;' There are several solutions to sending email. We _could_ use CDOEx, but we need&lt;BR&gt;' to be running on an Exchange Server to do this. While you might say "But this is&lt;BR&gt;' a generic Exchange backup program, so of course it's running on an Exchange Server",&lt;BR&gt;' remember although I built it for Exchange backups, it's still pretty generic and&lt;BR&gt;' can be used for file system backups or system state etc.&lt;BR&gt;'&lt;BR&gt;' CDOEx is not "remoteable" - it can only be instantiated on the Exchange Server &lt;BR&gt;' itself. Hence, not very generic. &lt;BR&gt;'&lt;BR&gt;' BUT - CDOEx has advantages. You can use "SendUsingExchange" rather than SMTP&lt;BR&gt;' which allows you to relatively easily set a reminder on the message itself.&lt;BR&gt;' You would unfortunately also be limited to not just running on an Exchange &lt;BR&gt;' Server, but who you are sending it _from_ must have their mailbox on that&lt;BR&gt;' local server.&lt;BR&gt;'&lt;BR&gt;' Plan B: Use CDO which is present on all Windows Servers. However, to do this&lt;BR&gt;' has its own problems if you also want the message to flag up if you're using&lt;BR&gt;' a rich Outlook client to read the message.&lt;BR&gt;'&lt;BR&gt;' Plan B and a half is to incorporate elements of both solution (see inline comments,&lt;BR&gt;' with some code commented out) but using SMTP.&lt;BR&gt;'&lt;BR&gt;' Note: I could have done this, but it just would have been _too_ easy :-)&lt;BR&gt;'&lt;BR&gt;'Dim oMsg&lt;BR&gt;'set oMsg = CreateObject("CDO.Message")&lt;BR&gt;'oMsg.To = "&lt;A href="mailto:user@contoso.com"&gt;user@contoso.com&lt;/A&gt;"&lt;BR&gt;'oMsg.From = "&lt;A href="mailto:Exchange@contoso.com"&gt;Exchange@contoso.com&lt;/A&gt;"&lt;BR&gt;'oMsg.Subject = "Backup Status"&lt;BR&gt;'oMsg.TextBody = "Whatever you want"&lt;BR&gt;'oMsg.Send&lt;BR&gt;'set oMsg = Nothing&lt;/P&gt;
&lt;P&gt;'-----------------------------------------------------------------------------------&lt;BR&gt;Function SendErrorEmail()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oMsg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Message we send if failure occurs&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim szFrom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' String&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim szBaseFolder&amp;nbsp; ' Base folder for the current users mailbox&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim rc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; szFrom = ""&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = NO_ERROR&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oMsg = Nothing&lt;/P&gt;
&lt;P&gt;' COMMENTED OUT - COULD USE IF WE KNOW THIS IS RUNNING ON AN EXCHANGE SERVER&lt;BR&gt;' REASON BEING: CDO.Person and IMailbox Interface are only implemented in CDOEx, not CDO&lt;BR&gt;' Following block is to generate a full from email address so that we&lt;BR&gt;' use a better display name if we are sending the email externally from&lt;BR&gt;' the Exchange organisation. Not strictly necessary, but nicer.&lt;BR&gt;' Also, no error checking implemented&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim IMailbox&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Mailbox Interface to CDO.Person object&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oADSInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ActiveDS.ADSystemInfo&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oPerson&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' CDO.Person&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; set oADSInfo = CreateObject("ADSystemInfo")&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; set oPerson = CreateObject("CDO.Person")&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; oPerson.DataSource.Open("LDAP://" &amp;amp; oADSInfo.DomainDNSName &amp;amp; "/" &amp;amp; oADSInfo.UserName) &lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; szFrom = oPerson.FileAs&amp;nbsp; ' May be blank if no description in AD&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; if 0 = len(szFrom) then szFrom = "Exchange Backup Script"&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; szFrom = szFrom &amp;amp; " &amp;lt;" &amp;amp; oPerson.Email &amp;amp; "&amp;gt;"&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Need to have a default sender&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if 0 = len(szFrom) Then szFrom = DEFAULT_SENDER&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;' COMMENTED OUT - AGAIN CDOEX SPECIFIC. Assuming we use code block commented&lt;BR&gt;' above, we need to make sure that the users mailbox we are sending FROM (which&lt;BR&gt;' is the currently logged on user) is homed on the current Exchange Server.&lt;BR&gt;' The base folder will be something like &lt;A href="file://./backofficestorage/&lt;domain&gt;/MBX/&lt;User&gt;/"&gt;file://./backofficestorage/&amp;lt;domain&amp;gt;/MBX/&amp;lt;User&amp;gt;/&lt;/A&gt;&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; set IMailbox = oPerson.GetInterface("IMailbox")&lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; szBaseFolder = IMailbox.BaseFolder &lt;BR&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp; if (0=len(szBaseFolder)) Then &amp;lt;TRAP ERROR HERE&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Create a message object. Not a lot we can do if we can't - could put further&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' checking maybe to write to event log. Exercise for the reader though.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (NO_ERROR = rc) Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err.clear&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oMsg = CreateObject("CDO.Message")&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (err.number) or (oMsg is nothing) Then rc = -1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Configure the outbound email&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (NO_ERROR = rc) Then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With oMsg.Configuration&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '.Fields(cdoSaveSentItems) = False&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' CDOEX Specific next line&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '.Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/sendusing"&gt;http://schemas.microsoft.com/cdo/configuration/sendusing&lt;/A&gt;") = cdoSendUsingExchange&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' SMTP Specific lines instead of above commented out line&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/sendusing"&gt;http://schemas.microsoft.com/cdo/configuration/sendusing&lt;/A&gt;") = 2 ' SMTP By Port&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/smtpserver"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserver&lt;/A&gt;") = SMTP_SERVER&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/smtpserverport"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserverport&lt;/A&gt;") = SMTP_PORT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"&gt;http://schemas.microsoft.com/cdo/configuration/smtpauthenticate&lt;/A&gt;") = SMTP_AUTH&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;A href="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"&gt;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&lt;/A&gt;") = SMTP_TIMEOUT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' If using BASIC, need to set cdo/configuration/sendusername and sendpassword accordingly&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Update fields from the configuration&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields.Update&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end With&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.To = DEFAULT_RECIP&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.From = szFrom&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Subject = DEFAULT_SUBJECT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.TextBody = "Backup Job has failed" &amp;amp; vbcrlf&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.TextBody = oMsg.TextBody &amp;amp; "Error: " &amp;amp; szError &amp;amp; vbcrlf &amp;amp; vbcrlf&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.TextBody = oMsg.TextBody &amp;amp; "Backup Job: " &amp;amp; szCommandLine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' CDOEX/SendUsingExchange Specific to set the message flag&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'oMsg.Fields("&lt;A href="http://schemas.microsoft.com/mapi/proptag/0x10900003%22)=2"&gt;http://schemas.microsoft.com/mapi/proptag/0x10900003")=2&lt;/A&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'oMsg.Fields("urn:schemas:httpmail:messageflag")= MESSAGE_FLAG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' SMTP Way of doing this&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Fields("urn:schemas:mailheader:Reply-By") = szUTC&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Fields("urn:schemas:mailheader:X-Message-Flag") = MESSAGE_FLAG&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Fields(cdoImportance) = cdoHigh&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Fields.Update&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oMsg.Send&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set oMsg = Nothing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' If using CDOEx&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'set oPerson = Nothing&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'set oADSInfo = Nothing&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;End Function&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#ffff00 size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Someone smart may wonder what's oMsg.Fields("&lt;FONT color=#000000&gt;http://schemas.microsoft.com/mapi/proptag/0x10900003")=2&lt;/FONT&gt;&amp;nbsp;about. If you want to know, and how I went about finding out, it's a long story. Post a comment and I'll put up the details when I get a spare day (it's that long). &amp;lt;GRIPE&amp;gt;Previous to working at Microsoft, obtaining info like this was my day job - I had plenty of support cases lined up at MS and got pretty up tight about some of the decisions made by the Exchange Dev team, and specifically those working on the SDK tools. Seems like even since my gripes a few years ago, the same lack of documentation (or deliberate hiding of this info more specifically is still there)&amp;lt;/GRIPE&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(Nov 2008) Updated as I discovered the formatting of the above script was awful in the new blog template. Also adding a link to a direct download of the script (save as a .vbs file rather than .txt). &lt;A class="" href="http://blogpics.dyndns.org/2005/nov/ImprovedBackupScript.txt" mce_href="http://blogpics.dyndns.org/2005/nov/ImprovedBackupScript.txt"&gt;It's here.&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=413678" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Network+Infrastructure+Systems/default.aspx">Network Infrastructure Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2003/default.aspx">Windows Server 2003</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Exchange/default.aspx">Exchange</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category></item></channel></rss>