<?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>Server 2008 R2 - Fix The Exchange!</title>
	<atom:link href="https://www.fixtheexchange.com/tag/server-2008-r2/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fixtheexchange.com</link>
	<description>Official Blog of Josh M. Bryant</description>
	<lastBuildDate>Fri, 05 Dec 2025 16:17:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>Configuring 193 disks in under 2 minutes with PowerShell and diskpart.</title>
		<link>https://www.fixtheexchange.com/2011/09/02/configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart</link>
		
		<dc:creator><![CDATA[Josh Bryant]]></dc:creator>
		<pubDate>Fri, 02 Sep 2011 23:24:26 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Server 2008 R2]]></category>
		<guid isPermaLink="false">http://www.fixtheexchange.com/configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart/</guid>

					<description><![CDATA[<p>Today at work I had to partition, format, and label, 193 disks, in Server 2008 R2. Each disk was a LUN on an EMC SAN. The server is an HP ProLiant BL460c G7 Server Blade. This will be an Exchange 2010 mailbox server that is part of a Database Availability Group (DAG) when it is [&#8230;]</p>
<p>The post <a href="https://www.fixtheexchange.com/2011/09/02/configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart/">Configuring 193 disks in under 2 minutes with PowerShell and diskpart.</a> first appeared on <a href="https://www.fixtheexchange.com">Fix The Exchange!</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Today at work I had to partition, format, and label, 193 disks, in Server 2008 R2.  Each disk was a LUN on an EMC SAN.  The server is an <a href="http://www.jdoqocy.com/click-5436907-10913059?url=http%3A%2F%2Fhpsmb.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1VYQxVqFm4XYxxOAgRKbWYTUFhBFmxDczhqAgcfAgduY09UUUEUZAsXH2UOODtZRkAKF3A6WFJbQhdwUzQzZANaQB5aMD9ABxgHTixabCA2S1NFXURxMxwTVANAOVoZXEstIjpKFGBCWjsnDBcnGk87bSd5Zx4DFnZXMjsDGiIXHG0NdnR1b1NDVWgWFlJQX0oZaRlXXBkAChZ5FFpFVS87C14OC34sFnp1Y3JRXlVNcCEKER0WUzpeNyU1SFdUbkM6IBkGGQAHLU1HXEsnIW5OW1lvCTw*BgYFB0g6C31iMF1cU19SOm9TAAcaQjVWJ2tt%26nAID%3D11138&#038;cjsku=630442-S01" target="_top">HP ProLiant BL460c G7 Server Blade</a><img decoding="async" src="http://www.lduhtrp.net/image-5436907-10913059" width="1" height="1" border="0"/>.  This will be an Exchange 2010 mailbox server that is part of a Database Availability Group (DAG) when it is finished, so 94 of these disks are for databases and 94 are for transaction logs.</p>
<p>5 of the disks received drive letters, the remaining 188 are to be volume mount points.  There was no way I was going to do any of this manually, so I created some PowerShell scripts that use the diskpart command to do all the work for me.  The result is having 5 disks partitioned, formatted, labeled and drive letters assigned.  Then 188 folders get created for use as the volume mount points.  The remaining 188 disks get partitioned, formatted, and labeled.   I&#8217;m still trying to work out a way to script mapping the volume mount points to the folders, so this is a work in progress.  (UPDATED: <a href="http://www.fixtheexchange.com/creating-188-volume-mount-points-in-under-2-minutes-with-powershell-and-diskpart/">Click here to see how I solved this problem.</a>)</p>
<p>First we have the primarydrives.txt script for diskpart to create the main drives that actually have letters assigned to them:<br />
<code><br />
select disk 3<br />
create partition primary NOERR<br />
format FS=NTFS LABEL="SAN Exchange" UNIT=64K QUICK NOWAIT NOERR<br />
assign letter=D NOERR<br />
select disk 4<br />
create partition primary NOERR<br />
format FS=NTFS LABEL="SAN Temp" UNIT=64K QUICK NOWAIT NOERR<br />
assign letter=T NOERR<br />
select disk 196<br />
create partition primary NOERR<br />
format FS=NTFS LABEL="SAN Tracking Logs" UNIT=64K QUICK NOWAIT NOERR<br />
assign letter=M NOERR<br />
select disk 5<br />
create partition primary NOERR<br />
format FS=NTFS LABEL="SAN Databases" UNIT=64K QUICK NOWAIT NOERR<br />
assign letter=E NOERR<br />
select disk 6<br />
create partition primary NOERR<br />
format FS=NTFS LABEL="SAN Exchange" UNIT=64K QUICK NOWAIT NOERR<br />
assign letter=L NOERR<br />
</code></p>
<p>Next we have the fvmpcreate.ps1 script that creates folders based on names in a text file.  I had a spreadsheet with what the database names are going to be, so I just copied those to the text file to use for this script.  This script also writes a text file for use by diskpart to partition, format, and label each disk.   Like I said, I&#8217;m still working on how to get it to map the volume mount points to the folders created by the script.<br />
<code><br />
# Folder and Volume Mount Point Creation Script<br />
# By Josh M. Bryant<br />
# www.fixtheexchange.com<br />
# Last Updated 9/2/2011 3:40 PM<br />
#<br />
$dbfile = "C:Scriptsdbdrives.txt"<br />
$logfile = "C:Scriptslogdrives.txt"<br />
$dbdata = Get-Content C:Scriptsdbnames.txt<br />
$ldata = Get-Content C:Scriptslognames.txt<br />
$dbpath = "E:EXCH10"<br />
$logpath = "L:EXCH10"<br />
$drive = 6<br />
#<br />
#Create Database Folders and Volume Mount Points<br />
#<br />
ForEach ($line in $dbdata)<br />
{$drive = $drive + 1<br />
New-Item $dbpath$line -type directory<br />
add-content -path $dbfile -value "select disk $drive"<br />
add-content -path $dbfile -value "create partition primary NOERR"<br />
add-content -path $dbfile -value "format FS=NTFS LABEL=`"$line`" UNIT=64K QUICK NOWAIT NOERR"<br />
}<br />
#<br />
#Create Log Folders and Volume Mount Points<br />
#<br />
ForEach ($line in $ldata)<br />
{$drive = $drive + 1<br />
New-Item $logpath$line -type directory<br />
add-content -path $logfile -value "select disk $drive"<br />
add-content -path $logfile -value "create partition primary NOERR"<br />
add-content -path $logfile -value "format FS=NTFS LABEL=`"$line`" UNIT=64K QUICK NOWAIT NOERR"<br />
}<br />
</code></p>
<p>The last script I called createdrives.ps1, this is the master script that calls all the others.<br />
<code><br />
# Exchange Drive Creation Script<br />
# By Josh M. Bryant<br />
# www.fixtheexchange.com<br />
# Last Updated 9/2/2011 3:55 PM<br />
#<br />
# Create primary drives.<br />
diskpart /s C:Scriptsprimarydrives.txt > primarydrives.log<br />
# Wait for disks to format.<br />
sleep 30<br />
# Create EXCH10 Folders<br />
New-Item E:EXCH10 -type directory<br />
New-Item L:EXCH10 -type directory<br />
# Create Folders and Diskpart Scripts<br />
& "C:Scriptsfvmpcreate.ps1"<br />
# Create Volume Mount Points for Databases<br />
diskpart /s C:Scriptsdbdrives.txt > dbdrives.log<br />
# Create Volume Mount Points for Logs<br />
diskpart /s C:Scriptslogdrives.txt > logdrives.log<br />
</code></p>
<p>This ended up being a huge time saver.  Everything completed in about 2 minutes.   Even if I can&#8217;t figure out how to script out the volume mount point mapping, it will have saved me a tremendous amount of time.   The best part is this is scalable, so I can easily adapt it for use on other servers, regardless of the number of disks that need to be configured.</p>
<p>UPDATE: <a href="http://www.fixtheexchange.com/creating-188-volume-mount-points-in-under-2-minutes-with-powershell-and-diskpart/">Click here to see how I solved the volume mount point creation.</a></p>
<p>If you use these scripts, or want to re-post them anywhere else, please keep the author information at the top of the script, and include a link back to this site.  Thanks!</p>
<div class="saboxplugin-wrap" itemtype="http://schema.org/Person" itemscope itemprop="author"><div class="saboxplugin-tab"><div class="saboxplugin-gravatar"><img decoding="async" src="https://www.fixtheexchange.com/wp-content/uploads/2025/12/4000px_transparent-scaled.png" width="100"  height="100" alt="" itemprop="image"></div><div class="saboxplugin-authorname"><a href="https://www.fixtheexchange.com/author/josh/" class="vcard author" rel="author"><span class="fn">Josh Bryant</span></a></div><div class="saboxplugin-desc"><div itemprop="description"><p>Cybersecurity Product Leader and internationally recognized Speaker at several Information Security conferences and events with over 26 years of experience as a proven leader in Cybersecurity, Product Management, Threat Hunting, Incident Response, IT Management, IT Architecture, IT Operations, IT Engineering, and Messaging Systems, on a global scale, across a diverse set of industries in both the Public and Private sectors.</p>
</div></div><div class="saboxplugin-web "><a href="http://192.168.2.21:30040" target="_self" >192.168.2.21:30040</a></div><div class="clearfix"></div><div class="saboxplugin-socials sabox-colored"><a title="Linkedin" target="_self" href="https://www.linkedin.com/in/josh-m-bryant/" rel="nofollow noopener" class="saboxplugin-icon-color"><svg class="sab-linkedin" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.8 250.7c0 7.6-0.4 15.2-1 22.6-0.2 2.2-0.4 4.4-0.7 6.6-0.1 0.6-0.1 1.1-0.2 1.7-0.3 2.6-0.7 5.2-1.1 7.7-0.4 2.3-0.8 4.7-1.2 7 0 0.3-0.1 0.6-0.2 0.9-0.2 1-0.4 1.9-0.5 2.9-0.2 0.8-0.4 1.6-0.5 2.5-0.1 0.3-0.1 0.5-0.2 0.8-0.7 3.3-1.5 6.5-2.3 9.7-0.6 2.3-1.2 4.5-1.9 6.8-1.5 5.3-3.2 10.5-5 15.6-26.7 73.9-87.3 131.6-163.2 154.2-3 0.9-6.1 1.8-9.2 2.6-1.5 0.4-3 0.8-4.5 1.1-3.6 0.9-7.2 1.6-10.9 2.3h-0.2c-0.2 0-0.3 0.1-0.5 0.1l-3 0.6c-1.8 0.3-3.6 0.6-5.4 0.9-0.2 0-0.3 0.1-0.5 0.1-0.9 0.1-1.9 0.3-2.8 0.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.7 0-249.3-111.6-249.3-249.3s111.6-249.4 249.3-249.4 249.3 111.7 249.3 249.4z" fill="#0077b5" /><path class="st1" d="m485 335.5c-26.7 73.9-87.3 131.6-163.2 154.2-3 0.9-6.1 1.8-9.2 2.6-1.5 0.4-3 0.8-4.5 1.1-3.6 0.9-7.2 1.6-10.9 2.3h-0.2l-148.3-148.1 35.3-142.9-32-37.6 38.1-38.7 68 68.4h11.9l9.5 9.3 70.5-3.9 135 133.3z" /><path class="st2" d="m195.6 347.6h-46.9v-150.8h46.9v150.8zm-23.5-171.4c-15 0-27.1-12.4-27.1-27.4s12.2-27.1 27.1-27.1c15 0 27.1 12.2 27.1 27.1s-12.1 27.4-27.1 27.4zm198.9 171.4h-46.8v-73.4c0-17.5-0.4-39.9-24.4-39.9-24.4 0-28.1 19-28.1 38.7v74.7h-46.8v-150.9h44.9v20.6h0.7c6.3-11.9 21.5-24.4 44.3-24.4 47.4 0 56.1 31.2 56.1 71.8l0.1 82.8z" /></svg></span></a><a title="Twitter" target="_self" href="https://x.com/FixTheExchange" rel="nofollow noopener" class="saboxplugin-icon-color"><svg class="sab-twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 148 148">
  <path d="M 63.907 0.948 C 37.893 3.663 14.65 20.788 4.083 45.024 C -2.727 60.67 -3.86 78.686 0.975 95.272 C 6.947 115.953 22.396 133.424 42.387 142.162 C 58.034 148.972 76.05 150.106 92.636 145.27 C 117.461 138.113 137.009 117.731 143.424 92.408 C 153.443 52.724 128.862 12.148 89.079 2.675 C 80.342 0.602 72.646 0.058 63.907 0.948 Z M 64.893 46.801 C 71.21 55.192 76.544 62.103 76.741 62.103 C 76.938 62.103 83.504 55.192 91.252 46.801 L 105.419 31.5 L 113.463 31.5 L 111.735 33.328 C 110.749 34.361 104.332 41.322 97.47 48.775 C 90.61 56.229 83.898 63.483 82.563 64.817 L 80.194 67.334 L 98.705 91.965 C 108.874 105.538 117.215 116.789 117.215 116.99 C 117.215 117.238 111.145 117.383 103.787 117.383 L 90.314 117.334 L 77.777 100.553 C 69.14 88.954 65.092 83.965 64.697 84.265 C 64.401 84.512 57.39 92.065 49.1 101.046 L 34.045 117.383 L 30.242 117.383 C 28.122 117.383 26.395 117.283 26.395 117.138 C 26.395 116.99 34.243 108.398 43.816 98.084 C 53.345 87.768 61.243 79.131 61.339 78.984 C 61.391 78.784 53.542 68.074 43.918 55.192 C 34.293 42.359 26.395 31.747 26.395 31.646 C 26.395 31.55 32.465 31.5 39.919 31.5 L 53.442 31.5 L 64.893 46.801 Z M 64.893 46.801" />
  <path d="M 38.588 38.114 C 38.784 38.459 51.22 55.142 66.128 75.082 L 93.276 111.411 L 99.344 111.461 C 103.098 111.461 105.368 111.263 105.267 110.966 C 105.222 110.721 92.832 94.04 77.827 73.949 L 50.48 37.423 L 44.361 37.423 C 39.279 37.423 38.242 37.524 38.589 38.114 L 38.588 38.114 Z M 38.588 38.114" />
</svg></span></a><a title="Github" target="_self" href="https://github.com/FixTheExchange" rel="nofollow noopener" class="saboxplugin-icon-color"><svg class="sab-github" viewBox="0 0 500 500.7" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="st0" d="m499.8 250.7c0 9.9-0.6 19.7-1.7 29.2-0.1 0.6-0.1 1.1-0.2 1.7-0.3 2.6-0.7 5.2-1.1 7.7-0.4 2.3-0.8 4.7-1.2 7-0.2 1.3-0.5 2.5-0.7 3.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.5 1.6-13.2 2.8-20 3.9-0.2 0-0.3 0.1-0.5 0.1-0.9 0.1-1.9 0.3-2.8 0.4-5.5 0.8-11.1 1.3-16.7 1.7-0.8 0.1-1.6 0.1-2.4 0.1-5 0.3-10.1 0.4-15.2 0.4-137.7 0-249.3-111.6-249.3-249.3s111.6-249.4 249.3-249.4 249.3 111.7 249.3 249.4z" fill="#4078c0" /><path class="st1" d="m495.6 296.3c-0.2 1.3-0.5 2.5-0.7 3.8-0.2 1.1-0.5 2.2-0.7 3.3-1.2 5.6-2.6 11-4.2 16.5-23.4 81.3-87.1 145.6-168.2 169.8-4.5 1.3-9.1 2.6-13.7 3.7-6.5 1.6-13.2 2.8-20 3.9l-140.4-141.1-14.9-35.9-7.8-71 32.6-89.2 79.9-17.7 111.5 7.2 146.6 146.7z" /><path class="st2" d="m204 339c0 1.2-1.3 2.1-3 2.1-1.9 0.2-3.3-0.8-3.3-2.1 0-1.2 1.3-2.1 3-2.1 1.8-0.1 3.3 0.8 3.3 2.1zm-18.1-2.6c-0.4 1.2 0.8 2.5 2.5 2.8 1.5 0.6 3.3 0 3.6-1.2s-0.8-2.5-2.5-3c-1.5-0.3-3.2 0.3-3.6 1.4zm25.7-1c-1.7 0.4-2.8 1.5-2.7 2.8 0.2 1.2 1.7 1.9 3.4 1.5s2.8-1.5 2.7-2.7c-0.2-1-1.7-1.7-3.4-1.6zm38.2-222.8c-80.6 0-142.3 61.2-142.3 141.9 0 64.5 40.6 119.7 98.5 139.1 7.4 1.3 10.1-3.3 10.1-7 0-3.6-0.2-23.5-0.2-35.7 0 0-40.7 8.7-49.2-17.3 0 0-6.6-16.9-16.2-21.3 0 0-13.3-9.1 0.9-9 0 0 14.5 1.2 22.4 15 12.7 22.4 34.1 16 42.4 12.2 1.3-9.3 5.1-15.8 9.3-19.6-32.5-3.6-65.3-8.3-65.3-64.2 0-16 4.4-24 13.7-34.2-1.5-3.8-6.5-19.4 1.5-39.5 12.2-3.8 40.1 15.7 40.1 15.7 11.6-3.3 24.1-4.9 36.5-4.9s24.9 1.7 36.5 4.9c0 0 28-19.5 40.1-15.7 8 20.2 3 35.7 1.5 39.5 9.3 10.3 15 18.3 15 34.2 0 56.1-34.2 60.6-66.7 64.2 5.3 4.6 9.9 13.3 9.9 27 0 19.6-0.2 43.8-0.2 48.6 0 3.8 2.7 8.4 10.1 7 58.1-19.3 97.6-74.5 97.6-139 0.1-80.6-65.3-141.9-146-141.9zm-85.8 200.6c-0.8 0.6-0.6 1.9 0.4 3 0.9 0.9 2.3 1.3 3 0.6 0.8-0.6 0.6-1.9-0.4-3-0.9-1-2.2-1.4-3-0.6zm-6.3-4.7c-0.4 0.8 0.2 1.7 1.3 2.3 0.9 0.6 2.1 0.4 2.5-0.4s-0.2-1.7-1.3-2.3c-1.1-0.4-2-0.2-2.5 0.4zm18.9 20.7c-0.9 0.8-0.6 2.5 0.8 3.6 1.3 1.3 3 1.5 3.8 0.6 0.8-0.8 0.4-2.5-0.8-3.6-1.3-1.4-3.1-1.6-3.8-0.6zm-6.6-8.6c-0.9 0.6-0.9 2.1 0 3.4s2.5 1.9 3.3 1.3c0.9-0.8 0.9-2.3 0-3.6s-2.4-1.8-3.3-1.1z" /></svg></span></a></div></div></div><p>The post <a href="https://www.fixtheexchange.com/2011/09/02/configuring-193-disks-in-under-2-minutes-with-powershell-and-diskpart/">Configuring 193 disks in under 2 minutes with PowerShell and diskpart.</a> first appeared on <a href="https://www.fixtheexchange.com">Fix The Exchange!</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
