Logical Drive report

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 weeks 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
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

Was this done ON it101 or remotely to it? What drives should be seen, ie:A: - floppyC: - hard driveD: - DVDE: - hard drive partition
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

Can you run WBEMtest ON it101? We need to verify that the class is working properly locally. I'd test both win32_networkconnection and win32_mappedlogicaldisk.
User avatar
dvendt
Posts: 48
Last visit: Fri May 27, 2011 3:44 am

Logical Drive report

Post by dvendt »

working properly from 1t101 using rootcimv2
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

I realized I might have been getting bogus results since I was logged on to the remote machine with the same credentials as the local machine. Now querying my XP box remotely:win32_mappedlogicaldisk = Nothingwin32_logicaldisk = all but networked driveswin32_networkconnection = nothingMore along the lines I think of your situation. Not that I have any idea on how to fix this.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

I can remotely get MappedLogicalDisk to work but only if I use alternate credentials for the currently logged on user. Certainly not practical or secure.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

There's no quick, easy or complete way to discover what drives a user has mapped remotely. The process as I see it would be to 1. identify the currently logged on user2. Retrieve their SID3. Connect to the HKU*SID*Network and enumerateThis won't show drives mapped as part of the logon script, but hopefully you already know what those are.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Logical Drive report

Post by jhicks »

I think the original intent is to quickly document mapped network drives on a user's desktop. If that's the case, one way might be to add some code to the end of a logon script to enumerate all mapped drives and write the information to a database or text file on a network share.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Logical Drive report

Post by jvierra »

Ok - I was wrong. The limit is set to 15 minutes.
At a commad prompt type this:
net config server

and get back this

Server Name OMEGA2Server Comment A good day to Server
Software version Windows 2002Server is active on NetbiosSmb (000000000000)
NetBT_Tcpip_{42617080-C738-4F4D-BA67-D6D0E69AD8A4} (000bcd5100f7)Server hidden NoMaximum Logged On Users 10Maximum open files per session 16384
Idle session time (min) 15The command completed successfully.



Autodisconnect can be managed via GPO and at teh prompt.

NET CONFIG /?
or
net config /autodisconnect:<time in seconds>[-1 to disable]
or in the LANMANSERVER registry group paramaters.
jvierra2009-03-23 15:17:40
This topic is 15 years and 3 weeks 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