Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Posts
    185
    Thanks
    37
    Thanked 1 Time in 1 Post

    find the location of a share name

    So I look at a network with windows explorer. I see a pc and a shared folder. I go to that named pc. How do I find the actual location on that pc which the share name belongs to?

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Peter,

    Here's some PowerShell code that will do the trick:
    Code:
    #Shares Info
      $fmt = @{Expression={$_.Name};Label="Share Name";width=12},
             @{Expression={$_.PSComputerName};Label="Computer Name";Width=15},
             @{Expression={$_.Path};Label="Path";width=15},
             @{Expression={$_.MaximumAllowed};Label="Max Users";width=9}
             "Share Information:"
      Get-CimInstance –Class Win32_Share –ComputerName $compname | `
         Where-Object {$_.Type –eq 0} | Format-Table $fmt
    Sample Output:
    Code:
    Share Information:
    
    Share Name   Computer Name   Path            Max Users
    ----------   -------------   ----            ---------
    JEMDocs                      G:\JEMDocs              2
    print$                       C:\Windows\s...          
    prnproc$                     C:\Windows\s...          
    Users                        C:\Users
    Note: You can adjust the length of the path displayed in the $fmt statement.

    If you haven't used PS before see post #2 in this thread to get started.
    Last edited by RetiredGeek; 2014-10-29 at 08:48.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    1,723
    Thanks
    146
    Thanked 156 Times in 149 Posts
    RG, you made a slight error in your link (even Homer nods ). Petermat - just remove the string url: from the beginning and you'll get the correct page.

  4. The Following User Says Thank You to access-mdb For This Useful Post:

    petermat (2014-10-29)

  5. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Access,

    Thanks, I copied it from a text file where I keep a list of posts I frequently reference and I copied too much! It's fixed now.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. The Following User Says Thank You to RetiredGeek For This Useful Post:

    petermat (2014-10-29)

  7. #5
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,414
    Thanks
    33
    Thanked 195 Times in 175 Posts
    Even easier is to go into a Command Prompt window, and type NET SHARE !
    BATcher

    Time prevents everything happening all at once...

  8. The Following User Says Thank You to BATcher For This Useful Post:

    petermat (2014-10-29)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •