Created
June 10, 2025 02:25
-
-
Save joeywas/47c5aab385a74fc1aa6714f3853ade2b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $SWURI = 'https://solarwinds.internal.domain:17778/Solarwinds/InformationService/v3/Json' | |
| $Payload = "@{'query' = 'SELECT TOP 10 NodeID from Orion.Nodes'}" | |
| $Credential = Get-Credential | |
| $splat = @{ | |
| Uri = $SWURI | |
| Method = 'POST' | |
| contenttype = 'application/json' | |
| Body = $Payload | |
| Credential = $Credential | |
| SkipCertificateCheck = $true | |
| ErrorAction = 'Stop' | |
| } | |
| # Do something, hopefully store something in the results | |
| $Results = Invoke-RestMethod @splat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment