Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How to delete a DFS node using Powershell

Reply
 
Old 02-19-2008   #1 (permalink)
Richard Adams


 
 

How to delete a DFS node using Powershell

Does anybody know how to delete a dfs node (rather than the file structure it
refers to) using Powershell? I had hoped to use the WMI WIN32_DFSNODE but
that only appears to have a delete method. I've seen references to
NetDfsRemove in the platform SDK, but I'm wary of using this - I'm an admin
who scripts, not a developer! Is my only (safer) option to call DFSCMD from
PSH?

--
Richard Adams
MCSE, CNE, etc

My System SpecsSystem Spec
Old 02-19-2008   #2 (permalink)
Marco Shaw [MVP]


 
 

Re: How to delete a DFS node using Powershell

Richard Adams wrote:
Quote:

> Does anybody know how to delete a dfs node (rather than the file structure it
> refers to) using Powershell? I had hoped to use the WMI WIN32_DFSNODE but
> that only appears to have a delete method. I've seen references to
> NetDfsRemove in the platform SDK, but I'm wary of using this - I'm an admin
> who scripts, not a developer! Is my only (safer) option to call DFSCMD from
> PSH?
>
If you're an admin, and don't want to get too deep, then call dfscmd
from PowerShell, and you're done.

I didn't check, but this might be access from .NET, but you're crossing
the admin/dev line...

Don't reinvent the wheel, use the old command...

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
get child node of selected parent node .NET General
Re: Remove XML element from a node PowerShell
XML node passed to function PowerShell
Removing an XML node .NET General
Counting a particular node in a XML file PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46