Tuesday, April 21, 2015

What Username Mounted That Drive?

A few months ago, I had to upgrade a system that wasn't documented. A key piece of the system was a Windows network drive that automatically connected when the workstations started up. In order to do the upgrade without accidentally breaking the system, I needed to know what user account was used to mount the drive.

A little bit of research turned up the following command, which I found really helpful. I am documenting it here just in case it helps anyone (including me) in the future.

wmic netuse where LocalName="Z:" get UserName /value

Note that "Z:" should be replaced with whatever drive letter you need to check.

Credit where its due: http://stackoverflow.com/questions/9037503/determine-domain-and-username-used-to-map-a-network-drive

No comments:

Post a Comment