Files
docs/operations/reference/Powershell/SMB/Top Level Permission Report All Shares.md
Nicole Rappe daf24d7480
All checks were successful
GitOps Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 5s
GitOps Automatic Documentation Deployment / Sync Docs to https://docs.bunny-lab.io (push) Successful in 7s
Mass-File and Folder Renaming
2026-02-24 20:26:52 -07:00

648 B

tags
tags
SMB
PowerShell
Permissions
Scripting

Purpose: This script will iterate over all network shares hosted by the computer it is running on, and will give top-level permissions to all the shared folders. It will not navigate deeper than the top-level in its report. Very I/O friendly.

$AllShares = Get-SMBShare | Where-Object {$_.Description -NotMatch "Default share|Remote Admin|Remote IPC|Printer Drivers"} | Select-Object -ExpandProperty Name
ForEach ($SMBDirectory in $AllShares)
{
    Get-SMBShareAccess -Name $SMBDirectory | Export-CSV -Path C:\SMB_REPORT.csv -NoTypeInformation -Append
}