List mapped network drives for particular user. RRS feed

  • Question

  • Hi,

    I'm creating a PowerShell script which will create a report of mapped network drive for particular user.

    username should be provided as parameter to the script.

    till now I've tried to use "net use" but it is only showing me the mapped drives for the user through which powershell is running.

    is there any place where I can find the complete information about network drives for all the users.

    Wednesday, June 12, 2019 2:26 PM

All replies

  • YU cannot get user mapped drives with PowerShell.  The drives only exist in the users logged in session.  They are not persisted.

    TO get the persistent drive you can query the user hove but each users hive must be loaded then unloaded.  This is not recommended as the user cannot log in if the hive is loaded to another user.


    Wednesday, June 12, 2019 3:12 PM