<?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>Nathan's Blog &#187; administration</title>
	<atom:link href="http://nathan.studiodifferent.com/tag/administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://nathan.studiodifferent.com</link>
	<description>Wired World Wonderings</description>
	<lastBuildDate>Mon, 22 Oct 2007 16:50:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Classic Windows Scripting</title>
		<link>http://nathan.studiodifferent.com/2007/09/29/classic-windows-scripting/</link>
		<comments>http://nathan.studiodifferent.com/2007/09/29/classic-windows-scripting/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 01:55:29 +0000</pubDate>
		<dc:creator>nathan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://nathan.studiodifferent.com/2007/09/29/classic-windows-scripting/</guid>
		<description><![CDATA[
Before .NET and PowerShell were dreamt of, VBScript and COM objects were the most powerful scripting tools available in a vanilla Windows install. Using Microsoft&#8217;s default facilities is worthwhile because it obviates the need to deploy additional software and cope with that software&#8217;s life cycle and incompatibilities. For instance, a script written for Windows 2000 [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; margin-left: 15px;"><img src="http://nathan.studiodifferent.com/wp-content/uploads/2007/09/script.jpg" alt="ancient script"/></div>
<p>Before .NET and PowerShell were dreamt of, VBScript and COM objects were the most powerful scripting tools available in a vanilla Windows install. Using Microsoft&#8217;s default facilities is worthwhile because it obviates the need to deploy additional software and cope with that software&#8217;s life cycle and incompatibilities. For instance, a script written for Windows 2000 is likely to continue working in Windows Server 2008 x64 Edition. I use PowerShell/.NET for Windows scripting now, but I still regularly use VBScripts which are several years old. Here are several of these simple scripts.<span id="more-104"></span></p>
<h3>Backgrounder</h3>
<p>First, a backgrounder &mdash; VBScript has been installed by default since Windows &#8216;98. The core language is limited, and it relies on objects to perform any actual work. Even file I/O or regular expressions require object creation. Several class libraries exist for more involved tasks, such as e-mail (CDO), XML (Msxml2), and Windows Management (WMI).</p>
<p>Two of the larger class libraries are offered by <a href="http://msdn2.microsoft.com/en-us/library/aa394570.aspx">Windows Management Instrumentation</a> (WMI) and <a href="http://msdn2.microsoft.com/en-us/library/aa772161.aspx">Active Directory Services Integration</a> (ADSI). WMI provides a consistent interface to Windows&#8217; hardware and software configuration, while ADSI manipulates accounts, computers, and other objects in Active Directory. Combined, these facilities can systematically perform the bulk of system administration tasks.</p>
<p><a href="http://nathan.studiodifferent.com/wp-content/uploads/2007/10/studiodifferent-wsf.zip">This zip file</a> contains the following VBScripts to perform simple administrative tasks. They are in the <a href="http://msdn2.microsoft.com/en-us/library/15x4407c.aspx">Windows Scripting File</a> (WSF) format, which is an XML format that encapsulates scripts in XML while adding support for type libraries and limited self-documentation and help facilities. The WMI and ADSI scripts can run locally or on a remote machine.</p>
<div style="text-align: center"><a href="http://nathan.studiodifferent.com/wp-content/uploads/2007/10/studiodifferent-wsf.zip"><img src="http://nathan.studiodifferent.com/wp-content/uploads/2007/09/zipicon.jpg" alt="[Zip Icon]" /></a><br/><a href="http://nathan.studiodifferent.com/wp-content/uploads/2007/10/studiodifferent-wsf.zip">Download WSF Collection</a></div>
<p>The ZIP file includes the following scripts:</p>
<h3>Windows Management Instrumentation (WMI)</h3>
<dl>
<dt><strong>adapt.wsf</strong></dt>
<dd>View or change network configuration, including IP address and<br />
    DNS/WINS servers. Operates locally or remotely. Note that no changes<br />
    take place without the &#8220;/set&#8221; option.</dd>
<dt><strong>rdp.wsf</strong></dt>
<dd>Display, enable, or disable Remote Desktop on a Windows XP computer. Unlike<br />
    the registry edit, this script can remotely enable RDP without a reboot.</dd>
<dt><strong>specs.wsf</strong></dt>
<dd>Display basic tech specs of the passed computer / domain</dd>
<dt><strong>who.wsf</strong></dt>
<dd>Display who is logged in to Windows&#8217; console.</dd>
</dl>
<h3>Active Directory Services Interface (ADSI)</h3>
<dl>
<dt><strong>addtoadmin.wsf</strong></dt>
<dd>Add specified user (/user:userid) to the local administrators group of the<br />
    specified computer(/computer:hostname).</dd>
<dt><strong>openfiles.wsf</strong></dt>
<dd>List files opened through Windows file sharing.</dd>
<dt><strong>user2sid.wsf</strong></dt>
<dd>Print the decimal style SID of an user.</dd>
</dl>
<h3>Other COM Objects</h3>
<dl>
<dt><strong>msxml.wsf</strong></dt>
<dd>Basic XML manipulation: validation, XPath filtering, and XML style sheet<br />
    transformations.</dd>
<dt><strong>wmail.wsf</strong></dt>
<dd>Generate a MIME mail message and send using raw SMTP or place in IIS<br />
    pickup directory.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://nathan.studiodifferent.com/2007/09/29/classic-windows-scripting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
