Forum Discussion
Check (and modify) network drive mappings as an admin for other users
It does not appear that admins can check/modify a user's network drive mappings (e.g. from `\\server\shares` to a drive letter) via powershell? The various `Smb-` commands seem to be per user, and as far as I can tell, there is no way to run a powershell command as a different user without using their credentials (which seems to be poor security hygiene to ask users for their passwords), even if you are an admin. Am I missing something, or is this not possible?
In case it helps clarify things, what I am asking about is the Windows equivalent to `sudo -u some_user some_command`.
1 Reply
- KamrynimIron Contributor
Network drive mappings created with New-PSDrive or net use are stored within a user's session. These mappings are not system-wide and are tied to the user's logon session, which makes them difficult for an administrator to modify directly without impersonating that user.