You can use File Server Resource Manager to cap how much a shared folder holds and to refuse files by name. On Windows Server 2025 it is one role service, and every rule you build in the console has a PowerShell cmdlet behind it, so you can script your file server policy.
You will install FSRM, build a hard quota template and an auto apply quota, add file screens that block executables and ransomware extensions, and generate storage reports. Each limit was tested by overfilling a share over SMB as a normal user. I last ran every step in October 2026 on Windows Server 2025 Datacenter (build 26100) with a 14 GB NTFS data volume.
Before you begin
FSRM works at the volume level through two file system filter drivers, so your server and your disk layout matter more than your share settings. You need the following before you start:
- To use the console, run Windows Server 2025 or 2022 with Desktop Experience.
- To hold the shares, add an NTFS volume, because FSRM refuses ReFS.
- To run the cmdlets, open PowerShell as a local administrator.
- To test the limits, create one or two non-admin accounts.
The lab server, FS01, is a standalone Proxmox VM built from our Windows Server template, with the test users alice and brian as local accounts in a group called FileUsers. On a member of an Active Directory domain you use domain users and groups instead, and nothing else in the steps changes. If you still need a server, the Windows Server 2025 installation guide covers it.
Install File Server Resource Manager
The role service is called FS-Resource-Manager. Add -IncludeManagementTools so that you also get the console and the FileServerResourceManager PowerShell module:
Install-WindowsFeature -Name FS-Resource-Manager -IncludeManagementTools
Installing took 212.8 seconds on a 2 vCPU VM and did not ask for a restart, so you can add the role to a live file server without a maintenance window. The result table confirms it.
Success RestartNeeded ExitCode FeatureResult
------- ------------- -------- -------------
True No Success {File and iSCSI Services, File Server, File Server Resource Manager, Remote Server Administration Tools...}
Two services come with it, and you need only one of them running for enforcement. Confirm that it is running before you create any rules, so that a failed install does not look like a broken rule to you later.
Get-Service SrmSvc, SrmReports | Format-Table Name, Status, StartType -AutoSize
You should see SrmSvc running and set to start automatically.
Name Status StartType
---- ------ ---------
SrmReports Stopped Manual
SrmSvc Running Automatic
SrmSvc enforces your quotas and screens and writes the event log entries, so if it is stopped, nothing you configure later is enforced. SrmReports stays stopped until you run a storage report, which means a stopped state there is normal and you can leave it alone. You open the console with fsrm.msc or from Server Manager under Tools.
Create the shares on an NTFS volume
Quotas and screens attach to folder paths, not to share names, so a rule you put on D:\Shares\Projects applies whether a user writes through SMB or locally on the server. Keep your shares on their own NTFS volume, because a full system drive is a much worse outage than a full data drive. The lab used D: for two shares, one for a team and one for home folders:
New-Item -ItemType Directory D:\Shares\Projects, D:\Shares\Home\alice, D:\Shares\Home\brian -Force
New-LocalGroup -Name 'FileUsers'
foreach ($u in 'alice','brian') {
New-LocalUser -Name $u -Password (ConvertTo-SecureString 'Lab-Only-Pass1!' -AsPlainText -Force) -PasswordNeverExpires
Add-LocalGroupMember -Group 'FileUsers' -Member $u
}
New-SmbShare -Name Projects -Path D:\Shares\Projects -ChangeAccess 'FileUsers' -FullAccess 'Administrators'
New-SmbShare -Name Home -Path D:\Shares\Home -ChangeAccess 'FileUsers' -FullAccess 'Administrators'
icacls D:\Shares /grant 'FileUsers:(OI)(CI)M'
On a domain member, skip the local group and users and replace FileUsers with the domain group that should write to your shares. The share permissions and the NTFS permissions both allow modify, so when a write fails in the tests that follow, you know FSRM refused it and not an ACL. For more share options, see our guide to SMB shares on Windows.
Create a quota template
A quota template holds the limit, the quota type and the notification thresholds. Quotas created from a template keep a link to it, and when you later change the template with Set-FsrmQuotaTemplate, the -UpdateDerived or -UpdateDerivedMatching switch pushes the change to those quotas. List the built-in templates first:
Get-FsrmQuotaTemplate | Format-Table Name, @{n='SizeMB';e={$_.Size/1MB}}, SoftLimit -AutoSize
A fresh install ships twelve templates, and each name tells you the limit and whether it is a monitor-only template.
Name SizeMB SoftLimit
---- ------ ---------
100 MB Limit 100 False
200 MB Limit Reports to User 200 False
Monitor 200 GB Volume Usage 204800 True
Monitor 500 MB Share 500 True
200 MB Limit with 50 MB Extension 200 False
250 MB Extended Limit 250 False
2 GB Limit 2048 False
5 GB Limit 5120 False
10 GB Limit 10240 False
Monitor 3 TB Volume Usage 3145728 True
Monitor 5 TB Volume Usage 5242880 True
Monitor 10 TB Volume Usage 10485760 True
The “Monitor” templates are soft quotas, which only notify you. Everything else is a hard quota, which refuses the write that would cross the limit. Many built-in templates also send email, and if your server has no SMTP server set, each threshold that fires adds an error event to your log (covered in the errors section). To get a template that logs to the event log instead, build your own. Each threshold takes an action, and the action body can use FSRM variables such as [Source Io Owner]:
$warn = New-FsrmAction -Type Event -EventType Warning -Body 'Quota [Quota Path] is at [Quota Used Percent]% ([Quota Used MB] MB of [Quota Limit MB] MB). Last write by [Source Io Owner].'
$full = New-FsrmAction -Type Event -EventType Error -Body 'Quota [Quota Path] is full. [Source Io Owner] was refused a write by [Source Process Image].'
$t85 = New-FsrmQuotaThreshold -Percentage 85 -Action $warn
$t100 = New-FsrmQuotaThreshold -Percentage 100 -Action $full
New-FsrmQuotaTemplate -Name 'Projects 500 MB Hard' -Description 'Team share, hard limit' -Size 500MB -Threshold $t85, $t100 | Format-List Name, Size, SoftLimit, Threshold
PowerShell reports a hard limit with two thresholds attached. Size is stored in bytes, so 500 MB shows as 524288000.
Name : Projects 500 MB Hard
Size : 524288000
SoftLimit : False
Threshold : {MSFT_FSRMQuotaThreshold, MSFT_FSRMQuotaThreshold}
In the console, the same template opens from Quota Management, Quota Templates. Double-click it to check what the cmdlets created:

