Learn about Windows PowerShell
Summary: Learn how to use Windows PowerShell to find SMB shares.
How can I use Windows PowerShell to easily find a list of all the SMB shares on my Windows 8.1 laptop?
Use the Get-SMBShare function.
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 the 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.