NetAppDocs PowerShell Module

Compare-NtapDocsData


NAME
    Compare-NtapDocsData

SYNOPSIS
    Creates a differences report from two outputs generated using the Format-Ntap*Data functions (using
    the -XmlFile parameter with the Out-NtapDocument function).


SYNTAX
    Compare-NtapDocsData [-DataSet1] <Object> [-DataSet2] <Object> [-ForceOrder] [-ChangesOnly] [-SkipOutputOnNullDifferences]
    [<CommonParameters>]


DESCRIPTION
    Compares output from two separate formatted NetAppDocs DataSets. The input for this function can be
    the output files from the Format functions that are saved using using the -XmlFile parameter of the
    Out-NtapDocument function. This will return a new DataSet highlighting any rows that have been added, deleted
    or modified. The updated columns in the modified rows will include a comment showing the original value.


PARAMETERS
    -DataSet1 <Object>
        The first DataSet generated by the Out-NtapDocument function. This can be a path to a file or a DataSet object.

        Required?                    true
        Position?                    1
        Default value
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -DataSet2 <Object>
        The second DataSet generated by the Out-NtapDocument function. This can be a path to a file or a DataSet object.

        Required?                    true
        Position?                    2
        Default value
        Accept pipeline input?       false
        Accept wildcard characters?  false

    -ForceOrder [<SwitchParameter>]
        This parameter forces the order of the DataSet1 and DataSet2 parameters. As in, DataSet1 will be considered the
        oldest data and DataSet2 will be considered the newest data. This is useful in scenarios where the earliest
        raw data was formatted after the newest data was formatted. By default, the DataSet timestamps are used to
        determine the order.

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

    -ChangesOnly [<SwitchParameter>]
        When this parameter is specified, only the changed rows will be returned.

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

    -SkipOutputOnNullDifferences [<SwitchParameter>]
        This parameter will prevent the output document from being generated when there are no differences found in any of the
        tables.

        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
    None


OUTPUTS
    System.Data.DataSet


NOTES


        AUTHOR : Jason Cole

    -------------------------- EXAMPLE 1 --------------------------

    PS>Compare-NtapDocsData -DataSet1 'D:\XmlFile1.xml' -DataSet2 'D:\XmlFile2.xml' | Out-NtapDocument -ExcelFile 'D:\diff.xlsx'

    This example compares the data between the 2 formatted XML files and outputs the results to the specified file.




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

    PS>Compare-NtapDocsData -DataSet1 'D:\XmlFile1.xml' -DataSet2 'D:\XmlFile2.xml' -ChangesOnly | Out-NtapDocument -ExcelFile
    'D:\diff_changes-only.xlsx'

    This example compares the data between the 2 formatted XML files and outputs only the changes to the specified file.





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