return a collection of all mapped network drive

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
yehuda
Posts: 2
Last visit: Mon Nov 24, 2008 7:12 pm

return a collection of all mapped network drive

Post by yehuda »

hellohow can i return a collection of all the mapped network drives on the computer like this in vbscript:objNetwork.EnumNetworkDrives
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

return a collection of all mapped network drive

Post by jvierra »

$a = get-wmiobject -query "select * from win32_logicaldisk where drivetype = 4"
$a
$a | gm

jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

return a collection of all mapped network drive

Post by jvierra »

<command> | gm

will almost always return teh list of usable methods and properties of an object or collection.

See: help gm

This topic is 15 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked