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

<channel>
	<title>Alan&#039;s Blog</title>
	<atom:link href="http://www.akaplan.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.akaplan.com/blog</link>
	<description>&#34;Yeah.  I wrote a script that will do that.&#34;</description>
	<lastBuildDate>Fri, 13 Apr 2012 17:53:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Enumerate SQL Servers for a Windows Domain</title>
		<link>http://www.akaplan.com/blog/?p=909</link>
		<comments>http://www.akaplan.com/blog/?p=909#comments</comments>
		<pubDate>Fri, 30 Mar 2012 20:39:11 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Alan's Favorites]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows Administration]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=909</guid>
		<description><![CDATA[In a very large environment, getting a list and keeping track of SQL installs may be come problematic.  I wanted a way to track down all SQL installs, for licensing, management and security.  When you install SQL, it creates a Service Principal Name (SPN) in Active Directory. I took a script which created a list of [...]]]></description>
			<content:encoded><![CDATA[<p>In a very large environment, getting a list and keeping track of SQL installs may be come problematic.  I wanted a way to track down all SQL installs, for licensing, management and security.  When you install SQL, it creates a Service Principal Name (SPN) in Active Directory.</p>
<p>I took a script which created a list of SQL installations by looking at SPNs, and then added the information I wanted to collect.  <a href="http://www.akaplan.com/blog/wp-content/uploads/2012/03/DomainSQLServerReport_vbs.txt" target="_blank">DomainSQLServerReport.vbs</a> does the following: 1) Gets list of SQL SPN servers from AD.  2) Ping the list.  3) If there is a reply then try to connect to the SQL server using integrated authentication to query version and SQL instances.</p>
<p>If you are a Domain Admin, and if integrated authentication is enabled, you will get a lot of data this way.  You will also find your AD to be littered by unused SPNs, which you can delete (see, for example instructions <a href="http://www.sqlservercentral.com/Forums/Topic229617-146-1.aspx" target="_blank">here</a>).</p>
<p>If you run this from a desktop with Excel installed, you will have a nicely formatted log file.  If no Excel is installed, you will have a tab delimited log.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=909</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively Enumerate Local Administrator Group</title>
		<link>http://www.akaplan.com/blog/?p=904</link>
		<comments>http://www.akaplan.com/blog/?p=904#comments</comments>
		<pubDate>Fri, 30 Mar 2012 20:25:36 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows Administration]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=904</guid>
		<description><![CDATA[Getting a list of the local administrators is a routine security task. A popular way to do this is with EnumLocalGroup.vbs, a script written by Richard Mueller.&#160; I found that this has some error handling issues, especially where you have the problem of a nested group which creates a recursion loop. EnumAdmins.vbs&#160;is my version of [...]]]></description>
			<content:encoded><![CDATA[<p>Getting a list of the local administrators is a routine security task. A popular way to do this is with <a title="Mueller's original script" href="http://www.rlmueller.net/Programs/EnumLocalGroup.txt" target="_blank">EnumLocalGroup.vbs</a>, a script written by Richard Mueller.&nbsp; I found that this has some error handling issues, especially where you have the problem of a nested group which creates a recursion loop.</p>
<p><a href="http://www.akaplan.com/blog/wp-content/uploads/2012/03/EnumAdmins_new_vbs.txt" target="_blank">EnumAdmins.vbs</a>&nbsp;is my version of this file.&nbsp; Enumeration failures are logged.&nbsp; It only runs locally.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=904</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who logs onto this computer?</title>
		<link>http://www.akaplan.com/blog/?p=898</link>
		<comments>http://www.akaplan.com/blog/?p=898#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:47:19 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Administration]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=898</guid>
		<description><![CDATA[One of the questions that is frequently asked in a large organization is, &#8220;Who uses computer XYZ123?&#8221;. Many tools will report the current user, but the current user may or may not be the the person who usually works on a given computer.  The current user for the computer you are logged on logged onto to fix is probably [...]]]></description>
			<content:encoded><![CDATA[<p>One of the questions that is frequently asked in a large organization is, &#8220;Who uses computer XYZ123?&#8221;. Many tools will report the current user, but the current user may or may not be the the person who usually works on a given computer.  The current user for the computer you are logged on logged onto to fix is probably not the name you want.</p>
<p>In pre-Windows 7 days, I used to pull the user information from the registry location HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName.  I recently found out that this has been moved to HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser for Windows 7.</p>
<p>Unfortunately when I went looking in the new location, there was nothing there.  The missing LastLoggedOnUser was a weird problem.  After some Google search time I found that if you use a GPO entry to clear the last username then LastLoggedOnUser is not populated.</p>
<p>I then spent some time with WMI, and found some interesting information is available in <a title="TechNet reference" href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa394221(v=vs.85).aspx" target="_blank">Win32_NetworkLoginProfile</a>.  I ended up writing two scripts:  <a href="http://www.akaplan.com/blog/wp-content/uploads/2012/02/LastUserLogon_vbs.txt" target="_blank">LastUserLogon.vbs</a> gets the last user for a computer, and <a href="http://www.akaplan.com/blog/wp-content/uploads/2012/02/TopComputerUsers_vbs.txt" target="_blank">TopComputerUsers.vbs</a> which collects the top 5 interactive logons for a computer.  Both let you copy the data to the clipboard if Word is installed, otherwise the information can be output to notepad.</p>
<p>The TopComputerUsers script is interesting because WMI contains a count of user logons, and I use a disconnected recordset to sort the user information by number of logons.  The LastUserLogon gives you a subset of the information from TopComputerUsers, and can help you determine whether a given computer is underutilized.</p>
<p>Both will work on local or remote computers.  Both take a computer name as an argument.  And both scripts tell you who the current user is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=898</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I am not monetizing my blog</title>
		<link>http://www.akaplan.com/blog/?p=892</link>
		<comments>http://www.akaplan.com/blog/?p=892#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:26:08 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=892</guid>
		<description><![CDATA[I am still resisting the call from my friends to monetize my blog. This means that there is no advertising here, now or later. I see this primarily as an ethical issue.  You, as taxpayers, have already paid for this work.  I, as a federal employee, have already been compensated for the work.]]></description>
			<content:encoded><![CDATA[<p>I am still resisting the call from my friends to monetize my blog. This means that there is no advertising here, now or later. I see this primarily as an ethical issue.  You, as taxpayers, have already paid for this work.  I, as a federal employee, have already been compensated for the work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=892</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninstall All But the Most Recent Version of Java</title>
		<link>http://www.akaplan.com/blog/?p=879</link>
		<comments>http://www.akaplan.com/blog/?p=879#comments</comments>
		<pubDate>Tue, 10 Jan 2012 19:50:41 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VbScript]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=879</guid>
		<description><![CDATA[UninstallJava.vbs creates a list of programs with “Java” in the name.  I then uninstalls all but the most recent version.  You can run it locally or against a remote computer.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.akaplan.com/blog/wp-content/uploads/2012/01/UninstallJava_vbs.txt" target="_blank">UninstallJava.vbs</a> creates a list of programs with “Java” in the name.  I then uninstalls all but the most recent version.  You can run it locally or against a remote computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=879</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Name Resolution Problems</title>
		<link>http://www.akaplan.com/blog/?p=871</link>
		<comments>http://www.akaplan.com/blog/?p=871#comments</comments>
		<pubDate>Mon, 12 Dec 2011 21:01:18 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Patching]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows Administration]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[Name Resolution]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=871</guid>
		<description><![CDATA[Name resolution problems are a plague for system administrators. If you think you are working on ComputerA but instead are working on ComputerB much gnashing of teeth may result.  In our environment we have NetBIOS and FQDNs to resolve.  The correct name, of course, is the one in the registry. NameResolution.wsf checks the registry, FQDN and [...]]]></description>
			<content:encoded><![CDATA[<p>Name resolution problems are a plague for system administrators. If you think you are working on ComputerA but instead are working on ComputerB much gnashing of teeth may result.  In our environment we have NetBIOS and FQDNs to resolve.  The correct name, of course, is the one in the registry.</p>
<p><a href="http://www.akaplan.com/blog/wp-content/uploads/2011/12/NameResolution_wsf.txt" target="_blank">NameResolution.wsf</a> checks the registry, FQDN and NBTName for computers.  Any name mismatches are noted.  This is an example of a WSF front end that I wrote.  The front end lets you run the script against a single file name, a list of files typed, a file of computer names, or a list from AD.  When you run it against more than one computer it is multi-threaded.  The results are written to a file on your desktop.  I had some strange issues with the .Run and .Exec methods for wshShell on a Windows 7 x64 system. These returned “file not found” when I tried to run NBTSTAT.  I rewrote the script to use the WMI Win32_Process create method instead.  (Later I discovered that this was related to an old version of PrimalScript.)</p>
<p>Soon I will post a script to fix PTR errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=871</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t find %HOMESHARE%\Favorites\.</title>
		<link>http://www.akaplan.com/blog/?p=866</link>
		<comments>http://www.akaplan.com/blog/?p=866#comments</comments>
		<pubDate>Mon, 12 Dec 2011 20:58:13 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Windows Administration]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=866</guid>
		<description><![CDATA[I tried to update Adobe Reader using my domain based admin account for elevation, and got this installer error “Can&#8217;t Find %HOMESHARE%\Favorites\.”  To fix it I opened RegEdit, navigated to HKCU\Environment, and added a new expandable string value named HOMESHARE, and pointed it to the proper location.]]></description>
			<content:encoded><![CDATA[<p>I tried to update Adobe Reader using my domain based admin account for elevation, and got this installer error “Can&#8217;t Find %HOMESHARE%\Favorites\.”  To fix it I opened RegEdit, navigated to HKCU\Environment, and added a new expandable string value named HOMESHARE, and pointed it to the proper location.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=866</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scriptomatic on Windows 7 Solved</title>
		<link>http://www.akaplan.com/blog/?p=860</link>
		<comments>http://www.akaplan.com/blog/?p=860#comments</comments>
		<pubDate>Sun, 20 Nov 2011 22:36:40 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Alan's Favorites]]></category>
		<category><![CDATA[HTA]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[WMI]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=860</guid>
		<description><![CDATA[I have been writing HTA files for a years as a way to improve the appearance of some of my scripts.  MSDN has a good article from May of 2011 about the power and utility of HTA files.  After moving to Windows 7 x64, I was disappointed to find that one of my favorite HTA [...]]]></description>
			<content:encoded><![CDATA[<p>I have been writing HTA files for a years as a way to improve the appearance of some of my scripts.  MSDN has a good <a href="http://msdn.microsoft.com/en-us/library/ms536496(v=vs.85).aspx" target="_blank">article</a> from May of 2011 about the power and utility of HTA files.  After moving to Windows 7 x64, I was disappointed to find that one of my favorite HTA files, <a href="http://www.microsoft.com/download/en/details.aspx?id=12028" target="_blank">Scriptomatic</a>, had quit working.  Scriptomatic is a Microsoft utility that writes WMI code.  Unfortunately when running Scriptomatic I got this error on line 177, character 4:  “Could not complete the operation due to error 80041003”.  If you look at the code the line is: Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &amp; _strWMISource &amp; &#8220;\&#8221; &amp; strNameSpace) If you look up the error you find that it is WBEM_E_ACCESS_DENIED, &#8220;Current user does not have permission to perform the action.&#8221; If you search this problem with Scriptomatic in <a href="http://www.google.com/search?q=80041003+scriptomatic" target="_blank">Google</a>, you will find a slew of answers concluding that your only choice is to run the tool as an administrator.  This is true with the code as is, but I thought it would be more interesting to fix the problem, which is ultimately an error handing issue.  Scriptomatic tries to enumerate all of WMI.  An ordinary user cannot access all of WMI, so it fails with a permission error.  My version of Scriptomatic (<a href="http://www.akaplan.com/blog/wp-content/uploads/2012/01/Scriptomatic_hta.txt" target="_blank">Fixed_Scriptomatic.hta</a>) adds error handling so an ordinary user can enumerate classes where there is permission to do so. Why do this?  I have another project where an ordinary user uses an HTA to get computer information.  I wanted to make sure that there would be no problems. My version of Scriptomatic adds error handling.  I have commented all of my changes.  If you are uneasy, then I suggest you download the original file and compare.  If you run my fixed version as an ordinary user, it will take a really long time to open.  On my system, a full two minutes. But the resulting list will be good for the current user&#8217;s credentials.  Note that HTA files run best from the local computer.</p>
<p>(Update: 1–24–12.  Fixed the embarrasing lack of a link to the file)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=860</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Floppy Drive Settings for Virtual PC</title>
		<link>http://www.akaplan.com/blog/?p=857</link>
		<comments>http://www.akaplan.com/blog/?p=857#comments</comments>
		<pubDate>Wed, 16 Nov 2011 20:40:50 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Virtual PC]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=857</guid>
		<description><![CDATA[Earlier I wrote about using WinImage to preserve floppy disk data.  In my continuing adventure with Windows 7 x64, I found that DOS programs will not run under x64.  What DOS program do I like to use?  The WordPerfect Editor from the WordPefect Shell.  (Curious?  You can get it here).  Why?  Because it allows you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.akaplan.com/blog/?p=550" target="_blank">Earlier</a> I wrote about using WinImage to preserve floppy disk data.  In my continuing adventure with Windows 7 x64, I found that DOS programs will not run under x64.  What DOS program do I like to use?  The WordPerfect Editor from the WordPefect Shell.  (Curious?  You can get it <a href="http://dataperfect.nl/CMS/index.php?option=com_weblinks&amp;Itemid=4&amp;catid=16" target="_blank">here</a>).  Why?  Because it allows you to easily replace formatting codes like TAB and NewLine.  It also permits macros.</p>
<p>I figured I would be able to run the WP Editor from a floppy image.  WinImage works with <a href="http://www.acc.umu.se/~bosse/" target="_blank">FileDisk</a> to allow you to mount floppy images so they are available as drive letters within the Windows OS.  So I made the bootable floppy, injected the files I wanted, and went into Virtual PC to map the floppy image to the VM.  What I failed to notice was that Microsoft no longer shows the floppy drive in the Virtual PC UI.  Howerver, a search of the internet found that floppy drive assignments were still available programatically with Virtual PC.</p>
<p>Being a scripting guy, I decided to write a script that sets and clears floppy drive settings.  The result is <a href="http://www.akaplan.com/blog/wp-content/uploads/2011/11/SetVPCFloppy_vbs.txt" target="_blank">SetVPCFloppy.vbs</a>.  Some odd things about this script.  First, do not run it as an administrator.  If you do, the activex control throws a permission denied error.  Instead, run it with the permissions of the owner of the virtual machines.  Also remember that you will need to change the boot order in the virtual BIOS if you want to boot from the floppy.  Use the DELete key to enter BIOS setup.</p>
<p>Unfortunately, I discovered after all this work that the DOS virtual machines do not have the Virtual Machine extensions available.  I found some <a href="http://blogs.msdn.com/b/virtual_pc_guy/archive/2007/10/30/installing-dos-additions-under-vpc-2007.aspx" target="_blank">instructions</a> as to how to do this, but the extension failed to work on my system.  When the Virtual Machine Folder Sharing begins to load I get “Folder Sharing is not supported on this host”.  As a result, I am unable to cut and paste into the DOS window and cannot share data.  A disappointing result.  If you have been able to get the extensions working, please share your experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=857</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RunAs context menu item for scripts and HTAs</title>
		<link>http://www.akaplan.com/blog/?p=850</link>
		<comments>http://www.akaplan.com/blog/?p=850#comments</comments>
		<pubDate>Wed, 16 Nov 2011 15:16:55 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=850</guid>
		<description><![CDATA[I have consolidated a couple of registry files that enable a RunAs context menu item for VbScript, JScript, and HTA files.  Scripts_HTA_Runas_reg.txt]]></description>
			<content:encoded><![CDATA[<p>I have consolidated a couple of registry files that enable a RunAs context menu item for VbScript, JScript, and HTA files.  <a href="http://www.akaplan.com/blog/wp-content/uploads/2011/11/Scripts_HTA_Runas_reg.txt" target="_blank">Scripts_HTA_Runas_reg.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=850</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Windows Update problems on multiple computers</title>
		<link>http://www.akaplan.com/blog/?p=844</link>
		<comments>http://www.akaplan.com/blog/?p=844#comments</comments>
		<pubDate>Thu, 10 Nov 2011 13:37:35 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows Administration]]></category>
		<category><![CDATA[WSUS]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=844</guid>
		<description><![CDATA[I have my WSUS Repair HTA for working on single systems, but how about multiple computers?  For that I run WindowsUpdateFix.cmd.  You can execute this many ways.  I use SCCM or PSExec.]]></description>
			<content:encoded><![CDATA[<p>I have my <a href="http://www.akaplan.com/blog/?p=719" target="_blank">WSUS Repair HTA</a> for working on single systems, but how about multiple computers?  For that I run <a href="http://www.akaplan.com/blog/wp-content/uploads/2011/11/WindowsUpdateFix_cmd.txt" target="_blank">WindowsUpdateFix.cmd</a>.  You can execute this many ways.  I use SCCM or <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553" target="_blank">PSExec</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=844</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to Windows 7</title>
		<link>http://www.akaplan.com/blog/?p=833</link>
		<comments>http://www.akaplan.com/blog/?p=833#comments</comments>
		<pubDate>Wed, 09 Nov 2011 19:55:15 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Administration]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=833</guid>
		<description><![CDATA[We have been slow at work in our adoption of Windows 7.  I use my laptop as my primary workstation, and I had “cheated” when I upgraded from XP to Vista and then Window 7 32 bit.  My new OS was to be Windows 7 64 bit, and there is no upgrade path.  Before I kicked [...]]]></description>
			<content:encoded><![CDATA[<p>We have been slow at work in our adoption of Windows 7.  I use my laptop as my primary workstation, and I had “cheated” when I upgraded from XP to Vista and then Window 7 32 bit.  My new OS was to be Windows 7 64 bit, and there is no upgrade path.  Before I kicked off the test “side by side” OSD load of Win7 64 on my laptop, I wanted to ensure that I did not lose anything.</p>
<p>I started by unencrypting my drive and then capturing it using <a href="http://technet.microsoft.com/en-us/sysinternals/ee656415" target="_blank">disk2vhd</a> from SysInternals.  I then checked that I had done okay by mounting the drive in the existing Windows 7 32 bit OS.  You can do this from the GUI in Disk Management.  It looked fine, and I went ahead with the OSD load.</p>
<p>Side by side was supposted to use the USMT to keep my settings.  It failed.  I tried to use the Easy Transfer Wizard to read the USMT cabs.  It failed.  I then decided that the clever thing to do was to open my VHD file as a VM in Windows Virtual PC.  It failed with “Unmountable_Boot_Volume.  Why?  There is a 127 GB size limit to VHD files.  Found a good article about it <a href="http://msmvps.com/blogs/jeffloucks/archive/2010/01/13/disk2vhd-the-127-gb-file-size-limit-unmountable-boot-volume.aspx" target="_blank">here</a>.    Instead of starting from scratch, I found a utility, <a href="http://vmtoolkit.com/files/default.aspx" target="_blank">VHD Resizer</a> to shrink the size of the volume.  But first, I had to mount the drive in Disk Management to move files off.</p>
<p>Having shrunk the VHD, it mounted without incident.  I used the Windows Easy Transfer Wizard to move my files from inside the VM to the host computer.  Note that the network transfer failed, and I had to put the CABS on a file share.</p>
<p>I did end up with a working laptop.  And now I hope to catch up by posting some of the scripts I have written.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=833</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find and Reset RDP Sessions</title>
		<link>http://www.akaplan.com/blog/?p=829</link>
		<comments>http://www.akaplan.com/blog/?p=829#comments</comments>
		<pubDate>Mon, 24 Oct 2011 20:12:34 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[Windows Administration]]></category>
		<category><![CDATA[Sessions]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=829</guid>
		<description><![CDATA[We have a lot of servers. When I get disconnected, I may leave hanging sessions on those servers which I forget to properly close. Then, after I change the password for my admin account, I sometimes get locked out as a result of what I had open in the now disconnected session. Tracking this down [...]]]></description>
			<content:encoded><![CDATA[<p>We have a lot of servers. When I get disconnected, I may leave hanging sessions on those servers which I forget to properly close. Then, after I change the password for my admin account, I sometimes get locked out as a result of what I had open in the now disconnected session. Tracking this down is always annoying and time consuming. When users (including administrators) are terminated, a there is a similar problem&nbsp;&#8212; you want to find and reset those sessions, too.&nbsp;<a href="http://www.akaplan.com/blog/wp-content/uploads/2012/01/ServerSessions_vbs.txt" target="_blank">ServerSessions.vbs</a> is a script for admins to run to track down sessions on servers and optionally reset them. You can list sessions on all servers in a domain, and reset either all or just disconnected sessions. I have scripts for finding users, too.&nbsp; <a href="http://www.akaplan.com/blog/?p=280">LocateUsers.vbs</a> finds a user based on their home drive sessions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=829</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Check SCCM TempDB space</title>
		<link>http://www.akaplan.com/blog/?p=821</link>
		<comments>http://www.akaplan.com/blog/?p=821#comments</comments>
		<pubDate>Thu, 13 Oct 2011 13:14:55 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[tempdb]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=821</guid>
		<description><![CDATA[Sometimes a poorly framed query or collection can cause SCCM collections to be left forever in an evaluation state. As a result, the TempDB for the SCCM server can grow to the point where it fills the available drive space. When that happens, SQL stops, and SCCM stops. Some advice: TempDB is recreated when the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes a poorly framed query or collection can cause SCCM collections to be left forever in an evaluation state. As a result, the TempDB for the SCCM server can grow to the point where it fills the available drive space. When that happens, SQL stops, and SCCM stops.<br />
Some advice: TempDB is recreated when the SQL Server service is restarted. This is your first action to clear the problem. You should thereafter restart the SMS Executive service.</p>
<p>As the tempdb begins to grow, you can find out what is going on by looking at reports. In the SQL Server Management Studio, expand system databases, right clicking on tempdb, and selecting Reports/Standard Reports. &#8220;Top Transactions By Age&#8221; will show you what has been stuck, and can give you evidence to track back from there.</p>
<p>In a large SCCM environment, keeping track of the tempdb can be time consuming. <a title="Check SCCM TempDB Space.vbs" href="http://www.akaplan.com/blog/wp-content/uploads/2011/10/Check-SCCM-TempDB-Space_vbs.txt " target="_blank">SCCM TempDB Space.vbs</a> will connect to the SCCM database and report tempdb size, path, and free space from all site servers. The script has some interesting combinations of WMI queries and SQL queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=821</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1E Wakeup Script</title>
		<link>http://www.akaplan.com/blog/?p=818</link>
		<comments>http://www.akaplan.com/blog/?p=818#comments</comments>
		<pubDate>Thu, 25 Aug 2011 15:23:08 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VbScript]]></category>
		<category><![CDATA[1E]]></category>
		<category><![CDATA[Wakeup]]></category>

		<guid isPermaLink="false">http://www.akaplan.com/blog/?p=818</guid>
		<description><![CDATA[Saving energy by putting systems to sleep or by turning them off&#160;can have a big return in a large enterprise.&#160; 1E&#8217;s Nightwatchman and Wakeup allow you to&#160;power on&#160;the systems&#160;with SCCM and other products.&#160; But what if you are running a batch file or a script?&#160; Or what if you want to RDP to a computer [...]]]></description>
			<content:encoded><![CDATA[<p>Saving energy by putting systems to sleep or by turning them off&nbsp;can have a big return in a large enterprise.&nbsp; <a href="http://1e.com/" target="_blank">1E&#8217;s</a> Nightwatchman and Wakeup allow you to&nbsp;power on&nbsp;the systems&nbsp;with SCCM and other products.&nbsp; But what if you are running a batch file or a script?&nbsp; Or what if you want to RDP to a computer that is turned off?&nbsp; <a href="http://www.akaplan.com/blog/wp-content/uploads/2011/08/1EWakeup_vbs.txt" target="_blank">1EWakeup.vbs</a>&nbsp;is a modification of a script by Reto Egeter&nbsp;posted at <a href="http://www.myitforum.com/forums/tm.aspx?high=&amp;m=216530&amp;mpage=1" target="_blank">MyITForum</a>.&nbsp; I made a large number of changes.&nbsp; My version&nbsp;works interactively, but it also supports a command line, and pings the computer both before and after the wakeup is sent.&nbsp;Errorlevels are set so that the reason for failure can be determined in a batch file.&nbsp; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.akaplan.com/blog/?feed=rss2&#038;p=818</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

