Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:27:18+00:00 2026-06-14T17:27:18+00:00

On a Windows PC (say MYPC) I have multiple mapped drives; according to net

  • 0

On a Windows PC (say “MYPC”) I have multiple mapped drives; according to net use:

>net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           X:        \\BLAHBLAH1\e$            Microsoft Windows Network
OK           Y:        \\BLAHBLAH2\e$            Microsoft Windows Network
OK           Z:        \\BLAHBLAH3\s$            Microsoft Windows Network
The command completed successfully.

But when I run this Powershell on that PC:

$disks = Get-WmiObject -Class Win32_MappedLogicalDisk -Filter "DeviceID='Z:'"
foreach($disk in $disks)
{
      [Console]::WriteLine("DEBUG: " + $disk.Name + " is " + $disk.ProviderName );
}

It returns:

DEBUG: \\MYPC\root\cimv2:Win32_MappedLogicalDisk.DeviceID="Z:",SessionID="4491554321" is \\OTHERPC\c$\
DEBUG: \\MYPC\root\cimv2:Win32_MappedLogicalDisk.DeviceID="Z:",SessionID="3129225404" is \\BLAHBLAH3\s$
DEBUG: \\MYPC\root\cimv2:Win32_MappedLogicalDisk.DeviceID="Z:",SessionID="5884378361" is \\BLAHBLAH3\s$

Where did these other Z mapped drives come from? How do they occupy the same drive letter? Can I tell if they’re safe to remove, and if so how?

MYPC is actually a server, so I cannot just wipe out all mapped drives (I would do that normally).

If this is due to mapped drives showing up from other users, how can I change the Powershell to narrow down to only the logged-in user (exactly how net use seems to act)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:27:19+00:00Added an answer on June 14, 2026 at 5:27 pm

    did you try to test the availability or status properties of the device?
    this can result with net drive used by locally logged on user see the remarks at bottom of
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa394194(v=vs.85).aspx
    maybe you are running a a terminal server so check Win32_LogonSession class to get more info about the sessions id seen in providerName

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have two windows services running. One service is 'Polling' - it
Lets say we have a derivided class SerializableLabel from the base class System.Windows.Controls. [XmlRoot(SerializableLabel)]
Let say, that i have defined the same function for windows and mac, with
Let's say we have interface window_creator that responsible for creation of windows. For simplicity
This question about Timers for windows services got me thinking: Say I have (and
I have created a loopback Interface card in Windows 7 x64 say the IP
Let's say I have a listbox and two buttons in a windows form application.
I have say 3 projects: one the MVC2 app, the second is Windows Service
Let's say I have a Windows Forms timer configured with a 10 second (10k
Say I have a Windows GUI applications with a buttons on it. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.