PowerTip: Use PowerShell to Find SMB Shares

PowerTip: Use PowerShell to Find SMB Shares

  • Comments 3
  • Likes

Summary: Learn how to use Windows PowerShell to find SMB shares. 

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily find a list of all the SMB shares on my Windows 8.1 laptop?

Hey, Scripting Guy! Answer Use the Get-SMBShare function.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • How to do it in PS 2.0 ?

    The term 'Get-SMBShare' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th
    e spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:13
    + Get-SMBShare
    + CategoryInfo : ObjectNotFound: (Get-SMBShare:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • In earlier versions of PowerShell you can either use WMI or the Net command. To use the Net command, enter net share at the command line. To use WMI, try Get-WmiObject -Class Win32_Share. If you run this command side-by-side to Get-SMBShare on Windows 8.1 you will see how they product the exact output.