Created
September 15, 2015 06:57
-
-
Save WilliamBerryiii/9a35f1ff85620012475f to your computer and use it in GitHub Desktop.
Filter a list of Scriptrock nodes and update their connection manager.
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
$nodes | | |
where { $_.operating_system_family_id -eq 1 } | | |
Foreach { | |
$resource = "/api/v1/nodes/$_.id" | |
$uri = $target + $resource | |
Invoke-RestMethod -Method put -Uri $uri -Headers $headers -Body '{"node": {"connection_manager_group_id": 6}}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment