fix: Test-Error verbose call and Get-CISMgOutput Parameter
This commit is contained in:
@@ -60,7 +60,8 @@ function Get-CISMgOutput {
|
||||
# Test-PasswordNeverExpirePolicy.ps1
|
||||
$domains = if ($DomainName) {
|
||||
Get-MgDomain -DomainId $DomainName
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Get-MgDomain
|
||||
}
|
||||
return $domains
|
||||
|
||||
@@ -27,7 +27,7 @@ function Get-TestError {
|
||||
$script:FailedTests.Add([PSCustomObject]@{ Rec = $recnum; Description = $description; Error = $LastError })
|
||||
# Call Initialize-CISAuditResult with error parameters
|
||||
$auditResult = Initialize-CISAuditResult -Rec $recnum -Failure
|
||||
Write-Verbose "An error occurred during the test: `n$LastError" -VerboseAction Continue
|
||||
Write-Verbose "An error occurred during the test: `n$LastError" -Verbose
|
||||
return $auditResult
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user