Manage File Server Resource Manager with Powershell

Hi There,

In this article, I want to show you how to create a new File Group on  File Server Resource Monitor using Powershell.
Before dipping dive, those who are not knowing what is file group is:

File group allows us to set kind of policy on the destination folder that we don’t want storage particular extensions.

For example,

The preferred and common case is like any IT department, we have main FS, we assign folders to some departments and they share data among themselves, that user doesn’t know and doesn’t care what type of file is storing on our storage, whether if it’s his wedding picture or honeymoon video that data shouldn’t be on our storage, therefore I am setting “file group” and set the template for department folder. no MP3  and mo JPEG but I am allowing DOCX…

 

[I’m wondersing] you ask why do we need to add filegroup using Powershell?

Very simple, if you want to add a few extensions you don’t need PowerShell for that, you can really do it using the GUI, what about if you have hundreds of extensions? Would you add them manually one by one? Like this:

manage-file-server-resource-manager

It will take you awhile.

The solution I want to share with you is to do the same thing just through Powershell:

New-FsrmFileGroup -Name "www.PelegIT.co.il" -IncludePattern @("*.Meir","*.Peleg","*.Windows","*.ZZZ")

file-server-resource-manager

 

Do you want to add exclude as well? no problem:

Get-FsrmFileGroup -Name "www.PelegIT.co.il" | Set-FsrmFileGroup -ExcludePattern @("*.gxxx","*.x5xx","*.x4xx","*.2")

file-server-resource-manager

About Meir Peleg 337 Articles
My name is Meir Peleg, (Born 30/04/1991) live in ISRAEL. Live and breath IT world. Microsoft MVP Windows IT & VMware vExpert.