Skip to content

Instantly share code, notes, and snippets.

@norman-bauer
Last active January 11, 2023 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norman-bauer/d4e2e3b4b66f67cbc078b531cbbf02f1 to your computer and use it in GitHub Desktop.
Save norman-bauer/d4e2e3b4b66f67cbc078b531cbbf02f1 to your computer and use it in GitHub Desktop.
This script helps raising certain File Server Resource Manager Report limits.
$fsrm = New-Object -ComObject "Fsrm.FsrmReportManager"
enum FsrmReportLimit {
MaxFiles = 1
MaxFileGroups = 2
MaxOwners = 3
MaxFilesPerFileGroup = 4
MaxFilesPerOwner = 5
MaxFilesPerDuplGroup = 6
MaxDuplicateGroups = 7
MaxQuotas = 8
MaxFileScreenEvents = 9
MaxPropertyValues = 10
MaxFilesPerPropertyValue = 11
MaxFolders = 12
}
[Enum]::GetValues([FsrmReportLimit]) | foreach {
Write-Host "$($_): $($fsrm.GetReportSizeLimit($_))"
}
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFiles, 2000)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFileGroups, 20)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxOwners, 20)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFilesPerFileGroup, 200)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFilesPerOwnerm, 200)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFilesPerDuplGroup, 20)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxDuplicateGroups, 200)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxQuotas, 2000)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFileScreenEvents, 2000)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxPropertyValues, 20)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFilesPerPropertyValue, 200)
$fsrm.SetReportSizeLimit([FsrmReportLimit]::MaxFolders, 2000)
@norman-bauer
Copy link
Author

Default values are:
MaxFiles: 1000
MaxFileGroups: 10
MaxOwners: 10
MaxFilesPerFileGroup: 100
MaxFilesPerOwner: 100
MaxFilesPerDuplGroup: 10
MaxDuplicateGroups: 100
MaxQuotas: 1000
MaxFileScreenEvents: 1000
MaxPropertyValues: 10
MaxFilesPerPropertyValue: 100
MaxFolders: 1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment