<?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 Use a Logon Script to Remove All Mapped Drives?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/15/how-can-i-use-a-logon-script-to-remove-all-mapped-drives.aspx</link><description>Hey, Scripting Guy! How can I use a logon script to remove all mapped drives each time a user logs on? -- VS 
 
 Hey, VS. You know, we’re glad you specifically mentioned the term “logon script” in your question. Why? Well, one of the drawbacks to mapping</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 Use a Logon Script to Remove All Mapped Drives?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/15/how-can-i-use-a-logon-script-to-remove-all-mapped-drives.aspx#3559004</link><pubDate>Fri, 15 Mar 2013 19:14:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3559004</guid><dc:creator>Matt L</dc:creator><description>&lt;p&gt;Thanks SO much for this script! &amp;nbsp;You just saved me a ton of head scratching. &amp;nbsp;It works great!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3559004" width="1" height="1"&gt;</description></item><item><title>re: How Can I Use a Logon Script to Remove All Mapped Drives?</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/15/how-can-i-use-a-logon-script-to-remove-all-mapped-drives.aspx#3471090</link><pubDate>Thu, 15 Dec 2011 16:55:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3471090</guid><dc:creator>Mark Jones</dc:creator><description>&lt;p&gt;If a user connects to a network path and provides credentials there will be a mapping without a letter - causing the script to fail. The for/next loop should be modified as follows:&lt;/p&gt;
&lt;p&gt;For i = 0 to colDrives.Count-1 Step 2&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if colDrives.Item(i)&amp;gt;&amp;quot;&amp;quot; Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;objNetwork.RemoveNetworkDrive colDrives.Item(i) &amp;#39;unmap by letter if it exists&lt;/p&gt;
&lt;p&gt; &amp;nbsp;else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;objNetwork.RemoveNetworkDrive colDrives.Item(i+1) &amp;#39;otherwise unmap by UNC&lt;/p&gt;
&lt;p&gt; &amp;nbsp;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=3471090" width="1" height="1"&gt;</description></item></channel></rss>