- 1Limit
- 2Hard quota
- 3Notification thresholds
- To set the size, type it in Limit and pick the unit. The template stores 500 MB.
- To refuse writes past the limit, select Hard quota. Pick soft only when you want monitoring.
- To check the alerts, read Notification thresholds. Both rows tick only Event Log.
The console labels both rows as warnings even though the 100% action writes an Error event, so trust the event log for the level rather than this list.
Apply an FSRM quota to the shares
A plain quota covers one folder and everything under it. Use it for your team share, because everyone on the team writes into one folder tree and one shared limit fits that. Apply the new template to Projects:
New-FsrmQuota -Path D:\Shares\Projects -Template 'Projects 500 MB Hard' | Format-List Path, Size, SoftLimit, Usage, Template, MatchesTemplate
In the output, MatchesTemplate : True confirms that the quota still matches its template, and the Usage of 1024 bytes is what the empty folder counts against it.
Path : D:\Shares\Projects
Size : 524288000
SoftLimit : False
Usage : 1024
Template : Projects 500 MB Hard
MatchesTemplate : True
Your home folders need a different kind of quota. A plain quota on D:\Shares\Home would make every user share one pool, so one user with a large download could fill it for everyone. An auto apply quota sits on the parent folder and creates a separate quota for every subfolder, including the folders you add later, so each user gets their own 100 MB:
New-FsrmAutoQuota -Path D:\Shares\Home -Template '100 MB Limit'
To prove that new folders are picked up, create one for a third user and list every quota on the server.
New-Item -ItemType Directory D:\Shares\Home\carol -Force
Get-FsrmQuota | Format-Table Path, @{n='LimitMB';e={$_.Size/1MB}}, SoftLimit, @{n='UsedMB';e={[math]::Round($_.Usage/1MB,1)}}, Template -AutoSize
Carol’s folder received its own 100 MB quota within five seconds of being created, with no action from you.
Path LimitMB SoftLimit UsedMB Template
---- ------- --------- ------ --------
D:\Shares\Projects 500 False 0 Projects 500 MB Hard
D:\Shares\Home\alice 100 False 0 100 MB Limit
D:\Shares\Home\brian 100 False 0 100 MB Limit
D:\Shares\Home\carol 100 False 0 100 MB Limit
In the console, the Quotas node groups the same entries by source template. The D:\Shares\Home\* row is the auto apply quota itself, and the rows under it are the quotas it generated:

