This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Read the JSON file content | |
$jsonContent = Get-Content -Raw -Path "C:/Users/{userprofile}/Desktop/audit-log-report/audit-report.json" | |
# Step 2: Convert JSON content to PowerShell objects | |
$data = $jsonContent | ConvertFrom-Json | |
# Step 3: Filter critical advisories | |
$criticalAdvisories = $data.advisories.PSObject.Properties | | |
ForEach-Object { $_.Value } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Read the JSON file content | |
$jsonContent = Get-Content -Raw -Path "C:/Users/{userprofile}/Desktop/audit-log-report/audit-report.json" | |
# Step 2: Convert JSON content to PowerShell objects | |
$data = $jsonContent | ConvertFrom-Json | |
# Step 3: Filter critical advisories | |
$criticalAdvisories = $data.advisories.PSObject.Properties | | |
ForEach-Object { $_.Value } |