Search code examples
powershellwinapifileserver

Configure storage report tab, file server resource manager (winapi)


I need to migrate the configuration of a file server resource manager, I am using the windows FSRM API to get and set the configurations.

In the file server configuration Options I have already found all the Classes for each tab, except the one contains the storage reports info.

My question is what is the class that manages the storage reports tab in the windows api.

.

enter image description here


Solution

  • If you want to get the storage reports tab settings, using the winapi, in the properties of the server of the File Server resource manager you must use the method GetDefaultFilter of the class FsrmReportManager

    Here is a example of how to get it with powershell.

     $fsrmReportManagerObj = new-object -com FSRM.FsrmReportManager
    
    
    #FileScreenAudit  
    $fsrmReportManagerObj.GetDefaultFilter(9,2)
    $fsrmReportManagerObj.GetDefaultFilter(9,6)
    #FilesByType(file group)
    $fsrmReportManagerObj.GetDefaultFilter(2,5)
    #FilesByOwner 
    $fsrmReportManagerObj.GetDefaultFilter(6,6)
    $fsrmReportManagerObj.GetDefaultFilter(6,7)
    #FilesByProperty
    $fsrmReportManagerObj.GetDefaultFilter(10,8)
    $fsrmReportManagerObj.GetDefaultFilter(10,7)
    #LargeFiles
    $fsrmReportManagerObj.GetDefaultFilter(1,1)
    $fsrmReportManagerObj.GetDefaultFilter(1,7)
    #LeastRecentlyAccessed
    $fsrmReportManagerObj.GetDefaultFilter(3,2)
    $fsrmReportManagerObj.GetDefaultFilter(3,7)
    #MostRecentlyAccessed
    $fsrmReportManagerObj.GetDefaultFilter(4,3)
    $fsrmReportManagerObj.GetDefaultFilter(4,7)
    #QuotaUsage
    $fsrmReportManagerObj.GetDefaultFilter(5)
    

    If you want to set the storage reports tab settings, using the winapi, in the properties of the server of the File Server resource manager you must use the method SetDefaultFilter of the class FsrmReportManager