PowerTip: Use PowerShell to Find SMB Shares

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.

Comments (2)

  1. tommymaynard says:

    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.

  2. Max I says:

    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

Skip to main content