I am looking to use the administration service and PowerShell to add a boundary to a boundary group in config manager.
I know I could use the PowerShell cmdlets to do this, but I am experimenting with the admin service and would be good to know how to call a method of a class.
Say I have these 2 variables:
$Boundary = "16777220"
$BoundaryGroup = "16778219"
And I want to add the $Boundary to the $BoundaryGroup.
I can get the info for the boundary by:
Invoke-RestMethod -Method Get -Uri "https://<SiteServer>/AdminService/wmi/SMS_Boundary($Boundary)" -UseDefaultCredentials
And I can get the info for the Boundary Group by:
Invoke-RestMethod -Method Get -Uri "https://<SiteServer>/AdminService/wmi/SMS_BoundaryGroup($BoundaryGroup)" -UseDefaultCredentials
How do I call the method AddBoundary of the SMS_BoundaryGroup class to add the boundary?