Skip to content

Commit

Permalink
Update Add-AssetsToLearning.ps1
Browse files Browse the repository at this point in the history
fixed body variable and spelling issue, also added convertTo-json
  • Loading branch information
kenrward authored Nov 4, 2024
1 parent ddaea00 commit 0164323
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Segment/Asset Management/Add-AssetsToLearning.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $file = "PATH_TO_FILE.txt"
$adDomain = "YOUR_DOMAIN.com"
# how many days you want to learn.
$daysToLearn = 30
#mainanance window id.
#maintenance window id.
$maintenanceWindowId = "e:m:xxxxxxx"

# check for zero networks powershell module
Expand Down Expand Up @@ -42,4 +42,4 @@ $body = @{
"enforceBlocks" = $false
"maintenanceWindowId" = $maintenanceWindowId
}
Invoke-RestMethod -uri "https://portal.zeronetworks.com/api/v1/assets/actions/queue" -method POST -Headers $znHeaders -Body @body
Invoke-RestMethod -Uri "https://portal.zeronetworks.com/api/v1/assets/actions/queue" -Method POST -Headers $znHeaders -Body ($body | ConvertTo-Json)

0 comments on commit 0164323

Please sign in to comment.