NAME
Export-DcsReport
SYNOPSIS
Creates a report which can be exported in a variety of formats.
SYNTAX
Export-DcsReport -ReportName <String> -ReportType <String> -ExportType <String> [ -ReportDescription <String> ] [ -Server <String[]> ] [ -Client <String[]> ] [ -DiskPool <String[]> ] [ -MappingType <String[]> ] [ -VirtualDiskKind <String[]> ] [ -PortType <String[]> ] [ -MonitorState <String[]> ] [ -HostGroup <String[]> ] [ -VirtualDiskGroup <String[]> ] [ -PhysicalDiskType <String[]> ] [ -ExcludeNonServedDisk] [ -SortBy <String> ] [ -DescendingOrder] [ -SaveToFile <String> ] [ -OverrideFile] [ -Connection <String> ] [ -PipelineVariable <String> ]
Export-DcsReport -ReportName <String> -ReportType <String> -ExportType <String> [ -ReportDescription <String> ] [ -Server <String[]> ] [ -Client <String[]> ] [ -DiskPool <String[]> ] [ -MappingType <String[]> ] [ -VirtualDiskKind <String[]> ] [ -PortType <String[]> ] [ -MonitorState <String[]> ] [ -HostGroup <String[]> ] [ -VirtualDiskGroup <String[]> ] [ -PhysicalDiskType <String[]> ] -StartTime <DateTime> -EndTime <DateTime> [ -ExcludeNonServedDisk] [ -SortBy <String> ] [ -DescendingOrder] [ -SaveToFile <String> ] [ -OverrideFile] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Creates a report which can be exported in a variety of formats. Filtering parameters may be specified to narrow the scope of the report data. If no parameters are specified, all data for the specified report will be included in the report. Sort order criteria may be specified and sorted by ascending or descending order. Also, the returned data object can be pipelined to another cmdlet or script.
PARAMETERS
- -ReportName<String>
- The name of the report.
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ReportType<String>
- The type of report to export. Possible parameter values include "Data Usage", "Detailed Data Usage", "Disk Pools", "Hosts", "Hosts By Group", "Paths", "Paths By Host", "Paths By Host Port", "Paths By Server", "Paths By Server Port", "Paths By Virtual Disk", "Physical Disks", "Physical Storage By Server", "Port Connections", "Ports By Host", "Ports By Server", "System Health", "Virtual Disks", "Virtual Disks By Host", "Virtual Disks By Group", "Virtual Disks By Host Port", "Virtual Disks By Path", "Virtual Disks By Pool", "Virtual Disks By Server", or "Virtual Disks By Server Port".
-
- Required: true
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ExportType<String>
- The format of the report. Possible parameter values include "Csv", "Html", "Mht", "Pdf", "Rtf", "Text", "Xls", "Xlsx", "Bmp", "Gif", "Jpeg" or "Png".
-
- Required: true
- Position: 3
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ReportDescription<String>
- Description of report.
-
- Required: false
- Position: 4
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Server<String[]>
- Filtering parameter used to specify one or more servers. This filter applies to all reports except host reports, Ports By Host report, both Data Usage reports, and System Health report. Values can be the computer name or ID that identifies one or more servers. The computer names must be unique or the names must be fully qualified. If this parameter is specified, only data for those servers will be included in the report. If the parameter is not specified, data for all servers in the local server group will be included in the report.
-
- Required: false
- Position: 5
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Client<String[]>
- Filtering parameter used to specify one or more clients (hosts). This filter applies to all virtual disks reports, and reports "By Host" or "By Host Port" (such as Paths By Host). Values can be the name or ID that identifies one or more clients. If this parameter is specified, only data for those clients will be included in the report. If the parameter is not specified, data for all clients in the local server group will be included in the report. See the parameter ExcludeNonServedDisk if required to exclude virtual disks that are not served to hosts.
-
- Required: false
- Position: 6
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DiskPool<String[]>
- Filtering parameter used to specify one or more disk pools. This filter applies to the Physical Storage By Server report and the Virtual Disks By Pool report. Values can be the name, or ID that identifies one or more disk pools. (To resolve by name, the name must be unique to the server group or the server must be specified.) If this parameter is specified, only data for those disk pools will be included in the report. If the parameter is not specified, data for all disk pools in the local server group will be included in the report.
-
- Required: false
- Position: 7
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -MappingType<String[]>
- Filtering parameter used to specify one or more path roles. This filter applies to the following reports: Paths, Paths By Server, Paths By Server Port, Paths By Virtual Disk and Virtual Disks by Path. Valid values include "Client" (front-end path) and "Mirror". If this parameter is specified, only data for those path roles will be included in the report. If the parameter is not specified, data for all path roles will be included in the report.
-
- Required: false
- Position: 8
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -VirtualDiskKind<String[]>
- Filtering parameter used to specify one or more kinds of virtual disks. This filter applies to all virtual disk reports. Valid values include "VirtualDisk", "Snapshot", and "Rollback". If this parameter is specified, only data for virtual disks of that kind will be included in the report. If the parameter is not specified, data for all virtual disks in the local server group will be included in the report.
-
- Required: false
- Position: 9
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PortType<String[]>
- Filtering parameter used to specify one or more port types. This filter applies to all port reports. Valid values include "Fibre Channel", "iSCSI", and "LooPBack". If this parameter is specified, only data for those port types will be included in the report. If the parameter is not specified, data for all ports will be included in the report.
-
- Required: false
- Position: 10
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -MonitorState<String[]>
- Filtering parameter used to specify one or more System Health message categories. This filter applies to the System Health report. Valid values include "Attention", "Warning", and "Critical". If this parameter is specified, only System Health messages of those categories will be included in the report. If the parameter is not specified, data for all System Health messages in the local server group will be included in the report.
-
- Required: false
- Position: 11
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -HostGroup<String[]>
- Filtering parameter used to specify host group names, supplied in an array of strings separated by commas, for example: "Host Group 1", "Host Group 2", "Host Group 3". A host group name "No Group" is also allowed. "No Group" will return all objects that are not part of a group. For example, if the argument is "No Group" for the Hosts by Group report, the report will include only hosts that do not belong to any host group. The HostGroup filter applies to the following reports: Data Usage, Detailed Data Usage, Hosts, Hosts by Group, Paths by Host, Paths by Host and Ports by Host. if this parameter is specified, only data for those host groups will be included in the report. If the parameter is not specified, data for all host groups in the local server group will be included in the report. For the Detailed Data Usage report, more than one host name is not supported and that one host group name is required.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -VirtualDiskGroup<String[]>
- Filtering parameter used to specify one or more virtual disk group names, supplied in an array of strings separated by commas. A virtual disk group name "No Group" is also allowed. "No Group" will return all objects that are not part of a group. For example, if the argument is "No Group" for the Virtual Disk report, the report will include only virtual disks that do not belong to any virtual disk group. This filter applies to the following reports: Paths, Paths By Server, Paths By Server Port, Paths By Virtual Disk, and all virtual disk reports. If this parameter is specified, only data for those virtual disk groups will be included in the report. If the parameter is not specified, data for all virtual disk groups in the local server group will be included in the report.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PhysicalDiskType<String[]>
- Filtering parameter used to specify one or more physical disk types. This filter applies to the following reports: Physical Disks and Physical Storage By Server. Valid values include "Available", "PassThrough", and "Pool". If this parameter is specified, only data for those physical disk types will be included in the report. If the parameter is not specified, data for all physical disk types will be included in the report.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ExcludeNonServedDisk<SwitchParameter>
- Specify this switch parameter to exclude virtual disks that are not served in the report data, for instance when filtering by hosts or host groups when unserved virtual disks may not apply. This parameter applies to all virtual disk reports except Virtual Disks By Host and Virtual Disks By Host Port reports.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -SortBy<String>
- Sort order criteria. Specify this parameter to sort the report by the designated value. For Data Usage report, possible values include "HostGroupName", "TotalBytesTransferred", "TotalBytesWritten", "TotalBytesRead", "TotalOperations", "TotalWrites", or "TotalReads". (No sorting for Detailed Data Usage report.) For Disk Pools report, possible values include "ServerName", "PoolName", "PoolSize", or "PoolStatus". For Hosts and Hosts By Group reports, possible values include "HostName", "HostState", "PreferredServer", "Multipath", or "Alua". For Paths report, possible values include "InitiatorPort", "InitiatorMachine", "TargetPort", "TargetMachine", or "VirtualDisk". For Paths By Host and Paths by Host Port reports, possible values include "InitiatorPort", "TargetPort", "TargetMachine", or "VirtualDisk". For Paths By Server report, possible values include "TargetPort", "InitiatorPort", "InitiatorMachine", or "VirtualDisk". For Paths By Server Port report, possible values include "InitiatorPort", "InitiatorMachine", or "VirtualDisk". For Paths By Virtual Disk report, possible values include "InitiatorPort", "InitiatorMachine", "TargetPort", or "TargetMachine". For Physical Disks report, possible values include "ServerName", "DiskName", "DiskType", or "DiskStatus". For Physical Storage By Server report, possible values include "Tiernumber", "DiskName", "DiskStatus", or "DiskSize". For Port Connections report, possible values include "PortAlias", "PortRole", "PortType", "PortStatus", or "PortMode". For Ports By Host report, possible values include "PortAlias", "PortName", "PortType", or "PortStatus". For Ports By Server report, possible values include "PortAlias", "PortName", "PortType", "PortStatus", PortRole", or ServerName". For System Health report, possible values include "ResourceName", "ResourceLastUpdate", or "ResourceStatus". For all virtual disks reports, possible values include "VirtualDiskName", "VirtualDiskType", "StorageProfile", "VirtualDiskStatus", or "ReplicationStatus".
-
- Required: false
- Position: 12
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DescendingOrder<SwitchParameter>
- Specify this parameter to sort the report in descending order. If this parameter is not specified, the report will be sorted in ascending order.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -SaveToFile<String>
- Saves the report data to a file on the machine of the type specified in ReportType parameter. The file will be saved on the computer that invokes this cmdlet. Specify a complete path to an existing directory and the file name for the file. For example, if the report type is text and the value for this parameter is "C:\Reports\TextReport", then the report named "TextReport.txt" will be created in the C:\Reports directory. If the directory does not exist, it will not be created and result in an error, see the OverrideFile parameter for more information. If a file name is not entered in the provided path, the report name will be used as the file name. If a directory is not entered in the provided path, the file will be saved to the current PowerShell directory. If an empty string ("") is entered, the file will be saved in the current PowerShell directory and the name will be the report name. If this parameter is not specified, the report will be exported to the returned memory stream object and the object can be assigned to a variable in a script in order to use the results.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -OverrideFile<SwitchParameter>
- This switch parameter is used in conjunction with the SaveToFile parameter. If there already exists a report of the same name in the same path as specified by the SaveToFile parameter, the OverrideFile parameter will cause the existing file to be overwritten and replaced with the new file and prevent an error from occurring.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -StartTime<DateTime>
- Filtering parameter used to signify the beginning date and time of the data to provide in the report. The StartTime parameter is used with the EndTime parameter to provide a time interval or date range. These parameters are used with the Data Usage and Detailed Data Usage reports. One way to provide the StartTime parameter would be by passing a variable created by invoking New-Object with the TypeName parameter of DateTime with the correct arguments (see the Help for New-Object, Get-Date). The StartTime parameter can also be provided in a string that represents the date. An example of the format to use is "09/01/2014" which represents September 1, 2014. This value must be in quotes.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -EndTime<DateTime>
- Filtering parameter used to signify the ending date and time of the data to provide in the report. The StartTime parameter is used with the EndTime parameter to provide a time interval or date range. Data for the End date will be included in the report. These parameters are used with the Data Usage and Detailed Data Usage reports. One way to provide the EndTime parameter would be by passing a variable created by invoking New-Object with the TypeName parameter of DateTime with the correct arguments (see the Help for New-Object, Get-Date). The EndTime parameter can also be provided in a string representing the date. An example of the format to use is "09/30/2014" which represents September 30, 2014. This value must be in quotes.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
OUTPUTS
System.IO.Stream : Memory stream object that contains the report data.
NOTES
EXAMPLES
Export-DcsReport -ReportName "Virtual Disks By Server for SSVVM2" -ReportType "Virtual Disks By Server Port" -ExportType pdf -SaveToFile "C:\Reports\VD_BY_Svr_SSVVM2" -Server SSVVM2
A report of type "Virtual Disks By Server Port" named "Virtual Disks By Server for SSVVM2" is created on the computer invoking the cmdlet and exported in PDF to the existing folder "C:\Reports". The file is named "VD_BY_Svr_SSVVM2" and the report data will be contained in that file. The report is filtered by server named "SSVVM2" and only contains data for that server. The System.IO.Stream object is returned.
CanRead | : | True |
CanSeek | : | True |
CanWrite | : | True |
Capacity | : | 99434 |
Length | : | 83107 |
Position | : | 0 |
CanTimeout | : | False |
ReadTimeout | : | |
WriteTimeout | : | |
Export-DcsReport -ReportName "Virtual Disks Served to HostVM1" -ReportType "Virtual Disks By Group" -Export Type text -SaveToFile "C:\Reports\VDs Served to HostVM1" -Client HostVM1 -VirtualDiskKind "VirtualDisk" -ExcludeNonServedDisk
A report of type "Virtual Disks By Group" named "Virtual Disks Served to HostVM1 is created on the computer invoking the cmdlet and exported in a text file to the existing folder "C:\Reports". The file is named "VDs Served to HostVM1" and the report data will be contained in that file. The report contains virtual disks in the local server group and is filtered to return only the regular virtual disks (not snapshots or rollbacks) that are served to the client named "HostVM1". The System.IO.Stream object is returned.
CanRead | : | True |
CanSeek | : | True |
CanWrite | : | True |
Capacity | : | 4096 |
Length | : | 3978 |
Position | : | 0 |
CanTimeout | : | False |
ReadTimeout | : | |
WriteTimeout | : | |
Export-DcsReport -ReportName "Detailed Data Usage for September" -ReportType "Detailed Data Usage" -ExportType csv -SaveToFile "C:\Reports\DetailedDataUsageHostGroup1Sept" -OverrideFile -HostGroup "Host Group 1" -StartTime "09/01/2014" -EndTime "09/30/2014"
A report of type "Detailed Data Usage" named "Detailed Data Usage for Host Group 1 in September" is created on the computer invoking the cmdlet and exported in the report type "csv" (comma separated values) to the existing folder "C:\Reports". The file is named "DetailedDataUsageHostGroup1Sept" and the report data will be stored in that file. The parameter Override is included, so if a file with the same name and path exists, it will be replaced with the new file. The report contains I/O statistics used to charge back the customer affiliated with the host group "Host Group 1" that occurred between September 1, 2014 and September 30, 2014. The System.IO.Stream object is returned.
CanSeek | : | True |
CanWrite | : | True |
Capacity | : | 65536 |
Length | : | 36460 |
Position | : | 0 |
CanTimeout | : | False |
ReadTimeout | : | |
WriteTimeout | : | |
$AvailableDisks = Export-DcsReport -ReportName "Available Physical Disks" -ReportType "Physical Disks" -ExportType csv -Server SSV1 -PhysicalDiskType Available $DestinationStream = [System.IO.File]::Create("C:\Reports\"Available Physical Disks.csv") $AvailableDisks.CopyTo($DestinationStream) $DestinationStream.Flush() $DestinationStream.Close()
A report of type "Physical Disks" named "Available Physical Disks" is created on the computer invoking the cmdlet and exported in the report type "csv" (comma separated values) to the existing folder "C:\Reports". The file is named "Physical Disks SSV1" and the report data will be contained in that file. The report contains the physical disks on the server "SSV1" that are currently available. The returned object System.IO.Stream is assigned to the variable $AvailableDisks. A file is created and the data in $AvailableDisks is copied to the variable $DestinationStream. The destination stream is flushed and closed.