PoshTip #36 – How To List All Your Windows Shares?

One of the solutions is to open “Computer Management” and navigate to:

System Tools – > Shared Folders -> Shares.

But that’s really boring! Please use PowerShell and the Get-WmiObject cmdlet to list your Windows Shares on your Windows machine:

PS > Get-WmiObject -Query "SELECT Name, Path FROM Win32_Share" | Format-Table Name, Path

Name    Path
----    ----
ADMIN$  C:\WINDOWS
C$      C:\
Data    D:\Data
IPC$
Tips    G:\Tips
Drop    F:\Drop

 

Thanks for reading! You can follow me on Twitter @PrigentNico

 

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.