Skip to content

Instantly share code, notes, and snippets.

@JonEhh42
Created November 15, 2017 20:19
Show Gist options
  • Save JonEhh42/076f850073e41a9c205acce7a2a880f8 to your computer and use it in GitHub Desktop.
Save JonEhh42/076f850073e41a9c205acce7a2a880f8 to your computer and use it in GitHub Desktop.
$mac_addresses = Get-NetAdapter | Select -Expand MacAddress
foreach ($mac in $mac_addresses) {
$mac = $mac -replace "-", ":"
$mac = $mac.ToLower()
echo $mac
}
$JSON = '
{"mac_address":"$mac",
"provision_stage":"4",
"provision_status":"Running Windows Updates"
}
'
Invoke-RestMethod -Uri "http://10.10.10.10/provision_status.php" -Method Post -Body $JSON -ContentType "application/json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment