chore: migrated to json and powershell

This commit is contained in:
2025-03-04 13:07:40 +10:00
parent bbca330631
commit 08ba97058f
23 changed files with 1328 additions and 745 deletions

25
FormatPolicies.ps1 Normal file
View File

@ -0,0 +1,25 @@
param (
[Parameter(Mandatory=$true)]
[string]$jsonfile,
[Parameter(Mandatory=$true)]
[string]$export
)
# Read the original JSON data from the file
$JsonData = Get-Content -Path $jsonfile -Raw
# Convert JSON string to a PowerShell object
$JsonObject = $JsonData | ConvertFrom-Json
# Convert back to JSON with indentation and formatting
$FormattedJson = $JsonObject | ConvertTo-Json -Depth 10
# Write the formatted JSON string to the output file
Set-Content -Path $output -Value $FormattedJson
remove-item $jsonfile -Force -Verbose
Write-Host "✅ JSON reformatted with line breaks and saved to: $export"