Skip to content

Commit e87427b

Browse files
committed
fix: correct double encoding
1 parent 51be234 commit e87427b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

m365/image/run_container.ps1

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,10 @@ if ("true" -ne $Env:SKIP_AUDIT_LOG) {
126126
source = "ScubaConnect"
127127
filenames = $files
128128
}
129-
$AuditJson = $Audit | ConvertTo-Json -Depth 4
130-
$AuditPath = ".\ScubaAudit_$((Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH-mm-ss')).json"
131-
$AuditJson | ConvertTo-Json -Compress -Depth 100 | Out-File -Encoding UTF8 $AuditPath
132-
133-
.\azcopy copy $AuditPath "$OutPathPrefix$AuditPath" --output-level essential --recursive
134-
Write-Output "Uploaded audit log to $OutPathPrefix$AuditPath"
129+
$AuditFile = "ScubaAudit_$((Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH-mm-ss')).json"
130+
$Audit | ConvertTo-Json -Compress -Depth 100 | Out-File -Encoding UTF8 $AuditFile
131+
.\azcopy copy $AuditFile "$OutPathPrefix$AuditFile" --output-level essential --recursive
132+
Write-Output "Uploaded audit log to $OutPathPrefix$AuditFile"
135133
}
136134

137135
Write-Output "Finished running on $($Files.Count) tenants. Encountered $ErrorCount Errors"

0 commit comments

Comments
 (0)