Need one liner for Managing SCCM Client Site Code

Welcome Forums General PowerShell Q&A Need one liner for Managing SCCM Client Site Code

This topic contains 2 replies, has 3 voices, and was last updated by

 
Participant
3 years, 7 months ago.

  • Author
    Posts
  • #23536

    Participant
    Points: 0
    Rank: Member

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

    ++++++++++++++++++++++++++++++++++++++++++++
    $a = New-Object -ComObject Microsoft.SMS.Client
    $a.SetAssignedSite($a.AutoDiscoverSite())
    $a.ResyncPolicy()
    ++++++++++++++++++++++++++++++++++++++++++++

    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.
    Regards

    Feroze

  • #23537

    Keymaster
    Points: 2
    Rank: Member
    $a = New-Object -ComObject Microsoft.SMS.Client;$a.SetAssignedSite($a.AutoDiscoverSite());$a.ResyncPolicy()
  • #23584

    Participant
    Points: 0
    Rank: Member

    Thanks Don. Works great.

The topic ‘Need one liner for Managing SCCM Client Site Code’ is closed to new replies.