Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting the Windows Script Host RemoveNetworkDrive Method


Windows PowerShell


Definition: Removes a shared network drive from your computer system.

RemoveNetworkDrive


Neither Windows PowerShell nor the .NET Framework includes a mechanism for removing a mapped network drive from your computer. Fortunately, though, the command-line utility Net.exe does provide a way for you to remove a mapped network drive from your computer. Want to get rid of drive Z? Then just call Net.exe, using the following syntax:


net use z: /delete



See conversions of other Windows Script Host methods and properties.
Return to the VBScript to Windows PowerShell home page

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.