SMP - ASDK - Web Service - Update Resource Target

Published on Wednesday, 12 October 2016

I raised an Idea on connect - SMP - ASDK - Web Service - InvalidateTargetMembership asking for a way to programatically update a Target in an efficient way.

There are a number of ways to do this either via SQL or using NScript but none are great.

exec spResourceTargetDeltaUpdate @resourceTargetGuid='target guid goes here', @flush=1

If you search the forums for spResourceTargetDeltaUpdate there are a number of times it's mentioned.

In SMP 8.0 HF4 there were 4 new Web Services added to the Resource Model

URL: http://localhost/altiris/nswebservice/resourcemodel.asmx

Methods:

  • UpdateResourceTargetMembership

    • targetGuid (guid)
    • fullUpdate (bool)
    • updateDependencies (bool)
  • UpdateResourceTargets

    • targetGuids (string)
    • fullUpdate (bool)
    • updateDependencies (bool)
  • UpdateResourceTargetsAsync

    • targetGuids (string)
    • fullUpdate (bool)
    • updateDependencies (bool)
    • urgent (bool)
  • UpdateResourceTargetsMembership

    • targetGuid (guids [])
    • fullUpdate (bool)
    • updateDependencies (bool)

An update was posted on the Idea from @Vladimir

With several months passed since last update here, I can now officially confirm that new ASDK method: ScopingManagementLib.InvalidateTargetMembership(Guid targetGuid, bool invalidateDependencies) added recently and will be available starting 8.1 release.

So take a look at the new method in 8.1

  • InvalidateTargetMembership
    • targetGuid (Guid )
    • invalidateDependencies (bool)