Enable-SBRAgent.ps1
|
function Enable-SBRAgent(){ [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [string] $ApiBaseUrl, [Parameter(Mandatory=$true)] [string] $ApiKey, [Parameter(Mandatory=$true)] [guid] $AgentUID ) Invoke-RestMethod -Uri "$ApiBaseUrl/api/SBRAgents/$($AgentUID)/Activate" ` -Method Post ` -Headers @{"Authorization" = "Bearer " + $ApiKey } } |