New-FsrmStorageReport

New-FsrmStorageReport

Creates a storage report on the server.

Syntax

Parameter Set: cim:CreateInstance0
New-FsrmStorageReport [-Name] <String> -Namespace <String[]> -ReportType <StorageReportReportTypeEnum[]> [-AsJob] [-CimSession <CimSession[]> ] [-FileGroupIncluded <String[]> ] [-FileOwnerFilePattern <String> ] [-FileOwnerUser <String[]> ] [-FileScreenAuditDaysSince <UInt32> ] [-FileScreenAuditUser <String[]> ] [-FolderPropertyName <String> ] [-Interactive] [-LargeFileMinimum <UInt64> ] [-LargeFilePattern <String> ] [-LeastAccessedFilePattern <String> ] [-LeastAccessedMinimum <UInt32> ] [-MailTo <String> ] [-MostAccessedFilePattern <String> ] [-MostAccessedMaximum <UInt32> ] [-PropertyFilePattern <String> ] [-PropertyName <String> ] [-QuotaMinimumUsage <UInt32> ] [-ReportFormat <StorageReportReportFormatsEnum[]> ] [-Schedule <CimInstance> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-FsrmStorageReport cmdlet creates a storage report on the server. A storage report job specifies a set of directories that the server analyzes to generate one or more report types that help you to better understand how storage is utilized in the specified directories. You can configure report jobs to run according to a schedule or on demand.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FileGroupIncluded<String[]>

Specifies an array of names of file groups to include in the report. Each string must be the name of a valid file group.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileOwnerFilePattern<String>

Specifies a string of files to include in the file by owner report. You can use the wildcard characters * and ? in the string. If you specify this parameter, you must set FilesByOwner for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileOwnerUser<String[]>

Specifies an array of users, in Domain\User format, to include files for in the file by owner report. The default value is an empty list, which indicates all users.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileScreenAuditDaysSince<UInt32>

Specifies the minimum number of days since the audit event to include in the report. If you specify this parameter, you must set FileScreenAuditFiles for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileScreenAuditUser<String[]>

Specifies an array of user email addresses to include audit events for. The default value is an empty list, which indicates all users. If you specify this parameter, you must set FileScreenAuditFiles for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FolderPropertyName<String>

Specifies a name of the classification property name to report on for a folder by property report. Specify the value of the Name property in an FsrmClassificationPropertyDefinition object. If you specify this parameter, you must set FoldersByProperty for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Interactive

Indicates that the report is interactive. When you specify this parameter, the report does not require a schedule, the report cannot be modified, the report is generated immediately when you run this cmdlet, and the server removes the report automatically from the system when it finishes running the report.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LargeFileMinimum<UInt64>

Specifies the minimum file size to include in the large file report. If you specify this parameter, you must set LargeFiles for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LargeFilePattern<String>

Specifies a string of files to include in the large file report. You can use the wildcard characters * and ? in the string. If you specify this parameter, you must set LargeFiles for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LeastAccessedFilePattern<String>

Specifies a string of files to include in the least frequently accessed report. You can use the wildcard characters * and ? in the string. If you specify this parameter, you must set LeastRecentlyAccessed for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LeastAccessedMinimum<UInt32>

Specifies the minimum number of days since the report was last accessed, to include in the least frequently accessed report. If you specify this parameter, you must set LeastRecentlyAccessed for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MailTo<String>

Specifies a semicolon-separated list of email addresses for the recipients of an email. [Admin Email] is a valid email address.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MostAccessedFilePattern<String>

Specifies a string of files to include in the most frequently accessed report. You can use the wildcard characters * and ? in the string. If you specify this parameter, you must set MostRecentlyAccessed for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MostAccessedMaximum<UInt32>

Specifies the maximum number of days since the report was last accessed, to include in the most frequently accessed report. If you specify this parameter, you must set MostRecentlyAccessed for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies a name for the storage report. If you do not specify a name, the server generates a standard name. You must specify this parameter if you specify the Interactive parameter.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

true

-Namespace<String[]>

Specifies an array of namespaces that are part of the scope of the report. Each string must be either a value of the FolderType property on the server, the string "All Shares", or a static path. The FolderType properties must be in the format [Folder type property name=<value>].

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PropertyFilePattern<String>

Specifies a string of files to include in the file by property report. You can use the wildcard characters * and ? in the string. If you specify this parameter, you must set FilesByProperty for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PropertyName<String>

Specifies the name of the classification property to report on for a file by property report. Specify the value of the Name property in an FsrmClassificationPropertyDefinition object. If you specify this parameter, you must set FilesByProperty for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-QuotaMinimumUsage<UInt32>

Specifies the minimum quota usage level to include in the quota usage report. If you specify this parameter, you must set QuotaUsage for the ReportType parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ReportFormat<StorageReportReportFormatsEnum[]>

Specifies an array of report formats that the classification report produces. The acceptable values for this parameter are:
-- DHTML
-- HTML
-- XML
-- CSV
-- Text

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ReportType<StorageReportReportTypeEnum[]>

Specifies the types of reports that the action generates. Specify this parameter only if you set the Type parameter to Report.The acceptable values for this parameter are:
-- DuplicateFiles
-- FilesByFileGroup
-- FilesByOwner
-- FilesByProperty
-- LargeFiles
-- LeastRecentlyAccessed
-- MostRecentlyAccessed
-- QuotaUsage

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Schedule<CimInstance>

Specifies a File Server Resource Manager (FSRM) scheduled task object that describes the schedule for running the storage report. Use the New-FsrmScheduledTask cmdlet to create a scheduled task object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#MSFT_FSRMStorageReport

Examples

Example 1: Create a large files storage report

This example creates a LargeFiles storage report that the server runs monthly and restricts the report to files larger than 10MB.

The first command gets a DateTime object and stores it in the $d variable.

PS C:\> $d = Get-Date "12:00am"

This second command returns a FsrmScheduledTask object that describes a schedule that runs the task at midnight on the first day of the month. The command stores results in the $task variable.

PS C:\> $task = New-FsrmScheduledTask -Time $d.ToFileTimeUtc() -Monthly 1

The third command creates a LargeFiles storage report named "Find large files" on C:\Shares. The command sets the schedule for the report stored in the $task variable, and limits the report to files larger than 10MB.

PS C:\> New-FsrmStorageReport -Name "Find large files" -Namespace @("C:\Shares") -Schedule $task -ReportType @("LargeFiles") –LargeFileMinimum 10MB

Example 2: Create a large files storage report by using a namespace condition

This example creates a LargeFiles storage report that the server runs monthly and reports on any folders whose Folder Usage property includes the User Data value. This example creates a LargeFiles storage report that the server runs monthly and restricts the report to files larger than 10MB.

The first command gets a DateTime object and stores it in the $d variable.

PS C:\> $d = get-date "12:00am"

This second command returns an FsrmScheduledTask object that describes a schedule that runs the task at midnight on the first day of the month. The command stores results in the $task variable.

PS C:\> $task = new-FsrmScheduledTask -Time $d.ToFileTimeUtc() -Monthly 1

The third command creates a LargeFiles storage report named "Find large files" that generates a Large Files report on any folders whose Folder Usage property includes the User Data value. The command sets the schedule for the report stored in the $task variable.

PS C:\> New-FsrmStorageReport -Name "Find large files" -Namespace @("[FolderUsage=User Data]") -Schedule $task -ReportType @("LargeFiles")

Example 3: Create a storage report for files from a file group

This example creates a storage report that the server runs monthly and generates a LargeFiles and a FilesByFileGroup report.

The first command gets a DateTime object and stores it in the $d variable.

PS C:\> $d = get-date "12:00am"

This second command returns a FsrmScheduledTask object that describes a schedule that runs the task at midnight on the first day of the month. The command stores results in the $task variable.

PS C:\> $task = new-FsrmScheduledTask -Time $d.ToFileTimeUtc() -Monthly 1

The third command creates a storage report named "Find large files" and file groups on the folder C:\Shares. The command sets the schedule for the report stored in the $task variable, set the report type to LargeFiles and a FilesByFileGroup, limits the report to files larger than 10MB, and restricts the FilesByFileGroup report to include only files from the "Text files file" group.

PS C:\> New-FsrmStorageReport -Name "Find large files and file groups" -Namespace @("C:\Shares") -Schedule $task -ReportType @("LargeFiles", "FilesByFileGroup") -LargeFileMinimum 10MB -FileGroupIncluded "Text files"

Example 4: Create an interactive storage report

This command creates a storage report named "Find large files" that the server runs immediately. The command creates a LargeFile storage report for the folder C:\Shares.

PS C:\> New-FsrmStorageReport -Name "Find large files" -Namespace @("C:\Shares") -Interactive -ReportType @("LargeFiles")

New-FsrmScheduledTask