List SMB shares and their permissions on Windows
Enumerate every shared folder on this machine with Get-SmbShare and audit its access list with Get-SmbShareAccess.
Run Get-SmbShare to list all shares on the machine, then Get-SmbShareAccess -Name "Projects" to inspect who can access one.
01Command
Command
$ Get-SmbShare | Format-Table Name,Path,Description -AutoSize; Get-SmbShareAccess -Name "Projects"02What it does
net share does list shares, but Get-SmbShare pipes cleanly and pairs with Get-SmbShareAccess, which separates share ACLs from NTFS ACLs — the two-layer question people always conflate. It also shows the hidden administrative shares (C$, ADMIN$) that 'net share' output makes easy to overlook. Anyone with Everyone:Full on a share is the top finding of any share audit.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-SmbShare | Microsoft LearnEvidence: Microsoft documents Get-SmbShare as retrieving SMB shares exposed by the server, and Get-SmbShareAccess as showing the access control entries of a share.
Last verified: 2026-09-17 · Category: Security & Privacy