<?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>blog.species5618.net &#187; WSH</title>
	<atom:link href="http://blog.species5618.net/tag/wsh/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.species5618.net</link>
	<description>The time has come to VENT my anger on the world</description>
	<lastBuildDate>Mon, 11 Jul 2011 14:56:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Windows WMI shocker</title>
		<link>http://blog.species5618.net/2008/06/26/windows-wmi-shocker/</link>
		<comments>http://blog.species5618.net/2008/06/26/windows-wmi-shocker/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 14:37:32 +0000</pubDate>
		<dc:creator>Species5618</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[WSH]]></category>

		<guid isPermaLink="false">http://blog.species5618.net/?p=288</guid>
		<description><![CDATA[I have been working on a ZERO touch build script for IIS on and off for a few weeks, One of the last stepping stone for formating the &#8220;data&#8221; drive prior to setting everything up &#8220;FORMAT H: /FS:NTFS /V:ASG&#8221; will prompt for &#8220;do you want to erase all yoiu data&#8221;, and again if the disk [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a ZERO touch build script for IIS on and off for a few weeks, </p>
<p>One of the last stepping stone for formating the &#8220;data&#8221; drive prior to setting everything up</p>
<p>&#8220;FORMAT H: /FS:NTFS /V:ASG&#8221; will prompt for &#8220;do you want to erase all yoiu data&#8221;, and again if the disk is in use !</p>
<p> So enter WMI, after only 20 mins of digging around the the internet I found some code to do a defrag, a few tweaks, and I have some VBS code that will format a DRIVE, NO questions, even if the drive is in use, and it is ONLY 7 lines</p>
<p>strComputer = &#8220;.&#8221;<br />
Set objWMIService = GetObject(&#8220;winmgmts:\\&#8221; &#038; strComputer &#038; &#8220;\root\cimv2&#8243;)<br />
Set colVolumes = objWMIService.ExecQuery (&#8220;Select * from Win32_Volume Where Name = &#8216;H:\\&#8217;&#8221;)<br />
For Each objVolume in colVolumes<br />
     errResult  = objvolume.dismount(1,0)<br />
     errResult = objVolume.format(&#8220;NTFS&#8221;, 1, 4096, &#8220;ASG&#8221;, 0)<br />
Next</p>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http%3A%2F%2Fblog.species5618.net%2F2008%2F06%2F26%2Fwindows-wmi-shocker%2F" send="true" width="450" show_faces="true" font=""></fb:like>]]></content:encoded>
			<wfw:commentRss>http://blog.species5618.net/2008/06/26/windows-wmi-shocker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

