Share via

Administration Service call WMI method

James 1 Reputation point
2022-05-19T13:41:17.3+00:00

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 for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Daniel Bergstedt 1 Reputation point
    2022-11-24T12:08:35.18+00:00

    Hi,

    I have the same question so ill bump this one.
    Have you found any solution to this?

    BR
    Daniel

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.