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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,362 questions
0 comments No comments
{count} votes

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

    0 comments No comments