Altiris Software Dev Kit (ASDK)

 View Only
  • 1.  Altiris Agent - Trigger Software Updates (ASDK and Powershell)

    Posted Aug 22, 2018 03:47 PM

    I am trying to find out how to trigger an immediate check for Software Updates post imaging a computer. In my Environment, this check is performed once per day, and I want to expidite it. (See the "Software Updates" tab in the Altiris Agent client). This way I can get Windows Updates immediately via Altiris as soon as the agent is installed. Below is the powershell script I have so far that I am planning to trigger post installation of the Altiris Agent.

    Any idea's how I can trigger an immediate check ? 

     

    try{
    Clear-Host
    $AltirisClient = New-Object -ComObject Altiris.AeXNSClient
    $AltirisSWD = New-Object -ComObject Altiris.SWD
    # disable bandwith throttling
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Altiris\Communications" -Name "Enable Bandwidth Control" -Type DWord -value 0
    # Send basic inventory
    $SendBasicInventory_OverrideUnchanged = 1 # Sends the basic inventory even If it has not changed since the last transmission 
    $SendBasicInventory_OverrideBlocked = 1   # Sends the basic inventory even if the network connection has been blocked 
    $AltirisClient.SendBasicInventory($SendBasicInventory_OverrideUnchanged,$SendBasicInventory_OverrideBlocked)
    # Refresh client policies
    $AltirisClient.ClientPolicyMgr.Refresh() 
    # Update policies
    $UpdatePolicies_OverrideBlocked = 1
    $AltirisClient.UpdatePolicies($UpdatePolicies_OverrideBlocked)
    $AltirisSWD.UpdatePolicy()
    # Trigger Software Updates Check to get windows updates right away via Altiris
    # ?????????? ?????????? ??????????
    } catch{}

     



  • 2.  RE: Altiris Agent - Trigger Software Updates (ASDK and Powershell)

    Posted Aug 23, 2018 07:36 AM

    Are you wanting to do the same as opening the Agent, going to the "Software Updates" tab and under the left hand side section

    Tasks

    Start Software Updates Cycle

     

    It might be mentioned in the ASDK8.1.chm

    "E:\Program Files\Altiris\Altiris ASDK\Help\ASDK8.1.chm"


  • 3.  RE: Altiris Agent - Trigger Software Updates (ASDK and Powershell)

    Posted Aug 23, 2018 07:40 AM

    How can I start a Patch software update cycle from the command line?
    https://support.symantec.com/en_US/article.HOWTO4198.html

    The tool is located in

    C:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent
    AeXPatchUtil [/i] [/Xa] [/reboot] [/C]
    /Xa      Start Software Update Cycle


  • 4.  RE: Altiris Agent - Trigger Software Updates (ASDK and Powershell)
    Best Answer

    Posted Aug 28, 2018 11:33 AM

    Thanks for the answers, athough they didn't directly give me the solution I figured it out by reading related material about how Altiris Agent applys windows updates. Basically to run windows update patches via the ASDK / Powershell all you need to do is to execute the Task ID for the Windows System Assesment scan policy and it begins the scan and patches immediately.

     

    function Altiris-Agent-Task-Execute([string]$TaskGuid){
    	### Executes application task based on Guid provided
    	### You can find the Task ID for a policy by opening it in the agent and clicking details
    	try{
    		$oAltirisAgent = New-Object -ComObject Altiris.AeXNSClient
    		$objSWDAgent = $oAltirisAgent.ClientPolicyMgr.ClientAgent("Altiris.SWD")
    		$objSWDAgent.RunAdvertisement($TaskGuid, 1)
    	}catch{}
    }
    Altiris-Agent-Task-Execute '{1CFEC044-FFF0-40D4-A2FA-F312774116B4}'