NetAppDocs PowerShell Module

Format-NtapFilerData


NAME
    Format-NtapFilerData

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


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

    Format-NtapFilerData [-InputObject] <Object[]> [-ExcludeTable <String[]>] [-Terse] [-UseNaturalSort] [-Transition]
    [-ExcludeCifsSharePath <String>] [-SanitizeLevel <Int32>] [-SanitizeMappingsXmlFile <String>] [-ResetSanitizeMappings]
    [<CommonParameters>]


DESCRIPTION
    Takes raw configuration information from Get-NtapFilerData 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-NtapFilerData function (can also be *.xml.gz). Also accepts pipeline input from
        the Get-NtapFilerData 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

    -Transition [<SwitchParameter>]
        If set to true the function will output 7-Mode to cDOT transition specific data.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -ExcludeCifsSharePath <String>
        You can specify a path string to exclude CIFS share paths. This string can be a regular expression ('/USER\d+/USR\d+')
        or a '|' separated list of paths ('/vol/USER01/USR1|/vol/USER02/USR1').

        Required?                    false
        Position?                    named
        Default value
        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 = Controller Name
            8 = DNS Domain Name
           16 = Vfiler 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

        To include multiple entries, simply add up the numbers. For example, for IP Address, Controller 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-ChildItem -Path 'D:\SiteXmls' -Filter *.xml | Format-NtapFilerData | Out-NtapDocument -WordFile 'D:\Output\Site.docx'
    -ExcelFile 'D:\Output\Site.xlsx'

    This example gathers all the raw XML files generated from Get-NtapFilerData, formats the output and creates the
    Word and Excel documents specified.




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

    PS>Get-NtapFilerData -Name controller1, controller2 | Format-NtapFilerData -ExcludeCifsShares | Out-NtapDocument -WordFile
    'D:\Output\Site.docx'

    Collects the data from 2 controllers and produces the output Word document, excluding all CIFS shares.




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

    PS>Get-NtapFilerData -Name controller1, controller2 | Format-NtapFilerData -ExcludeCifsSharesPath 'USER01/USR1' |
    Out-NtapDocument -WordFile 'D:\Output\Site.docx'

    Collects the data from 2 controllers and produces the output Word document, excluding all CIFS shares found with
    a mount point that matches the specified path.




    -------------------------- EXAMPLE 4 --------------------------

    PS>Get-NtapFilerData -Name controller1, controller2 | Format-NtapFilerData -SanitizeLevel 4097 -SanitizeMappingsXmlFile
    'D:\Output\Site-SanitizeMappings.xml' | Out-NtapDocument -WordFile 'D:\Output\Site.docx'

    Collects the data from 2 controllers 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.





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