
|
email this FAQ to a colleague
Q:
How do I delete a share using ADSI?
A:
Here is some vbscript that uses ADSI to delete a fileshare.
' The name of the share.
strShareName = "MyShare"
' Machine should match the machine where you want to create the share
Set objfServer = GetObject("WinNT://Machine/lanmanserver")
objfServer.Delete "Fileshare", strShareName
Set objfServer= Nothing
- Mark L. Vanscoyk
|