NetAppDocs PowerShell Module

Format-NtapVserverData


NAME
    Format-NtapVserverData

SYNOPSIS
    Parses the raw data from the Get-NtapVserverData / ConvertTo-NtapVserverData functions and optionally sanitizes
    the data for secure environments.


SYNTAX
    Format-NtapVserverData [-InputObject] <Object[]> [-ExcludeTable <String[]>] [-Terse] [-UseNaturalSort] [-SanitizeLevel
    <Int32>] [-SanitizeMappingsXmlFile <String>] [-ResetSanitizeMappings] [<CommonParameters>]


DESCRIPTION
    Takes raw configuration information from Get-NtapVserverData 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-NtapVserverData function (can also be *.xml.gz). Also accepts pipeline input from
        the Get-NtapVserverData 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
            8 = DNS Domain Name
           16 = SVM 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

        To include multiple entries, simply add up the numbers. For example, for IP Address, SVM Name and DNS Domain
        Name sanitization the level should be 25 (1 + 16 + 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-NtapVserverData -ClusterName cluster1 | Format-NtapVserverData | Out-NtapDocument -WordFile
    'D:\Output\cluster1-allVservers.docx'

    Collects the data for all data Vservers in cluster 'cluster1' and produces the output Word documents.




    -------------------------- EXAMPLE 2 --------------------------

    PS>Get-NtapVserverData -Name vs_nfs, vs_cifs -ClusterName cluster1 | Format-NtapVserverData | Out-NtapDocument -WordFile
    'D:\Output\cluster1-NasVservers.docx' -ExcelFile 'D:\Output\cluster1-NasVservers.xlsx'

    Collects the data for the 2 specified Vservers in cluster 'cluster1' and produces the output documents specified.




    -------------------------- EXAMPLE 3 --------------------------

    PS>Get-NtapVserverData -ClusterName cluster1 | Format-NtapVserverData -SanitizeLevel 4097 -SanitizeMappingsXmlFile
    'D:\Output\Site-SanitizeMappings.xml' | Out-NtapDocument -WordFile 'D:\Output\Site.docx'

    Collects the data for all data Vservers in cluster 'cluster1' and produces the 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 4 --------------------------

    PS>Get-ChildItem -Path 'D:\Output\cluster1.xml' | ConvertTo-NtapVserverData | Format-NtapVserverData | Out-NtapDocument
    -WordFile 'D:\Output\cluster1-allVservers.docx' -ExcelFile 'D:\Output\cluster1-allVservers.xlsx'

    Reads the raw cluster data from the file cluster1.xml (generated via Get-NtapClusterData) and outputs the data for
    all the data Vservers to the Word and Excel documents specified.





RELATED LINKS
    https://community.netapp.com/t5/NetAppDocs/bd-p/netappdocs
    Get-NtapVserverData