docs: Update Markdown

This commit is contained in:
DrIOS
2024-07-07 17:15:05 -05:00
parent e1ab050e69
commit 7688071899
9 changed files with 815 additions and 811 deletions

View File

@@ -1,4 +1,4 @@
--- ---
external help file: M365FoundationsCISReport-help.xml external help file: M365FoundationsCISReport-help.xml
Module Name: M365FoundationsCISReport Module Name: M365FoundationsCISReport
online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Export-M365SecurityAuditTable online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Export-M365SecurityAuditTable
@@ -109,22 +109,6 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: 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".
```yaml
Type: String
Parameter Sets: OutputObjectFromAuditResultsSingle, OutputObjectFromCsvSingle
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExportAllTests ### -ExportAllTests
Switch to export all test results. Switch to export all test results.
@@ -140,6 +124,21 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ExportOriginalTests
Switch to export the original audit results to a CSV file.
```yaml
Type: SwitchParameter
Parameter Sets: ExportAllResultsFromAuditResults, ExportAllResultsFromCsv
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExportPath ### -ExportPath
The path where the CSV files will be exported. The path where the CSV files will be exported.
@@ -155,21 +154,6 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ExportOriginalTests
Switch to export the original audit results to a CSV file.
```yaml
Type: SwitchParameter
Parameter Sets: ExportAllResultsFromAuditResults, ExportAllResultsFromCsv
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ExportToExcel ### -ExportToExcel
Switch to export the results to an Excel file. Switch to export the results to an Excel file.
@@ -185,13 +169,29 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: 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".
```yaml
Type: String
Parameter Sets: OutputObjectFromAuditResultsSingle, OutputObjectFromCsvSingle
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS ## INPUTS
### [CISAuditResult[]] - An array of CISAuditResult objects. ### [CISAuditResult[]] - An array of CISAuditResult objects.
### [string] - A path to a CSV file. ### [string] - A path to a CSV file.
## OUTPUTS ## OUTPUTS
### [PSCustomObject] - A custom object containing the path to the zip file and its hash. ### [PSCustomObject] - A custom object containing the path to the zip file and its hash.

View File

@@ -63,7 +63,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS ## OUTPUTS
### PSCustomObject ### PSCustomObject
### Returns a custom object for each user with administrative roles that includes the following properties: RoleName, UserName, UserPrincipalName, UserId, HybridUser, and Licenses. ### Returns a custom object for each user with administrative roles that includes the following properties: RoleName, UserName, UserPrincipalName, UserId, HybridUser, and Licenses.
## NOTES ## NOTES
Creation Date: 2024-04-15 Creation Date: 2024-04-15
Purpose/Change: Initial function development to support Microsoft 365 administrative role auditing. Purpose/Change: Initial function development to support Microsoft 365 administrative role auditing.

View File

