NAME
Format-NtapClusterData
SYNOPSIS
Parses the raw data from the Get-NtapClusterData / Get-NtapClusterAsupData functions and optionally sanitizes the
data for secure environments.
SYNTAX
Format-NtapClusterData [-InputObject] <Object[]> [-ExcludeTable <String[]>] [-Terse] [-UseNaturalSort] [-SanitizeLevel
<Int32>] [-SanitizeMappingsXmlFile <String>] [-ResetSanitizeMappings] [<CommonParameters>]
DESCRIPTION
Takes raw configuration information from Get-NtapClusterData and parses it into relevant documentation data.
The parsed output data can optionally be sanitized via the -SanitizeLevel parameter. This will create an XML file that
contains the sanitized mappings (-SanitizedMappingsXmlFile <filename>) and this file can be used each time so the
mappings will stay consistent, or the file can be reset each time (-ResetSanitizeMappings). In addition to the
XML file, an XLSX file will be created that contains the mappings generated in an easier to read format. This file will
be regenerated with each run regardless of the XML file parameters. Currently, the XLSX file will be output to the same
path as the XML file.
There is a sanitize mappings XML template file in this modules 'Templates' folder. Within that file are some options
to define the number of octets of the IP address to 'X' out ('SanitizeMethod' option set to 'Octets' and
'Ipv4OctetsToSanitize' option) or to provide a mapping for the IP addresses ('SanitizeMethod' option set to 'Mapping').
Another option within this file is to only sanitize the mappings currently contained within the XML file. This is
useful in the case where only a certain subset of the items on the controllers may be sensitve. You can prepopulate
the mappings file by making a copy of the template, changing the option 'CurrentEntriesOnly' to 'True' and adding
the entries desired in the appropriate location. Then, pass this filename as the parameter for -SanitizeMappingsXmlFile
and ensure -ResetSanitizeMappings is $false (default).
PARAMETERS
-InputObject <Object[]>
An Xml file created by the Get-NtapClusterData function (can also be *.xml.gz). Also accepts pipeline input from
the Get-NtapClusterData function.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ExcludeTable <String[]>
Excludes the specified table(s) from the output documentation. This is useful for tables that might be quite large and
will take a long time to process (such as CifsShares).
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Terse [<SwitchParameter>]
This will exclude a pre-defined list of tables that have the potential to process slowly due to a large number of rows.
See the FAQ entry for more information.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-UseNaturalSort [<SwitchParameter>]
If specified, the rows in the DataTable will be sorted with a NaturalSort routine (this may increase the time necessary
to complete the sort).
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SanitizeLevel <Int32>
You can specify various levels of sanitization for the output documentation. The levels are defined as follows:
1 = IP Address
2 = MAC Address
4 = Node Name
8 = DNS Domain Name
16 = SVM Name
32 = License Code
64 = Aggregate Name
128 = Volume Name
256 = Qtree Name
512 = LUN Name
1024 = LUN Initiator Group Name
2048 = Other Servers
4096 = SNMP Community String
8192 = CIFS Share Name
16384 = Active Directory NetBIOS Name
32768 = ONTAP Cluster Name
To include multiple entries, simply add up the numbers. For example, for IP Address, Node Name and DNS Domain
Name sanitization the level should be 13 (1 + 4 + 8).
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-SanitizeMappingsXmlFile <String>
The path to Xml file containing sanitization options and string mappings. If this file does not currently exist, a
copy of the template will be used to generate a new file.
Note: If the sanitize level specified contains only IP Address, MAC Address and/or License Code then this parameter
is not necessary. Also, if this parameter is not specified then a temporary file will be created and subsequently
deleted upon completion.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ResetSanitizeMappings [<SwitchParameter>]
If set to true then the sanitize mappings file specified will be reset to the defaults. (Default: False)
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSCustomObject
System.IO.FileInfo
System.String
OUTPUTS
System.Data.DataSet
NOTES
AUTHOR : Jason Cole
-------------------------- EXAMPLE 1 --------------------------
PS>Get-NtapClusterData -Name Cluster1 | Format-NtapClusterData | Out-NtapDocument -WordFile 'D:\Output\cluster1.docx'
Collects the data from the cluster 'cluster1' and produces the output Word document.
-------------------------- EXAMPLE 2 --------------------------
PS>Get-NtapClusterData -Name cluster1, cluster2 | Format-NtapClusterData | Out-NtapDocument -WordFile
'D:\Output\Clusters.docx' -ExcelFile 'D:\Output\Clusters.xlsx'
Collects the data from 2 clusters ('cluster1' and 'cluster2'), and produces the single output Word and Excel
documents.
-------------------------- EXAMPLE 3 --------------------------
PS>Get-NtapClusterData -Name cluster1, cluster2 | ForEach-Object { $_ | Format-NtapClusterData | Out-NtapDocument -WordFile
"D:\Output\$( $_.SystemName ).docx" -ExcelFile "D:\Output\$( $_.SystemName ).xlsx" }
Collects the data from 2 clusters ('cluster1' and 'cluster2'), and produces separate output Word and Excel
documents for each cluster.
-------------------------- EXAMPLE 4 --------------------------
PS>Get-NtapClusterData -Name cluster1 | Format-NtapClusterData -SanitizeLevel 4097 -SanitizeMappingsXmlFile
'D:\Output\Site-SanitizeMappings.xml' | Out-NtapDocument -WordFile 'D:\Output\Site.docx'
Collects the data from the cluster 'cluster1' and produces the single output Word document. Additionally, this
will sanitize both IP addresses and SNMP community strings (1 + 4096) and create the specified sanitized
mappings XML file.
-------------------------- EXAMPLE 5 --------------------------
PS>Get-ChildItem -Path 'D:\Output' -Filter cluster*.xml | Format-NtapClusterData | Out-NtapDocument -WordFile
'D:\Output\AllClusters.docx' -ExcelFile 'D:\Output\AllClusters.xlsx'
This example gathers all the raw XML files generated from Get-NtapClusterData, formats the output and creates
the single Word and Excel documents specified.
RELATED LINKS
https://community.netapp.com/t5/NetAppDocs/bd-p/netappdocs
Get-NtapClusterData
Get-NtapClusterAsupData