Skip to content

Commit

Permalink
Update Out-PolicyDefinition.ps1 (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregslack78 authored May 8, 2024
1 parent f23b32c commit 479a68e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Scripts/Helpers/Out-PolicyDefinition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ function Out-PolicyDefinition {
if ($Definition.properties.policyDefinitions) {
$outDefinition.'$schema' = "https://raw.githubusercontent.com/Azure/enterprise-azure-policy-as-code/main/Schemas/policy-set-definition-schema.json"
}
$Definition.psobject.Properties.ForEach{ ($outDefinition).psobject.Properties.Add($_, $true) }
foreach ($key in $Definition.SyncRoot.Keys) {
$outDefinition[$key] = $Definition.SyncRoot[$key]
}
$json = ConvertTo-Json $outDefinition -Depth 100
$null = New-Item $fullPath -Force -ItemType File -Value $json
}

0 comments on commit 479a68e

Please sign in to comment.