Created
November 15, 2017 20:19
-
-
Save JonEhh42/076f850073e41a9c205acce7a2a880f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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