add: New testing function

This commit is contained in:
DrIOS
2024-05-28 17:08:04 -05:00
parent 8505439516
commit 129bb33a99
55 changed files with 691 additions and 804 deletions

View File

@@ -34,21 +34,17 @@ function Test-OneDriveSyncRestrictions {
}
# Create and populate the CISAuditResult object
$auditResult = [CISAuditResult]::new()
$auditResult.Status = if ($isSyncRestricted) { "Pass" } else { "Fail" }
$auditResult.ELevel = "E3"
$auditResult.ProfileLevel = "L2"
$auditResult.Rec = "7.3.2"
$auditResult.RecDescription = "Ensure OneDrive sync is restricted for unmanaged devices"
$auditResult.CISControlVer = "v8"
$auditResult.CISControl = "0.0"
$auditResult.CISDescription = "Explicitly Not Mapped"
$auditResult.IG1 = $false
$auditResult.IG2 = $false
$auditResult.IG3 = $false
$auditResult.Result = $isSyncRestricted
$auditResult.Details = $details
$auditResult.FailureReason = $failureReasons
$params = @{
Rec = "7.3.2"
Result = $isSyncRestricted
Status = if ($isSyncRestricted) { "Pass" } else { "Fail" }
Details = $details
FailureReason = $failureReasons
RecDescription = "Ensure OneDrive sync is restricted for unmanaged devices"
CISControl = "0.0"
CISDescription = "Explicitly Not Mapped"
}
$auditResult = Initialize-CISAuditResult @params
}
end {