add: Version number to test output

This commit is contained in:
DrIOS
2025-04-21 11:57:40 -05:00
parent e2ab71f1a8
commit 55a4ec4bea
5 changed files with 7 additions and 5 deletions

View File

@@ -87,7 +87,7 @@ function Export-M365SecurityAuditTable {
)
Begin {
# Load v4.0 definitions
$Version = '4.0.0'
$AuditResults[0].M365AuditVersion
$script:TestDefinitionsObject = Get-TestDefinition -Version $Version
# Ensure Excel support if requested
if ($ExportToExcel) {

View File

@@ -194,10 +194,9 @@ function Invoke-M365SecurityAudit {
# Ensure MgGraph assemblies are loaded prior to running PnP cmdlets
Get-MgGroup -Top 1 -ErrorAction SilentlyContinue | Out-Null
}
# Define a function to load and merge test definitions
$Script:CISVersion = $Version
# Call the function to load and merge test definitions
$testDefinitions = Get-TestDefinitions -Version $Version
$testDefinitions = Get-TestDefinition -Version $Version
# Load the Test Definitions into the script scope for use in other functions
$script:TestDefinitionsObject = $testDefinitions
# Apply filters based on parameter sets