Add Powershell Test Script
parent
942f79a1db
commit
e7c1b054ca
1 changed files with 14 additions and 0 deletions
14
Powershell-Test-Script.md
Normal file
14
Powershell-Test-Script.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
```powershell
|
||||
|
||||
$hostname = $env:COMPUTERNAME
|
||||
$status = "OK"
|
||||
$body = "$hostname,$status"
|
||||
|
||||
$headers = @{
|
||||
"Authorization" = "Bearer 1234-1234-1234"
|
||||
}
|
||||
|
||||
$domain = "http://example.com/api/test1/"
|
||||
|
||||
Invoke-RestMethod -Uri $domain -Method Post -Body $body -Headers $headers
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue