Skip to Main Content
1 VOTE
Status Already exists
Created by Paul Klerkx
Created on Feb 2, 2021

return the currently logged in users mapped network drives.

Through our business, we utilize a large number of mapped network drives When an end user requests recovery of files from a mapped drive, it is then a process to identify what mapped drive path that user is referring to. For our Service Desk to be able to recover it in the background using RCT would simplify this process. maybe a "Logged on User" tab in the system information component.


if it helps

this gets you logged on username

$LoggedOnUserName = (Get-WmiObject -Class Win32_Process -Filter 'Name="explorer.exe"').GetOwner().User


this code gets the mapped drives of the user that runs it and outputs the drives

get-wmiobject -Class win32_LogicalDisk -Filter "DriveType=4" | ForEach-Object { Write-Host ("{0} {1}" -f ($_.DeviceID), ($_.ProviderName)) }



Product Endpoint Insights
  • Attach files
  • Admin
    Garth Jones
    Reply
    |
    May 31, 2022

    Glad that you found that useful.

  • Paul Klerkx
    Reply
    |
    May 31, 2022

    @garth Jones - didn't realize that. that works, thanks for that.

  • Admin
    Garth Jones
    Reply
    |
    May 30, 2022

    You can kind of do this already with Endpoint Insights. Using the Resource Explorer you can see the mapped drive and printers for ALL users of a computer from there last HW inventory.