Skip to content

Commit

Permalink
Merge pull request #122 from Skwie/RetryCommand-chenge-arguments
Browse files Browse the repository at this point in the history
Change argument format
  • Loading branch information
Skwie authored Dec 17, 2024
2 parents 27d1061 + a08b6ee commit a183814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WAFAzCli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function New-RetryCommand
$Error.Clear()

if (!$azsession) {
$azsession = New-RetryCommand -command {az login} -arguments @{}
$azsession = New-RetryCommand -command "az login" -arguments @{}
}
if (!$azsession) {
Write-Output "Unable to authenticate with Azure. Script execution canceled."
Expand Down Expand Up @@ -201,7 +201,7 @@ foreach ($sub in $AllSubscriptions) {
Write-Output "Checking Storage Accounts for subscription $($sub.name)..."

$uri = "https://management.azure.com/subscriptions/$($sub.id)/providers/Microsoft.Storage/storageAccounts?api-version=2023-05-01"
$StorageAccounts = ((New-RetryCommand -command "Invoke-Webrequest" -arguments @{ "-uri" = $uri; "-headers" = $headers; "-method" = "Get" }).Content | ConvertFrom-Json -Depth 10).value
$StorageAccounts = ((New-RetryCommand -command "Invoke-Webrequest" -arguments @{ uri = $uri; headers = $headers; method = "Get" }).Content | ConvertFrom-Json -Depth 10).value

# Define the checks to be done as well as their related pillars and weight
$StorageControls = @(
Expand Down

0 comments on commit a183814

Please sign in to comment.