Projects shows 30% because this capture was taken after the 150 MB test file from the reports section was in place. Watch the Match Template column over time. A quota that shows “No” there was edited directly, so only -UpdateDerived (not -UpdateDerivedMatching) will overwrite it when the template changes.
Overfill the share to test the quota
A quota is only proven when a normal user hits it over the network. Your test has three parts:
- To see what the client sees, map the share as a non-admin user and read the free space.
- To cross the 85% threshold, copy in a 450 MB file.
- To hit the hard limit, copy in another 100 MB and read the event log.
Create the two test files first. fsutil file createnew allocates a file of an exact size without writing data, which makes it quick:
New-Item -ItemType Directory C:\lab\src -Force
fsutil file createnew C:\lab\src\big-450mb.bin 471859200
fsutil file createnew C:\lab\src\report-100mb.bin 104857600
Then map the share as alice from any client, or from the server itself as the lab did:
net use P: "\\FS01\Projects" /user:"FS01\alice" 'Lab-Only-Pass1!'
cmd /c dir P:\ | Select-Object -Last 2
Alice’s client does not see the 14 GB volume. It sees the quota as the size of the disk.
0 File(s) 0 bytes
2 Dir(s) 524,283,904 bytes free
That is 500 MB minus 4 KB of allocation for the empty folder. Your users see the same number in File Explorer, so to them a full quota looks like a full disk, and they will report it to you that way. Next, copy a 450 MB file and then a 100 MB file into the share. The second copy is wrapped in try/catch so that you see only the error message:
Copy-Item C:\lab\src\big-450mb.bin P:\ -ErrorAction Continue
try { Copy-Item C:\lab\src\report-100mb.bin P:\ -ErrorAction Stop } catch { "Copy-Item error: " + $_.Exception.Message }
Only the first copy succeeds. The second one fails with the same error a full disk gives, which is why users never mention a quota when they call you.
Copy-Item error: There is not enough space on the disk.
cmd /c copy printed the same message with 0 file(s) copied, and robocopy counted the file under FAILED. Now read what FSRM logged. It writes to the Application log under the source SRMSVC:
Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='SRMSVC'} -MaxEvents 20 | Format-List TimeCreated, Id, LevelDisplayName, Message
Trimmed to the two Projects entries, the log shows you both thresholds firing one second apart.
TimeCreated : 10/31/2026 12:27:24 AM
Id : 12325
LevelDisplayName : Error
Message : Quota D:\Shares\Projects is full. FS01\alice was refused a write by Process ID (4).
TimeCreated : 10/31/2026 12:27:23 AM
Id : 12325
LevelDisplayName : Warning
Message : Quota D:\Shares\Projects is at 90% (450.00 MB of 500.00 MB). Last write by FS01\alice.
Three details in that output matter when you write your alerts.
- To tell the warning from the error, filter on the level or the message, because both log ID 12325.
- To read the real usage, trust the percentage in the message. The 85% threshold fired at 90% here.
- To find who wrote the file, use the user name.
[Source Process Image]readsProcess ID (4)for SMB.
A 90% reading comes from a single 450 MB write that jumped past the 85% mark, and FSRM reports the usage it found rather than the threshold you set. The process ID is 4 because the SMB server runs inside the System process, so for every network write you get the account name and nothing about the client program.
Block file types with an FSRM file screen
A file screen matches file names against file groups. An active screen refuses the write, and a passive screen only notifies. FSRM ships eleven file groups, and it pays to read one before you block it. The Executable Files group covers more than .exe:
Get-FsrmFileGroup -Name 'Executable Files' | Select-Object -ExpandProperty IncludePattern
Twenty patterns come back, and several of them are scripts rather than binaries.
*.bat
*.cmd
*.com
*.cpl
*.exe
*.inf
*.js
*.jse
*.msh
*.msi
*.msp
*.ocx
*.pif
*.pl
*.ps1
*.scr
*.vb
*.vbs
*.wsf
*.wsh
Blocking that group on a share also blocks .ps1, .js and .bat files, which breaks any team that keeps scripts there. Give those teams a subfolder with an exception, as shown below, rather than dropping the screen. For the ransomware screen, create your own group of extensions and ransom note names:
New-FsrmFileGroup -Name 'Ransomware Extensions' -IncludePattern @('*.locky','*.encrypted','*.crypt','*.lockbit','*.akira','*readme_for_decrypt*','*how_to_decrypt*','*.wncry') | Format-List Name, IncludePattern
FSRM sorts the patterns and prints only the first four, so open the group in the console if you need to confirm the rest.
Name : Ransomware Extensions
IncludePattern : {*.akira, *.crypt, *.encrypted, *.lockbit...}
Treat this list as a tripwire, not a full defense. Many ransomware families append random extensions, and no static list catches them. The screen still catches the common names and ransom notes, and the next section uses it to cut off the account that wrote them.
Next, create a screen template for executables with an event log warning, apply it to Projects, and add an exception for a Tools subfolder:
$evt = New-FsrmAction -Type Event -EventType Warning -Body '[Source Io Owner] tried to save [Source File Path] on [File Screen Path]. It matches [Violated File Group].'
New-FsrmFileScreenTemplate -Name 'Block Executables on Shares' -Active -IncludeGroup 'Executable Files' -Notification $evt
New-FsrmFileScreen -Path D:\Shares\Projects -Template 'Block Executables on Shares'
New-Item -ItemType Directory D:\Shares\Projects\Tools -Force
New-FsrmFileScreenException -Path D:\Shares\Projects\Tools -IncludeGroup 'Executable Files'
An exception must sit on a folder below the screen. Microsoft’s documentation notes that you cannot create one on a folder that already has its own file screen, so the exception goes on Tools, not on Projects.
Lock out a user who writes ransomware files
A file screen can run a command when it fires. To stop an infected client from encrypting the rest of the share, run a script that denies that account on every share with Block-SmbShareAccess. Create the script first:
New-Item -ItemType Directory C:\FSRM -Force
icacls C:\FSRM /inheritance:r /grant 'SYSTEM:(OI)(CI)F' 'Administrators:(OI)(CI)F'
notepad C:\FSRM\Block-RansomUser.ps1
Paste the following into the file and save it. It skips SYSTEM and the built-in Administrator so that a false positive cannot lock you out of your own server. If you run a backup agent or another service account that writes to the shares, add it to that skip pattern too, because the script blocks any account it receives.
param([string]$User)
$log = 'C:\FSRM\blocked.log'
if (-not $User -or $User -match '\\(SYSTEM|Administrator)$') { "$(Get-Date -f s) skipped '$User'" | Add-Content $log; exit }
Get-SmbShare -Special $false | Where-Object Name -notin 'ADMIN$','IPC$' | ForEach-Object {
Block-SmbShareAccess -Name $_.Name -AccountName $User -Force | Out-Null
}
"$(Get-Date -f s) blocked $User on all shares" | Add-Content $log
The icacls line matters because the script runs as Local System. A new folder under C:\ inherits the root permissions, and on the lab server that gave BUILTIN\Users the right to add files and subfolders in C:\FSRM, with CREATOR OWNER full control over whatever they create. That is too much access to a folder whose contents run as SYSTEM. /inheritance:r removes the inherited entries, and the two grants leave SYSTEM and Administrators as the only accounts. Confirm the result:
icacls C:\FSRM
Only SYSTEM and Administrators should be listed, with no BUILTIN\Users entries and no (I) inherited flags:
C:\FSRM BUILTIN\Administrators:(F)
BUILTIN\Administrators:(OI)(CI)(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files
Before the change, the same command listed four inherited BUILTIN\Users and CREATOR OWNER lines, including BUILTIN\Users:(I)(CI)(AD) and BUILTIN\Users:(I)(CI)(WD). On a localized Windows build where the group names differ, use the SIDs instead (*S-1-5-18 for SYSTEM and *S-1-5-32-544 for Administrators), which the icacls reference documents. The lock-down does not stop FSRM. On a fresh lab clone with the folder locked this way, the command action still ran as SYSTEM, blocked alice on the share and wrote blocked.log, which inherited the same two entries.
Now create the command action and the screen template. FSRM fills [Source Io Owner] with the account that tried to write the file, and the action runs as Local System because Block-SmbShareAccess needs administrator rights:
$cmd = New-FsrmAction -Type Command -Command 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -CommandParameters '-NoProfile -ExecutionPolicy Bypass -File C:\FSRM\Block-RansomUser.ps1 -User "[Source Io Owner]"' -SecurityLevel LocalSystem -WorkingDirectory 'C:\FSRM' -KillTimeOut 2
New-FsrmFileScreenTemplate -Name 'Block Ransomware Extensions' -Active -IncludeGroup 'Ransomware Extensions' -Notification $evt, $cmd
New-FsrmFileScreen -Path D:\Shares -Template 'Block Ransomware Extensions'
Because the screen sits on D:\Shares, it covers both shares and every folder under them, including home folders you add later. Open File Screen Templates in the console and double-click the new template to confirm the settings.

- 1Active screening
- 2Ransomware Extensions
- To refuse the write, keep Active screening selected. Passive screening would let the file land.
- To match the patterns, tick the Ransomware Extensions group that you created earlier.
On the Command tab of the same dialog you find the script action. Check it before you test, because a typo in the arguments fails silently and you only notice when nobody gets blocked.

- 1Run this command or script
- 2Command arguments
- 3Local System
- To enable the action, tick Run this command or script and point it at
powershell.exe. - To pass the user, check that Command arguments end with
-User "[Source Io Owner]". - To give the script admin rights, select Local System under Command security.
One more setting decides whether this works for more than one user. FSRM limits each notification type to one run per 60 minutes by default. In the lab, alice was blocked, but a .lockbit write from brian a minute later ran no command at all, so brian kept full access. Set the command and event log limits to 0, then restart the service. The new limits did not apply until the restart:
Set-FsrmSetting -CommandNotificationLimit 0 -EventNotificationLimit 0
Restart-Service SrmSvc -Force
You can also set these values in the console under Configure Options, on the Notification Limits tab.

- 1Event log notification
- 2Command notification
- To log every violation, set Event log notification to 0 minutes.
- To run the block script for every user, set Command notification to 0 minutes.
Leave the e-mail limit at 60 if you add email alerts later. A burst of blocked writes would otherwise send one message per attempt.
Test the file screens as a normal user
Free the Projects quota first, so that a refused write in this section can only come from a screen, and create the small file used for the ransomware test:
Remove-Item D:\Shares\Projects\big-450mb.bin -Force
'q3 numbers' | Set-Content C:\lab\src\budget.xlsx
Run each test as alice over your mapped P: drive. The tests cover the blocked group, the exception, a rename and a ransomware extension, and each one prints either a success word or the error message:
try { Copy-Item C:\Windows\System32\notepad.exe P:\ -ErrorAction Stop; 'copied' } catch { "error: " + $_.Exception.Message }
try { Copy-Item C:\Windows\System32\notepad.exe P:\Tools\ -ErrorAction Stop; 'copied to Tools' } catch { "error: " + $_.Exception.Message }
Copy-Item C:\Windows\System32\notepad.exe P:\notepad.txt
try { Rename-Item P:\notepad.txt notepad.exe -ErrorAction Stop; 'renamed' } catch { "rename error: " + $_.Exception.Message }
Remove-Item P:\notepad.txt -ErrorAction SilentlyContinue
try { Copy-Item C:\lab\src\budget.xlsx P:\budget.xlsx.locky -ErrorAction Stop; 'copied' } catch { "error: " + $_.Exception.Message }
Only the copy into the Tools exception succeeded.
error: Access to the path 'P:\notepad.exe' is denied.
copied to Tools
rename error: Access to the path is denied.
error: Access to the path 'P:\budget.xlsx.locky' is denied.
Your users see “Access is denied”, not a message about file screening, so tell your helpdesk what the error means before you turn screens on. The rename result matters too. FSRM checks the new name on a rename, so a user cannot copy a file in as .txt and rename it afterwards. Within four seconds of the .locky write, the block script had run. Check its log and the share permissions:
Get-Content C:\FSRM\blocked.log
Get-SmbShareAccess -Name Projects | Format-Table Name, AccountName, AccessControlType, AccessRight -AutoSize
Alice now has a Deny entry on the share, and the log records when the script added it.
2026-10-31T00:28:07 blocked FS01\alice on all shares
Name AccountName AccessControlType AccessRight
---- ----------- ----------------- -----------
Projects FS01\alice Deny Full
Projects BUILTIN\Administrators Allow Full
Projects FS01\FileUsers Allow Change
Her next write of an ordinary notes.txt failed with “Access is denied”. After the limits were set to 0 and the service restarted, a .lockbit write from brian blocked him too. One copy produced six log lines, because the SMB client retried the write and each retry fired the screen. The script is safe to run repeatedly, so the duplicates do no harm. Each violation also logs event ID 8215:
TimeCreated : 10/31/2026 12:28:03 AM
Id : 8215
LevelDisplayName : Warning
Message : FS01\alice tried to save D:\Shares\Projects\budget.xlsx.locky on D:\Shares. It matches "Ransomware Extensions".
When you have cleaned the client, give the account its access back on every share you blocked:
Get-SmbShare -Special $false | ForEach-Object { Unblock-SmbShareAccess -Name $_.Name -AccountName 'FS01\alice' -Force | Out-Null }
Run the same line with FS01\brian if you ran his test too. Then run Get-SmbShareAccess again. The Deny rows should be gone, leaving only the Administrators and FileUsers entries. The script skips only accounts named SYSTEM or Administrator, so a named admin account that trips the screen is blocked like anyone else, and you undo it the same way from the server console.
Generate FSRM storage reports
Storage reports tell you who uses the space, which quotas are close to full and which writes your screens blocked. Before the lab run, a 150 MB file was added to Projects so that the large files report had something to find:
fsutil file createnew D:\Shares\Projects\vm-export.vhdx 157286400
Pick the report types by the question you need answered:
- To size quotas, run
QuotaUsageand read the peak column. - To find space hogs, run
LargeFileswith a minimum size. - To see what users store, run
FilesByFileGroupbefore you add a screen. - To review blocked writes, run
FileScreenAuditFilesafter you turn on auditing.
An interactive report runs once and writes its files to C:\StorageReports\Interactive. You can run several types in one call, as the lab did with five:
New-FsrmStorageReport -Name 'Shares audit' -Namespace @('D:\Shares') -ReportType @('QuotaUsage','LargeFiles','DuplicateFiles','FilesByFileGroup','FileScreenAuditFiles') -ReportFormat @('Html','Csv') -LargeFileMinimum 50MB -Interactive
All five reports took 42 seconds on a share with a handful of files. Each type writes one HTML file and one CSV file. The statistics block of the quota usage CSV reads:
Folder,Owner,Quota,Usage,Percent Used(%),Peak Usage,Peak Usage Time
"d:\shares\Projects","BUILTIN\Administrators","500 MB","150 MB","30.07" %,"450 MB","10/31/2026 12:27:24 AM"
"d:\shares\Home\brian","BUILTIN\Administrators","100.0 MB","0.00 MB","0.00" %,"0.00 MB","10/31/2026 12:29:59 AM"
"d:\shares\Home\alice","BUILTIN\Administrators","100.0 MB","0.00 MB","0.00" %,"0.00 MB","10/31/2026 12:27:25 AM"
"d:\shares\Home\carol","BUILTIN\Administrators","100.0 MB","0.00 MB","0.00" %,"0.00 MB","10/31/2026 12:27:06 AM"
The Peak Usage column is the one you should act on. Projects sits at 150 MB now, but it peaked at 450 MB during the overfill test, so a team that keeps touching 90% needs a bigger limit or a clean-up, and you can see that before they call you. The large files report found the one 150 MB file above the 50 MB minimum. The Owner column shows the owner of the quota folder (BUILTIN\Administrators here), not the users who wrote the data, so add the FilesByOwner report type when you need per-user totals.
Only the file screen audit report came back empty, with just its header row, even though alice had been blocked minutes earlier. Screen violations reach that report only when FSRM records them in its auditing database, and that recording is off by default. Turn it on before you rely on the report.
Set-FsrmSetting -ReportFileScreenAuditEnable
Only violations after this change are recorded. To check it, make one blocked copy as alice over P: and run the audit report on its own:
try { Copy-Item C:\Windows\System32\calc.exe P:\ -ErrorAction Stop } catch { "error: " + $_.Exception.Message }
New-FsrmStorageReport -Name 'Audit now 2' -Namespace @('D:\Shares') -ReportType FileScreenAuditFiles -ReportFormat Csv -Interactive
The report finishes in the background and took more than 30 seconds in the lab, so open the newest FileScreenAudit*.csv in C:\StorageReports\Interactive only after it completes. It held the blocked copy:
Path,File name,File Group,Status,Time,User,Process,File Screen Path
"d:\shares\projects","calc.exe","Executable Files","Blocked","10/31/2026 12:32:20 AM","FS01\alice","Process ID (4)","d:\shares\projects"
No service restart was needed for this setting. A later report, generated after an SrmSvc restart, listed that same 12:32:20 copy six times, so count distinct times and users rather than rows when you read it.
For a regular view, schedule the reports instead of running them by hand. This creates a weekly run every Monday at 07:00:
$task = New-FsrmScheduledTask -Time (Get-Date '07:00') -Weekly @('Monday')
New-FsrmStorageReport -Name 'Weekly share report' -Namespace @('D:\Shares') -ReportType @('QuotaUsage','LargeFiles','FilesByOwner') -Schedule $task -LargeFileMinimum 100MB
FSRM registers the schedule in Task Scheduler, so you can check there whether a run failed. Confirm that the task exists:
Get-ScheduledTask -TaskPath '\Microsoft\Windows\File Server Resource Manager\' | Format-Table TaskName, State -AutoSize
Task Scheduler lists it under the File Server Resource Manager folder in the Ready state.
TaskName State
-------- -----
StorageReport-Weekly share report Ready
Scheduled reports land in C:\StorageReports\Scheduled. To email them instead, set an SMTP server first, which the next section explains. The full list of report types and formats is on the New-FsrmStorageReport reference.
Fix common FSRM errors
These errors came up during the lab run. Each one is easy for you to misread, because none of them names FSRM in the message that your user sees.
Error: “0x80045315, The specified volume is unsupported”
You get this when you create a quota or a file screen on a ReFS volume. The lab server had a second volume, R:, formatted as ReFS, and both New-FsrmQuota and New-FsrmFileScreen failed on it with the same message. Microsoft’s FSRM overview states that FSRM supports NTFS only. Move the share to an NTFS volume, because no FSRM setting changes this.
Event 12303: “no SMTP server set”
Built-in templates such as 100 MB Limit include an email action. When the alice home folder hit its quota, FSRM logged event 12303, “A File Server Resource Manager Service email action could not be run because there is no SMTP server set”. The quota itself still worked. Either set an SMTP server with Set-FsrmSetting -SmtpServer, or build your own templates with event log actions as shown earlier.
“There is not enough space on the disk” with free space on the volume
A hard quota returns the same error as a full disk, both over SMB and for local writes on the server. In the lab, fsutil file createnew tried to write a 120 MB file into the 100 MB alice folder. It reported Error 112: There is not enough space on the disk. even though the volume had over 13 GB free. Run Get-FsrmQuota on the path before you look at the disk.
The block script ran once and then stopped
That is the 60-minute command notification limit. A second user who trips the screen inside that window is refused the write, but the command does not run, so that user keeps access to every other file on the share. Set both limits to 0 and restart SrmSvc, as described in the ransomware section.
Clean up the test quotas and screens
If you tested on a production file server, remove the lab rules before users run into them. Remove the exception and the screens first, then the quotas:
Remove-FsrmFileScreenException -Path D:\Shares\Projects\Tools -Confirm:$false
Remove-FsrmFileScreen -Path D:\Shares\Projects -Confirm:$false
Remove-FsrmFileScreen -Path D:\Shares -Confirm:$false
Remove-FsrmAutoQuota -Path D:\Shares\Home -Confirm:$false
Get-FsrmQuota | Format-Table Path, Template -AutoSize
Removing the auto apply quota does not remove the quotas it created. All three home folder quotas were still in place:
Path Template
---- --------
D:\Shares\Projects Projects 500 MB Hard
D:\Shares\Home\alice 100 MB Limit
D:\Shares\Home\brian 100 MB Limit
D:\Shares\Home\carol 100 MB Limit
Remove them with a wildcard path, then remove the Projects quota and the scheduled report so that nothing runs next Monday.
Get-FsrmQuota -Path 'D:\Shares\Home\*' | Remove-FsrmQuota -Confirm:$false
Remove-FsrmQuota -Path D:\Shares\Projects -Confirm:$false
Remove-FsrmStorageReport -Name 'Weekly share report' -Confirm:$false
After that, Get-FsrmQuota, Get-FsrmFileScreen and Get-FsrmAutoQuota return nothing. The templates and the Ransomware Extensions file group stay, so you can apply them again on the real shares. If the same server also exports folders over NFS, the quotas and screens apply there too, because they attach to the folder, as our NFS server on Windows Server guide shows for its own exports.