<?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>Sys Admin Tales &#187; Scripting</title>
	<atom:link href="http://www.meltivore.com/category/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.meltivore.com</link>
	<description>The endless search for the Any key</description>
	<lastBuildDate>Wed, 25 Aug 2010 19:33:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Script Samples</title>
		<link>http://www.meltivore.com/2010/script-samples/</link>
		<comments>http://www.meltivore.com/2010/script-samples/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 03:44:10 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=444</guid>
		<description><![CDATA[There are times when I spent an inordinate amount of time looking for just the right syntax for a command or even the correct command to get the job done. Here are four I put to use in the last few months&#8230;
Change Printer Spooler Service Recovery options to Restart
sc failure spooler reset= 60 actions= restart/600/restart/600/restart/600
Backing up [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when I spent an inordinate amount of time looking for just the right syntax for a command or even the correct command to get the job done. Here are four I put to use in the last few months&#8230;</p>
<p><strong>Change Printer Spooler Service Recovery options to Restart</strong><br />
sc failure spooler reset= 60 actions= restart/600/restart/600/restart/600</p>
<p><strong>Backing up an MSDE Database</strong><br />
osql -E -Q &#8220;BACKUP DATABASE mdss TO DISK= &#8216;C:\BB_DB_Backup\mdss.bak&#8217;&#8221;</p>
<p><strong>Copy Database and then Appending with Date<br />
</strong>copy t:\plandata.mdb C:\PlanDataBackup /Y</p>
<p>For /F &#8220;Tokens=1-8 Delims=.:/ &#8221; %%a In (&#8216;Echo %Date%&#8217;) Do (Set All=%%d-%%b-%%c)<br />
@For %%a in (&#8220;plandata.mdb&#8221;) do rename %%a &#8220;%%~na-%All%.mdb&#8221;</p>
<p><strong>Deleting Old OWA Logs</strong><br />
forfiles -p &#8220;C:\inetpub\logs\LogFiles\W3SVC1&#8243; -c &#8220;cmd /c echo del \&#8221;@FILE\&#8221; &amp; del \&#8221;@FILE\&#8221;" -d -21</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2010/script-samples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Big are those Mailboxes</title>
		<link>http://www.meltivore.com/2010/how-big-are-those-mailboxes/</link>
		<comments>http://www.meltivore.com/2010/how-big-are-those-mailboxes/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 23:34:00 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=438</guid>
		<description><![CDATA[One thing I truly miss about Exchange 2003 is the list of mailbox sizes that were easily accessible in the GUI. But things must move on and the display in the Exchange Management Console for both 2007 and 2010 lack the ability to populate and view this information.
Exchange Management Shell to the rescue! If you [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I truly miss about Exchange 2003 is the list of mailbox sizes that were easily accessible in the GUI. But things must move on and the display in the Exchange Management Console for both 2007 and 2010 lack the ability to populate and view this information.</p>
<p><strong>Exchange Management Shell to the rescue!</strong> If you enter just the basic Get-MailboxStatistics command it will be sorely lacking (and the sizes will be in KB). The command below will get Exchange to cough up a full list and friendlier MB display suitable for analyzing in Excel.</p>
<p>Open Exchange Management Shell and run the following:<br />
<em>Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2010/how-big-are-those-mailboxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free PowerShell Editor</title>
		<link>http://www.meltivore.com/2010/free-powershell-editor/</link>
		<comments>http://www.meltivore.com/2010/free-powershell-editor/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:43:59 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=431</guid>
		<description><![CDATA[Yesterday I began to really dive into a new user script (which uses Exchange Management Shell) to bring it up to date and include more fields and features. As the script complexity grew, Notepad was no longer cutting the mustard.
I thought I&#8217;d be using Notepad++ or TextPad, both fine in their own right, but instead [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I began to really dive into a new user script (which uses Exchange Management Shell) to bring it up to date and include more fields and features. As the script complexity grew, Notepad was no longer <a title="Why cut mustard?" href="http://www.phrases.org.uk/meanings/cut-the-mustard.html" target="_blank">cutting the mustard</a>.</p>
<p>I thought I&#8217;d be using <a title="Notepad++" href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">Notepad++</a> or <a title="TextPad" href="http://textpad.com/" target="_blank">TextPad</a>, both fine in their own right, but instead found <a title="PowerGUI" href="http://powergui.org" target="_blank">PowerGUI</a>. This PowerShell editor which finds syntax errors, includes definitions and much more; all for the low, low price of free. This seems to be a community supported by <a title="Quest Software" href="http://www.quest.com/" target="_blank">Quest Software</a> who has a bunch of fine (not so free) tools for SysAdmins.</p>
<p>I&#8217;m now able to work on, and run, the script off network (read: at home). It&#8217;s a helluva deal for the price, try <a title="PowerGUI Download" href="http://powergui.org/downloads.jspa" target="_blank">PowerGUI</a> for your next PowerShell outing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2010/free-powershell-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command Switches for MSI Packages</title>
		<link>http://www.meltivore.com/2009/command-switches-for-msi-packages/</link>
		<comments>http://www.meltivore.com/2009/command-switches-for-msi-packages/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 04:41:16 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=391</guid>
		<description><![CDATA[Microsoft has been using the Windows Installer Tool for quite some time now to make installing, patching and repairing programs a snap (installers using this will typically have an MSI extension).
One of the many benefits of this tool is the ability to script a program or patch installation using the available command-line switches, e.g.: adobe_reader.msi /qn which will [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has been using the <a title="Windows Installer Tool" href="http://en.wikipedia.org/wiki/Windows_Installer" target="_blank">Windows Installer Tool</a> for quite some time now to make installing, patching and repairing programs a snap (installers using this will typically have an MSI extension).</p>
<p>One of the many benefits of this tool is the ability to script a program or patch installation using the available command-line switches, e.g.: <strong>adobe_reader.msi <span style="color: #800000;">/qn</span></strong><span style="color: #800000;"> </span>which will install the application <span style="color: #800000;">quietly</span> without a <span style="color: #800000;">UI</span>. This can be key when making a batch file to install numerous applications and patches on a new system.</p>
<p>For the many available switches to use check out the full list from <a title="MSI Command Line Switches" href="http://support.microsoft.com/kb/314881/EN-US/" target="_blank">Microsoft</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2009/command-switches-for-msi-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two More Free MS Press eBooks</title>
		<link>http://www.meltivore.com/2009/two-more-free-ms-press-ebooks/</link>
		<comments>http://www.meltivore.com/2009/two-more-free-ms-press-ebooks/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 21:01:48 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=291</guid>
		<description><![CDATA[MS Press is celebrating it&#8217;s 25th anniversary by giving away free stuff.
The books are Windows SBS 2008 Admin&#8217;s Companion and Visual Basic 2008 Express.
Follow the links at the MS Press blog site. (You have until April 22nd.)
As noted on the blog&#8230; the first MS Press book was in 1984, for Mac :)
]]></description>
			<content:encoded><![CDATA[<p><a title="MS Press" href="http://www.microsoft.com/learning/books/default.mspx" target="_blank">MS Press</a> is celebrating it&#8217;s 25th anniversary by giving away free stuff.</p>
<p>The books are <a title="W2K8 SBS Admin" href="http://www.microsoft.com/learning/en/us/Books/6944.aspx" target="_blank">Windows SBS 2008 Admin&#8217;s Companion</a> and <a title="VB 2008 Express" href="http://www.microsoft.com/learning/en/us/Books/12282.aspx" target="_blank">Visual Basic 2008</a> Express.</p>
<p>Follow the links at the <a title="MS Press Blog" href="http://blogs.msdn.com/microsoft_press/archive/2009/04/14/two-free-e-books-available-in-april.aspx" target="_blank">MS Press blog site</a>. (You have until April 22nd.)</p>
<p>As noted on the blog&#8230; the first MS Press book was in 1984, for Mac :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2009/two-more-free-ms-press-ebooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Availability Error</title>
		<link>http://www.meltivore.com/2009/availability-error/</link>
		<comments>http://www.meltivore.com/2009/availability-error/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 04:37:17 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=289</guid>
		<description><![CDATA[This error kept creeping up on our front-end Exchange 2007 server:
Event ID: 4011
Process 6168[w3wp.exe:/LM/W3SVC/1/ROOT/EWS-1-128806932311406509]: Configuration for forest corp1.contoso.com was not found in Active Directory. Run the Add-AvailabilityAddressSpace command in the Exchange Management Shell for an Exchange Server 2003 Active Directory forest.Luckily the answer was on theTechNet site, I just ran this using the EMS&#8230;
Add-AvailabilityAddressSpace -ForestName Contoso.com -AccessMethod PublicFolder
Soon [...]]]></description>
			<content:encoded><![CDATA[<p>This error kept creeping up on our front-end Exchange 2007 server:<br />
<span lang="EN"><em>Event ID: 4011<br />
Process 6168[w3wp.exe:/LM/W3SVC/1/ROOT/EWS-1-128806932311406509]: Configuration for forest corp1.contoso.com was not found in Active Directory. Run the Add-AvailabilityAddressSpace command in the Exchange Management Shell for an Exchange Server 2003 Active Directory forest.</em></span>Luckily the answer was on the<a title="Configuring the Availability Service" href="http://technet.microsoft.com/en-us/library/bb125182.aspx" target="_blank">TechNet</a> site, I just ran this using the <a title="Exchange Management Shell" href="http://technet.microsoft.com/en-us/library/bb123778.aspx" target="_blank">EMS</a>&#8230;</p>
<p>Add-AvailabilityAddressSpace -ForestName Contoso.com -AccessMethod PublicFolder</p>
<p>Soon we&#8217;ll be without a mixed 2003/2007 environment, I look forward to that day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2009/availability-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script Headers</title>
		<link>http://www.meltivore.com/2008/script-headers/</link>
		<comments>http://www.meltivore.com/2008/script-headers/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 01:42:21 +0000</pubDate>
		<dc:creator>Tom Thrush</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.meltivore.com/?p=170</guid>
		<description><![CDATA[Okay, so you wrote a really cool batch script. Now what information do you put at the top?
After writing many, many batch scripts with really nothing but the filename and modified date as &#8220;information&#8221; I looked around a bit and put together this from what I saw.
rem **********************************
rem * Desktop System setup script
rem * Author: [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so you wrote a really cool <a title="Batch Scripting" href="http://labmice.techtarget.com/scripting/default.htm" target="_blank">batch script</a>. Now what information do you put at the top?</p>
<p>After writing many, many batch scripts with really nothing but the filename and modified date as &#8220;information&#8221; I looked around a bit and put together this from what I saw.</p>
<p>rem **********************************<br />
rem * Desktop System setup script<br />
rem * Author: Thomas Thrush<br />
rem * admin@company.com<br />
rem * Last modified : 17-Nov-2006<br />
rem **********************************</p>
<p>Now this is a pretty simple entry; other entries may include History, Notes, Revision Numbers, etc. Various scripting languages have there own way of commenting out text, but the information still applies.</p>
<p>The point is, put something there for future reference. When a script has to be modified many months down the road, the editor (which might be you) will be glad you did.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.meltivore.com/2008/script-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
