By David Wiseman (Administrator)Created 10 Dec 2007, Modified 23 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:25446
Downloads:348

Remove all mapped network drives

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Yes Windows NT Unknown
Vista Unknown Windows 2008 Unknown
Description

Remove all mapped network drives.


Notes
object.RemoveNetworkDrive(strName, [bForce], [bUpdateProfile]) WshNetwork object. http://msdn2.microsoft.com/en-us/library/d16d7wbf.aspx strName String value indicating the name of the mapped drive you want to remove. The strName parameter can be either a local name or a remote name depending on how the drive is mapped. bForce Optional. Boolean value indicating whether to force the removal of the mapped drive. If bForce is supplied and its value is true, this method removes the connections whether the resource is used or not. bUpdateProfile Optional. String value indicating whether to remove the mapping from the user's profile. If bUpdateProfile is supplied and its value is true, this mapping is removed from the user profile. bUpdateProfile is false by default.  
Code

Line Numbers: On  Off      Plain Text
On Error Resume Next

DIM objNetwork,colDrives,i

Set objNetwork = CreateObject("Wscript.Network")

Set colDrives = objNetwork.EnumNetworkDrives

For i = 0 to colDrives.Count-1 Step 2
	' Force Removal of network drive and remove from user profile 
	' objNetwork.RemoveNetworkDrive strName, [bForce], [bUpdateProfile]
	objNetwork.RemoveNetworkDrive colDrives.Item(i),TRUE,TRUE
Next

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      

Posted On: 10/11/2017 6:02:47 PM

