Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the Windows Script Host RemoveNetworkDrive Method

Windows PowerShell

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


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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft