Fixed issue with importing Security Baseline 24H2.
This commit is contained in:
Mikael Karlsson
2025-04-19 14:53:57 +10:00
parent 2169e91c9c
commit 968fb4866c
4 changed files with 97 additions and 11 deletions

View File

@@ -2910,6 +2910,19 @@ function Get-DataGridValues
($dataGrid.ItemsSource | Select -Property $properties)
}
function Get-GUIDs
{
param($text)
$regExpGuid = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
$uniqueGuids = New-Object System.Collections.Generic.HashSet[String]
# Use regular expressions to extract the GUIDs
[regex]::Matches($text, $regExpGuid) | ForEach-Object { $uniqueGuids.Add($_.Value) | Out-Null }
$uniqueGuids
}
New-Alias -Name ?? -value Invoke-Coalesce
New-Alias -Name ?: -value Invoke-IfTrue