Need one liner for Managing SCCM Client Site Code

This topic contains 2 replies, has 3 voices, and was last updated by  Mohammed Feroze Khan 3 years, 3 months ago.

  • Author
  • #23536

    feroze khan

    Could someone plz guide me to create a one liner PS Command for the following 3 commands?

    $a = New-Object -ComObject Microsoft.SMS.Client

    The reason why I am looking for a one liner is because I want to avoid creating / updating a OSD package for the script.

    Thanks in advance.


  • #23537

    Don Jones
    $a = New-Object -ComObject Microsoft.SMS.Client;$a.SetAssignedSite($a.AutoDiscoverSite());$a.ResyncPolicy()
  • #23584

    Thanks Don. Works great.

You must be logged in to reply to this topic.