Disconnect mapped drive via GUI object Shell.Application


trying find way call gui disconnect of mapped network drive can remove drives explorer when in disconnected state. net use removes drive not reference drive in explorer when drives disconnected (right click disconnect removes explorer reference well)

i have looked at

$shell = new-object -com "shell.application"
$drive = $shell.namespace("z:")

but cannot find way access context menu , disconnect. have seen scripts pin items taskbar use 'right click' options of file this. not know objects in powershell so  struggling find way. can see $drive.items() , others not have verbs far can see (like taskbar pin script does).

so can advise how can disconnect mapped drive way gui in powershell

thank you.

either refresh or close , open explorer.  there no way thinking about.

\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file