Problem
When using Get-SMBShareAccess on a large collection of SMB Shares (~10,000),
the performance degrades significantly. I would like to figure out a way to make
this go faster.
Environment Information:
- Windows Server 2012 R2
- PSVersion 5.1.14409.1018
- SmbShare module 2.0.0.0
What I've Tried
I tried adding the ThrottleLimit parameter and reducing the number, with the
thought that perhaps it was running too many at once causing a problem. I also
tried batching the calls into smaller pieces but this did not seem to help.
Code
$smbShares = Get-SMBShare | Where-Object { $_.Path -like "C:\MyPath" }
$smbAcls = $smbShares | Get-SMBShareAccess
How can I make this perform faster?