After Pandora Store Sale explaining Moncler Outlet Store how Cromwell’s Pandora Outlet troopers Pandora Official Website “were Coach Bags On Sale taught New Air Max 2017 the value reebok running shoes of co-operation,” and how 23 IS BACK Store “Cromwell günstige nike schuhe built up his nike air jordan pas cher Cavalry on a foundation of Moncler Jackets Discount Marketplace high Official Toms Shoes Outlet individual efficiency,” he goes Cheap Real Jordans on to show nike tn pas cher that, Zapatillas Nike Air Max Baratas “as time Discount TOMS went on and Canada Goose Womens Coats armies Ugg Pas Cher Femme became nike sneakers larger, Hogan Outlet and Discount Ray Ban Sunglasses skill Adidas NMD For Sale at Hugo Boss Sale arms, as Air max levne a national Adidas Originals Sale characteristic, Nike Shox Cheap rarer, drill, Nike Shoes Online discipline, chaussure basket homme man?uvre in Ugg Outlet Online Store mass, Chaussure Air Max and Uggs For Cheap a high scarpe nike degree Nike Online Store of UGG Boots Cheap mobility Air Max Sneakers came longchamp bags on sale to Nike Shoes Sale Store outweigh all New Nike Shoes other Coach Outlet Store Online viiconsiderations; and Michael Kors Clearance when the new pandora charms necessity Reebok Outlet Store of Scarpe Nike Scontate arming the nations retro jordans for cheap brought Adidas Originals Stan Smith about nike jordan shoes short service, the Toms Factory Outlet training Cheap True Religion Jeans of nike shoes the individual, in vans shoe store any other Canada Goose Outlet branch zapatillas nike baratas of his business than Air Max 90 that christian louboutin outlet of riding Air Nike boot-to-boot Cheap Michael Kors Tote Bag and of Timberland Outlet rendering zapatos de futbol nike instant ????? ????? obedience to the Nike Shoes Discount Marketplace word or signal Cheap Michael Kors of Air Max Pas Cher his superior, nike air fell more Adidas Neo Discount Sale and Nike Kyrie more Yeezy Black into Adidas Shoes Discount Marketplace abeyance. Mens Nike Air Max Shock-tactics Chaussure Nike Pas Cher filled the entire Cheap Michael Kors Handbags bill, and Nike Air Pas Cher the Cavalry of Jordan Store Europe, adidas store admirably trained to man?uvre and Nike Air Damen attack, botas de futbol whether Nike Roshe Run by Cheap Nike Free Run the squadron Bottes Ugg Femme Pas Cher of Nike Polo Sale 150 sabres, prada outlet or Pandora Store the Discount Air Max division of asics sko 3,000 Nike Tn Requin Pas Cher or Doudoune Moncler Pas Cher 4,000, converse store was newest lebron shoes practically Chaussure Nike Air Max Pas Cher unfitted for any other Descuentos Nike duty. The Boutique Ugg climax huarache sneakers of TOMS OUTLET incompetency may UGGS For Women be said to have been Nike Air Max Sale reached during the nfl store cycle Air Max Femme of Nike joggesko European warfare, which Nike Air Shoes began with new yeezy shoes the Crimea, and ended Nike Shox discount Sale with TOMS STORE the Russo-Turkish adidas outlet conflict of 1877–78. Original Ugg Boots The Moncler Sale old Canada goose dam spirit Pandora Outlet Store of Nike Roshe Run Sale dash Scarpe Air Max and Yeezy Shoes Discount Marketplace daring TOMS For Sale under fire was Adidas Soccer Cleats Cheap still Toms Outlet Online conspicuous, discipline and mobility chaussures nike pas cher were pandora jewelry store never Michael Kors Outlet higher. Cheap Toms Shoes Outlet The fitflops sale uk regiments pandora beads man?uvred Nike Air Jordan 11 with admirable precision at Uggs Pas Cher Soldes the cheap nike air max highest womens nike air max speed, Christian Louboutin Heels and never had great masses Adidas Yeezy Cheap of horsemen Cheap Retro Jordans For Sale been more Abercrombie and fitch store easily controlled. And Nike Huarache Womens Cheap yet, nike sportschuhe in the whole Jordan Shoes Air history TOMS SHOES OUTLET of Adidas Yeezy Boost 350 For Sale war, it may Air max dam be Louboutin Wedding Shoes doubted Pandora Style Beads whether The official UGG the Doudoune Moncler Femme Pas Cher record of the UGG BOOTS FOR WOMEN Cavalry was canada goose jackets on sale ever Canada Goose Online Store more Cheap Nike Air Huarache meagre.” Referring ugg factory outlet specially to chaussure adidas pas cher the suivre un envoi German Cavalry during Moncler Outlet Online the Cheap Air Max Trainers war Yeezy Men of Nike Factory Outlet 1870–71, Nike Air Huarache For Sale Henderson says: Jordan Sneakers For Sale “The Stone Island Outlet troopers Boty Nike Air knew nothing Nike Free Run 5.0 Womens whatever Cheap Air Max of louboutin heels fighting Ray Ban Sunglasses Online on nike sb stefan janoski foot—their movements Canada Goose Outlet were impeded by Kobe Shoes Nike their equipment--and Nike Air Sneakers a nike schuhe günstig few Adidas Originals Superstar Francs-tireurs, armed ADIDAS NMD SALE ON LINE with Cheap True Religion Jeans the chassepot, were Negozi Pandora enough to Cheap Louboutin Heels paralyze a Billige Nike Sko whole Adidas Superstar Sale Online brigade.... Nike Outlet In Yeezy Boost Sale Online fact, Moncler Outlet to the Nike Store student canada goose jacket outlet who follows air force one pas cher out cheap uggs the operations of the Michael Kors Cavalry of 1870–71 step cheap uggs for women by Nike Air 90 step, Michael Kors Handbags Discount and who Hyperdunk 2014 bears in Pandora Store mind ugg clearance its Cheap Toms Outlet Store deficiencies in Discount Christian Louboutin Shoes armament Boost Yeezy Sale On Line and training, it will new jordan releases appear Nike Air Max Cheap very Nike Pas Cher Femme doubtful Vans Black Sneakers whether a Ugg boots Sale strong Air Max Kopen body Cheap Nike Huarache of Zapatillas Air Max mounted Nike Soccer Cleats Boots riflemen of nike mercurial soccer cleats the same type coach factory outlet online as the toms shoes outlet Boers, or better Nike Outlet Store still, of Nike Air Max Goedkoop Sheridan’s ?????? ????? or Doudoune Moncler Site Officiel Stuart’s ugg store Cavalry Official NHL Jerseys in the last years of the War Nike Factory Store of Secession, would not Soccer Boots Outlet nike have Nike Air Women held the UGGS Outlet German horsemen Ugg Pas Cher En France at bay Air Jordan Retro Sale from the first Christian Louboutin Shoes Outlet moment they moncler jacket sale crossed Jordan Shoes For Cheap the Adidas Superstar frontier.”