Syntax
Export-M365SecurityAuditTable [-AuditResults] <CISAuditResult[]> [-OutputTestNumber] <String> [<CommonParameters>] Export-M365SecurityAuditTable [-AuditResults] <CISAuditResult[]> [-ExportAllTests] -ExportPath <String> [-ExportOriginalTests] [-ExportToExcel] [<CommonParameters>]Export-M365SecurityAuditTable [-AuditResults] <CISAuditResult[]> [-ExportAllTests] -ExportPath <String> [-ExportOriginalTests] [<CommonParameters>]Export-M365SecurityAuditTable [-CsvPath] <String> [-OutputTestNumber] <String> [<CommonParameters>] Export-M365SecurityAuditTable [-CsvPath] <String> [-ExportAllTests] -ExportPath <String> [-ExportOriginalTests] [-ExportToExcel] [<CommonParameters>]Export-M365SecurityAuditTable [-CsvPath] <String> [-ExportAllTests] -ExportPath <String> [-ExportOriginalTests] [<CommonParameters>]
Parameters
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
AuditResults | An array of CISAuditResult objects containing the audit results. | true | false | ||
CsvPath | The path to a CSV file containing the audit results. | true | false | ||
OutputTestNumber | The test number to output as an object. Valid values are "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4". | true | false | ||
ExportAllTests | Switch to export all test results. | true | false | False | |
ExportPath | The path where the CSV files will be exported. | true | false | ||
ExportOriginalTests | Switch to export the original audit results to a CSV file. | false | false | False |
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
AuditResults | An array of CISAuditResult objects containing the audit results. | true | false | ||
CsvPath | The path to a CSV file containing the audit results. | true | false | ||
OutputTestNumber | The test number to output as an object. Valid values are "1.1.1", "1.3.1", "6.1.2", "6.1.3", "7.3.4". | true | false | ||
ExportAllTests | Switch to export all test results. | true | false | False | |
ExportPath | The path where the CSV files will be exported. | true | false | ||
ExportOriginalTests | Switch to export the original audit results to a CSV file. | false | false | False | |
ExportToExcel | Switch to export the results to an Excel file. | false | false | False |
Inputs
- [CISAuditResult[]], [string]
Syntax
Get-AdminRoleUserLicense [-SkipGraphConnection] [<CommonParameters>]
Parameters
Inputs
- None. You cannot pipe objects to Get-AdminRoleUserLicense.
Syntax
Get-MFAStatus [[-UserId] <String>] [-SkipMSOLConnectionChecks] [<CommonParameters>]Get-MFAStatus [[-UserId] <String>] [<CommonParameters>]
Parameters
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
UserId | The User Principal Name (UPN) of a specific user to retrieve MFA status for. If not provided, the function retrieves MFA status for all users. | false | false |
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
UserId | The User Principal Name (UPN) of a specific user to retrieve MFA status for. If not provided, the function retrieves MFA status for all users. | false | false | ||
SkipMSOLConnectionChecks | false | false | False |
Outputs
- System.Object Returns a sorted list of custom objects containing the following properties: - UserPrincipalName - DisplayName - MFAState - MFADefaultMethod - MFAPhoneNumber - PrimarySMTP - Aliases
Syntax
Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>] Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -ELevel <String> -ProfileLevel <String> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -ELevel <String> -ProfileLevel <String> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -IncludeIG1 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>] Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -IncludeIG2 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>] Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -IncludeIG3 [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>] Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -IncludeRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -IncludeRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -SkipRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]Invoke-M365SecurityAudit [-TenantAdminUrl <String>] [-M365DomainForPWPolicyTest <String>] -SkipRecommendation <String[]> [-DoNotConnect] [-DoNotDisconnect] [-NoModuleCheck] [-DoNotConfirmConnections] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters
Inputs
- None. You cannot pipe objects to Invoke-M365SecurityAudit.
Remove-RowsWithEmptyCSVStatus
Synopsis
Removes rows from an Excel worksheet where the 'CSV_Status' column is empty and saves the result to a new file.
Syntax
Remove-RowsWithEmptyCSVStatus [-FilePath] <String> [-WorksheetName] <String> [<CommonParameters>]Remove-RowsWithEmptyCSVStatus [-FilePath] <string> [-WorksheetName] <string> [<CommonParameters>]
Parameters
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
FilePath | None | true | false | ||
WorksheetName | None | true | false |
Name | Alias | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
FilePath | The path to the Excel file to be processed. | true | false | ||
WorksheetName | The name of the worksheet within the Excel file to be processed. | true | false |
Note
This function requires the ImportExcel module to be installed.
Examples
EXAMPLE 1
Remove-RowsWithEmptyCSVStatus -FilePath "C:\Reports\Report.xlsx" -WorksheetName "Sheet1"
This command imports data from the "Sheet1" worksheet in the "Report.xlsx" file, removes rows where the 'CSV_Status' column is empty, and saves the filtered data to a new file named "Report-Filtered.xlsx" in the same
directory.
Sync-CISExcelAndCsvData
Synopsis
Synchronizes and updates data in an Excel worksheet with new information from a CSV file, including audit dates.
Note
- Ensure that the 'ImportExcel' module is installed and up to date to handle Excel file manipulations. - It is recommended to back up the Excel file before running this function to avoid accidental data loss. - The CSV file should have columns that match expected headers like 'Connection', 'Details', 'FailureReason', and 'Status' for correct data mapping.
Examples
EXAMPLE 1