@@ -1,4 +1,4 @@
--- ---
external help file: M365FoundationsCISReport-help.xml external help file: M365FoundationsCISReport-help.xml
Module Name: M365FoundationsCISReport Module Name: M365FoundationsCISReport
online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-MFAStatus online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Get-MFAStatus
@@ -36,6 +36,21 @@ Retrieves the MFA status for the specified user with the UPN "example@domain.com
## PARAMETERS ## PARAMETERS
### -SkipMSOLConnectionChecks
{{ Fill SkipMSOLConnectionChecks Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -UserId ### -UserId
The User Principal Name (UPN) of a specific user to retrieve MFA status for. 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. If not provided, the function retrieves MFA status for all users.
@@ -52,21 +67,6 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -SkipMSOLConnectionChecks
{{ Fill SkipMSOLConnectionChecks Description }}
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
@@ -75,14 +75,14 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS ## OUTPUTS
### System.Object ### System.Object
### Returns a sorted list of custom objects containing the following properties: ### Returns a sorted list of custom objects containing the following properties:
### - UserPrincipalName ### - UserPrincipalName
### - DisplayName ### - DisplayName
### - MFAState ### - MFAState
### - MFADefaultMethod ### - MFADefaultMethod
### - MFAPhoneNumber ### - MFAPhoneNumber
### - PrimarySMTP ### - PrimarySMTP
### - Aliases ### - Aliases
## NOTES ## NOTES
The function requires the MSOL module to be installed and connected to your tenant. The function requires the MSOL module to be installed and connected to your tenant.
Ensure that you have the necessary permissions to read user and MFA status information. Ensure that you have the necessary permissions to read user and MFA status information.

View File

@@ -1,4 +1,4 @@
--- ---
external help file: M365FoundationsCISReport-help.xml external help file: M365FoundationsCISReport-help.xml
Module Name: M365FoundationsCISReport Module Name: M365FoundationsCISReport
online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Grant-M365SecurityAuditConsent online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Grant-M365SecurityAuditConsent
@@ -40,18 +40,18 @@ Grants Microsoft Graph permissions to user@example.com, skipping the connection
## PARAMETERS ## PARAMETERS
### -UserPrincipalNameForConsent ### -DoNotDisconnect
Specify the UPN of the user to grant consent for. If specified, does not disconnect from Microsoft Graph after granting consent.
```yaml ```yaml
Type: String Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: False
Position: 1 Position: Named
Default value: None Default value: False
Accept pipeline input: True (ByPropertyName, ByValue) Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
@@ -100,17 +100,32 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -DoNotDisconnect ### -UserPrincipalNameForConsent
If specified, does not disconnect from Microsoft Graph after granting consent. Specify the UPN of the user to grant consent for.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml ```yaml
Type: SwitchParameter Type: SwitchParameter
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases: cf
Required: False Required: False
Position: Named Position: Named
Default value: False Default value: None
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
@@ -131,21 +146,6 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

View File

@@ -1,4 +1,4 @@
--- ---
external help file: M365FoundationsCISReport-help.xml external help file: M365FoundationsCISReport-help.xml
Module Name: M365FoundationsCISReport Module Name: M365FoundationsCISReport
online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Invoke-M365SecurityAudit online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Invoke-M365SecurityAudit
@@ -165,12 +165,26 @@ What if: Performing the operation "Invoke-M365SecurityAudit" on target "Microsof
## PARAMETERS ## PARAMETERS
### -TenantAdminUrl ### -ApprovedCloudStorageProviders
The URL of the tenant admin. Specifies the approved cloud storage providers for the audit. Accepts an array of cloud storage provider names.
If not specified, none of the SharePoint Online tests will run.
```yaml ```yaml
Type: String Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: @()
Accept pipeline input: False
Accept wildcard characters: False
```
### -ApprovedFederatedDomains
Specifies the approved federated domains for the audit test 8.2.1. Accepts an array of allowed domain names.
```yaml
Type: String[]
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
@@ -196,25 +210,54 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ELevel ### -DoNotConfirmConnections
Specifies the E-Level (E3 or E5) for the audit. If specified, the cmdlet will not prompt for confirmation before proceeding with established connections and will disconnect from all of them.
This parameter is optional and can be combined with the ProfileLevel parameter.
```yaml ```yaml
Type: String Type: SwitchParameter
Parameter Sets: ELevelFilter Parameter Sets: (All)
Aliases: Aliases:
Required: True Required: False
Position: Named Position: Named
Default value: None Default value: False
Accept pipeline input: False Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ProfileLevel ### -DoNotConnect
Specifies the profile level (L1 or L2) for the audit. If specified, the cmdlet will not establish a connection to Microsoft 365 services.
This parameter is optional and can be combined with the ELevel parameter.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -DoNotDisconnect
If specified, the cmdlet will not disconnect from Microsoft 365 services after execution.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ELevel
Specifies the E-Level (E3 or E5) for the audit.
This parameter is optional and can be combined with the ProfileLevel parameter.
```yaml ```yaml
Type: String Type: String
@@ -289,6 +332,37 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -NoModuleCheck
If specified, the cmdlet will not check for the presence of required modules.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -ProfileLevel
Specifies the profile level (L1 or L2) for the audit.
This parameter is optional and can be combined with the ELevel parameter.
```yaml
Type: String
Parameter Sets: ELevelFilter
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SkipRecommendation ### -SkipRecommendation
Specifies specific recommendations to exclude from the audit. Specifies specific recommendations to exclude from the audit.
Accepts an array of recommendation numbers. Accepts an array of recommendation numbers.
@@ -305,105 +379,15 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ApprovedCloudStorageProviders ### -TenantAdminUrl
Specifies the approved cloud storage providers for the audit. Accepts an array of cloud storage provider names. The URL of the tenant admin.
If not specified, none of the SharePoint Online tests will run.
```yaml ```yaml
Type: String[] Type: String
Parameter Sets: (All) Parameter Sets: (All)
Aliases: Aliases:
Required: False
Position: Named
Default value: @()
Accept pipeline input: False
Accept wildcard characters: False
```
### -ApprovedFederatedDomains
Specifies the approved federated domains for the audit test 8.2.1. Accepts an array of allowed domain names.
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DoNotConnect
If specified, the cmdlet will not establish a connection to Microsoft 365 services.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -DoNotDisconnect
If specified, the cmdlet will not disconnect from Microsoft 365 services after execution.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -NoModuleCheck
If specified, the cmdlet will not check for the presence of required modules.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -DoNotConfirmConnections
If specified, the cmdlet will not prompt for confirmation before proceeding with established connections and will disconnect from all of them.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False Required: False
Position: Named Position: Named
Default value: None Default value: None
@@ -426,6 +410,22 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters ### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
@@ -435,7 +435,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS ## OUTPUTS
### CISAuditResult[] ### CISAuditResult[]
### The cmdlet returns an array of CISAuditResult objects representing the results of the security audit. ### The cmdlet returns an array of CISAuditResult objects representing the results of the security audit.
## NOTES ## NOTES
- This module is based on CIS benchmarks. - This module is based on CIS benchmarks.
- Governed by the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. - Governed by the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

View File

@@ -1,4 +1,4 @@
--- ---
external help file: M365FoundationsCISReport-help.xml external help file: M365FoundationsCISReport-help.xml
Module Name: M365FoundationsCISReport Module Name: M365FoundationsCISReport
online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Sync-CISExcelAndCsvData online version: https://criticalsolutionsnetwork.github.io/M365FoundationsCISReport/#Sync-CISExcelAndCsvData
@@ -32,22 +32,6 @@ Updates the 'AuditData' worksheet in 'excel.xlsx' with data from 'data.csv', add
## PARAMETERS ## PARAMETERS
### -ExcelPath
Specifies the path to the Excel file to be updated.
This parameter is mandatory.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -CsvPath ### -CsvPath
Specifies the path to the CSV file containing new data. Specifies the path to the CSV file containing new data.
This parameter is mandatory. This parameter is mandatory.
@@ -64,6 +48,22 @@ Accept pipeline input: False
Accept wildcard characters: False Accept wildcard characters: False
``` ```
### -ExcelPath
Specifies the path to the Excel file to be updated.
This parameter is mandatory.
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SheetName ### -SheetName
Specifies the name of the worksheet in the Excel file where data will be merged and updated. Specifies the name of the worksheet in the Excel file where data will be merged and updated.
This parameter is mandatory. This parameter is mandatory.
@@ -86,7 +86,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS ## INPUTS
### System.String ### System.String
### The function accepts strings for file paths and worksheet names. ### The function accepts strings for file paths and worksheet names.
## OUTPUTS ## OUTPUTS
### None ### None

View File

@@ -18,9 +18,11 @@ The module includes functionality to synchronize audit results with CIS benchmar
```powershell ```powershell
# Example 1: Performing a security audit based on CIS benchmarks # Example 1: Performing a security audit based on CIS benchmarks
$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" $auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com"
$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com" -ApprovedCloudStorageProviders "DropBox" -ApprovedFederatedDomains "northwind.com"
# Example 2: Exporting a security audit table to a CSV file # Example 2: Exporting a security audit and it's nested tables to zipped CSV files
Export-M365SecurityAuditTable -ExportAllTests -AuditResults $auditResults -ExportPath "C:\temp" -ExportOriginalTests Export-M365SecurityAuditTable -AuditResults $auditResults -ExportPath "C:\temp" -ExportOriginalTests -ExportAllTests
# Output Ex: 2024.07.07_14.55.55_M365FoundationsAudit_368B2E2F.zip
# Example 3: Retrieving licenses for users in administrative roles # Example 3: Retrieving licenses for users in administrative roles
Get-AdminRoleUserLicense Get-AdminRoleUserLicense

File diff suppressed because it is too large Load Diff

View File

@@ -30,9 +30,11 @@ Optional Subtopics
EXAMPLES EXAMPLES
# Example 1: Performing a security audit based on CIS benchmarks # Example 1: Performing a security audit based on CIS benchmarks
$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" $auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com"
$auditResults = Invoke-M365SecurityAudit -TenantAdminUrl "https://contoso-admin.sharepoint.com" -DomainName "contoso.com" -ApprovedCloudStorageProviders "DropBox" -ApprovedFederatedDomains "northwind.com"
# Example 2: Exporting a security audit table to a CSV file # Example 2: Exporting a security audit and it's nested tables to zipped CSV files
Export-M365SecurityAuditTable -ExportAllTests -AuditResults $auditResults -ExportPath "C:\temp" -ExportOriginalTests Export-M365SecurityAuditTable -AuditResults $auditResults -ExportPath "C:\temp" -ExportOriginalTests -ExportAllTests
# Output Ex: 2024.07.07_14.55.55_M365FoundationsAudit_368B2E2F.zip
# Example 3: Retrieving licenses for users in administrative roles # Example 3: Retrieving licenses for users in administrative roles
Get-AdminRoleUserLicense Get-AdminRoleUserLicense