<?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>Ross' Cogitations &#187; VBS rename</title>
	<atom:link href="http://ross-family.org/blog/tag/vbs-rename/feed/" rel="self" type="application/rss+xml" />
	<link>http://ross-family.org/blog</link>
	<description>Thoughts on theology &#38; technology.</description>
	<lastBuildDate>Wed, 25 Aug 2010 04:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Server Inventory Script</title>
		<link>http://ross-family.org/blog/2009/08/05/server-inventory-script/</link>
		<comments>http://ross-family.org/blog/2009/08/05/server-inventory-script/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 22:08:39 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Inventory]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[VBS rename]]></category>
		<category><![CDATA[WSH]]></category>

		<guid isPermaLink="false">http://ross-family.org/blog/?p=98</guid>
		<description><![CDATA[As a consultant, many times I need to quickly gain information about the Windows servers in an environment. I&#8217;ve finally put something together to try and make my life easier. It is a script that opens Microsoft Excel, sets column definitions that seem useful to me, then populates the spreadsheet with a bunch of data.  [...]]]></description>
			<content:encoded><![CDATA[<p>As a consultant, many times I need to quickly gain information about the Windows servers in an environment. I&#8217;ve finally put something together to try and make my life easier. It is a script that opens Microsoft Excel, sets column definitions that seem useful to me, then populates the spreadsheet with a bunch of data.  The data is gathered from every Windows server that is a member of the Active Directory domain you specify.  Specifically, it gathers:</p>
<ol>
<li>Server Name</li>
<li>Whether the server is online (ping&#8217;able) or not</li>
<li>OS</li>
<li>Service Pack</li>
<li>Manufacturer</li>
<li>Model</li>
<li>Serial Number</li>
<li>Whether it is a domain controller</li>
<li>Whether it is a DNS server</li>
<li>Whether it is a DHCP server</li>
<li>Whether it is a WINS server (yes there are still a few of those)</li>
<li>Whether it is a MSCS cluster node</li>
<li>Whether it is an Exchange server</li>
<li>What applications are installed (excluding Security Updates and Hotfixes)</li>
<li>Whether WMI could be connected to</li>
</ol>
<h2>Dependencies</h2>
<ul>
<li>Microsoft Excel (any later version is fine)</li>
<li>Sysinternals PSTools</li>
<li>Admin rights on every server in the domain (Domain Admin rights would be easiest)</li>
</ul>
<p>I wanted to use WMI exclusively but unfortunately it is very unreliable, therefore the script heavily depends on 2 PSTools (PSInfo and PSService).  You will need to <a title="Download PSTools" href="http://download.sysinternals.com/Files/PsTools.zip" target="_blank">download those</a> and place them in a directory on the PC you run the script from.</p>
<h2>Edits</h2>
<p>The only lines you need to edit are 15 and 16, where you enter in your domain name (follow the format example!) and the path to your PSTools directory.</p>
<pre>'your domain below
strDom = "DC=ACME,DC=COM"
pstoolsPath = "c:\Tools\pstools"</pre>
<p>You can download the text of the script <a title="FindServers Script" href="http://files.ross-family.org/ServerInventory.txt" target="_blank">here</a> or a zip file with the script <a title="Download FindServers.zip" href="http://files.ross-family.org/ServerInventory.zip" target="_blank">here</a>.  I hope others find it helpful.  As always, use this solution <strong>at your own risk</strong>.  If you have problems with the script, comment on the post and I will help when I have time.</p>
]]></content:encoded>
			<wfw:commentRss>http://ross-family.org/blog/2009/08/05/server-inventory-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VBS script to rename files</title>
		<link>http://ross-family.org/blog/2008/11/19/vbs-script-to-rename-files/</link>
		<comments>http://ross-family.org/blog/2008/11/19/vbs-script-to-rename-files/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 18:34:08 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[VBS rename]]></category>

		<guid isPermaLink="false">http://ross-family.org/blog/?p=46</guid>
		<description><![CDATA[So an upgrade gone wrong at my current client site (no I was not doing the upgrade!) caused about 30 file names to be renamed into a 8.3 format.  This little incident brought operations to a halt in almost every branch!  No pressure for the consultant, right! VBS script to the rescue.  Just create a [...]]]></description>
			<content:encoded><![CDATA[<p>So an upgrade gone wrong at my current client site (no I was not doing the upgrade!) caused about 30 file names to be renamed into a 8.3 format.  This little incident brought operations to a halt in almost every branch!  No pressure for the consultant, right!</p>
<p>VBS script to the rescue.  Just create a input (text) file which has the bad file name, the delimiter of your choice, and the correct file name.  It looks like this (with &#8220;#&#8221; as my delimiter):</p>
<pre>badname1.txt#goodname1.txt
badname2.txt#goodname2.txt
badname3.txt#goodname3.txt
etc....</pre>
<p>Place this script in the same folder as the input file, change the Path variable to the path containing the files, then run the script.</p>
<pre>Const ForReading = 1
 
On Error Resume Next
 
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.OpenTextFile(".\name_changes.txt", ForReading)
var1 = f1.ReadAll
var2 = Split(var1, vbcrlf)
path = "C:\Test"
For i = 0 To UBound(var2)
                badName = left(var2(i), instr(1, var2(i), "#", 1) -1)
                goodName = right(var2(i), instrrev(var2(i), "#", -1) -1)
                Set filA = fso.GetFile(path &amp; "\" &amp; badName)
                filA.name = goodName
Next
msgbox "All Done!"</pre>
<p>By the way, when I showed this script to my son his reply was, &#8220;well, that&#8217;s not that impressive&#8230;&#8221;</p>
<p>hmmmm&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ross-family.org/blog/2008/11/19/vbs-script-to-rename-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
