question

JimS-6455 avatar image
0 Votes"
JimS-6455 asked

Administration Service call WMI method

Hi,

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?

Thanks

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers