Convert-MtResultsToFlatObject
SYNOPSISโ
Convert Maester test results to a flattened object that can be exported to CSV or Excel.
SYNTAXโ
FromFile (Default)โ
Convert-MtResultsToFlatObject [-JsonFilePath] <String> [-ExportCsv] [-ExportExcel] [-CsvFilePath <String>]
[-ExcelFilePath <String>] [-Force] [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
XLSXโ
Convert-MtResultsToFlatObject [-InputObject] <PSObject> [-JsonFilePath] <String> [-ExportCsv] [-ExportExcel]
[-ExcelFilePath <String>] [-Force] [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
CSVโ
Convert-MtResultsToFlatObject [-InputObject] <PSObject> [-JsonFilePath] <String> [-ExportCsv] [-ExportExcel]
[-CsvFilePath <String>] [-Force] [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
FromInputObjectโ
Convert-MtResultsToFlatObject [-InputObject] <PSObject> [-ExportCsv] [-ExportExcel] [-CsvFilePath <String>]
[-ExcelFilePath <String>] [-Force] [-PassThru] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTIONโ
Convert Maester test results to a flattened object that can be exported to CSV or Excel. This function exports the data to a CSV file by default, but can also export to an Excel file if the ImportExcel module is installed.
The function also supports reading Maester test results from a JSON file and exporting the flattened object to a CSV.
EXAMPLESโ
EXAMPLE 1โ
Convert-MtResultsToFlatObject -JsonFilePath 'C:\path\to\results.json'
Convert the Maester test results in C:\path\to\results.json to a flattened object that is then returned to the pipeline.
EXAMPLE 2โ
Convert-MtResultsToFlatObject -JsonFilePath 'C:\path\to\results.json' -ExportExcel
Convert the Maester test results in C:\path\to\results.json to a flattened object, and then export that object to an Excel file (C:\path\to\results.xlsx). Requires the ImportExcel module.
EXAMPLE 3โ
Convert-MtResultsToFlatObject -JsonFilePath 'C:\path\to\results.json' -ExportCsv -CsvFilePath 'C:\path\to\results.csv'
Convert the Maester test results in C:\path\to\results.json to a flattened object, and then export that object to C:\path\to\results.csv.