<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How Can I Find All the Drives Mapped to a Share and Remap Them?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/28/how-can-i-find-all-the-drives-mapped-to-a-share-and-remap-them.aspx</link><description>Hey, Scripting Guy! How can I find all the drives mapped to \\server1\share and remap them to \\server2\share? -- H T-S 
 Hey, H T-S. You know, not too long ago Malcolm Gladwell published a book called The Tipping Point . Loosely speaking, the book posited</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: How Can I Find All the Drives Mapped to a Share and Remap Them?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/28/how-can-i-find-all-the-drives-mapped-to-a-share-and-remap-them.aspx#3452743</link><pubDate>Tue, 13 Sep 2011 01:28:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3452743</guid><dc:creator>Robert Sampson</dc:creator><description>&lt;p&gt;You can use this code to remap a share from one server to a share of the same name on another server.&lt;/p&gt;
&lt;p&gt;On Error Resume Next&lt;/p&gt;
&lt;p&gt;strOldServer = &amp;quot;server1&amp;quot;&lt;/p&gt;
&lt;p&gt;strNewServer = &amp;quot;server2&amp;quot;&lt;/p&gt;
&lt;p&gt;Set objNetwork = CreateObject(&amp;quot;Wscript.Network&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set objFSO = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)&lt;/p&gt;
&lt;p&gt;Set colDrives = objNetwork.EnumNetworkDrives&lt;/p&gt;
&lt;p&gt;For i = 0 to colDrives.Count-1 Step 2&lt;/p&gt;
&lt;p&gt;	strThisServer = Left(Mid(colDrives.Item(i + 1), 3), InStr(Mid(colDrives.Item(i + 1), 3), &amp;quot;\&amp;quot;) - 1)&lt;/p&gt;
&lt;p&gt;	If LCase(strThisServer) = LCase(strOldServer) Then&lt;/p&gt;
&lt;p&gt;		strDriveLetter = colDrives.Item(i)&lt;/p&gt;
&lt;p&gt;		strNewPath = &amp;quot;\\&amp;quot; &amp;amp; strNewServer &amp;amp; &amp;quot;\&amp;quot; &amp;amp; Mid(colDrives.Item(i + 1), Len(&amp;quot;\\&amp;quot; &amp;amp; strOldServer &amp;amp; &amp;quot;\&amp;quot;) + 1)&lt;/p&gt;
&lt;p&gt;		If objFSO.FolderExists(strNewPath) = True Then&lt;/p&gt;
&lt;p&gt;			objNetwork.RemoveNetworkDrive strDriveLetter&lt;/p&gt;
&lt;p&gt;			objNetwork.MapNetworkDrive strDriveLetter, strNewPath&lt;/p&gt;
&lt;p&gt;		End If&lt;/p&gt;
&lt;p&gt;	End If&lt;/p&gt;
&lt;p&gt;Next&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3452743" width="1" height="1"&gt;</description></item><item><title>re: How Can I Find All the Drives Mapped to a Share and Remap Them?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/28/how-can-i-find-all-the-drives-mapped-to-a-share-and-remap-them.aspx#3446764</link><pubDate>Fri, 12 Aug 2011 15:26:14 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3446764</guid><dc:creator>GregR</dc:creator><description>&lt;p&gt;Any chance you can post how to remap any share on server1 to any similarly named share on server2? This is exactly what I need to do. :)&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3446764" width="1" height="1"&gt;</description></item></channel></rss>