Patch Management Solution

 View Only
  • 1.  Altiris Agent Current Site Server

    Posted Dec 19, 2014 05:13 PM

    Hi,

    I am looking for a way to programatically find out the following:

     

    1. An easy way to programatically get the closest Site Server ..

    • I am guessing there is a registry key but I am unable to find it in HKLM\Software\Altiris
    • My best guess is in HKLM\Software\Altiris\Communications\Servers but there are multiple serers there.. I am not sure how to programatically get it from there.

     

    2. Programatically Scan for the closest site server

    Since the above method may be stale, I am looking for an easy way to find the closest Site Server. There use to be an ASP page we could hit off the NS to get this info in 6.9 days, but I am using 7.5 so that is out as far as I know. I tried digging and the best I found is GetPackageInfo.aspx, but that doesn't seem to do the trick.Is there some C# or VB api I can call or a webservice I can hit to find this out?



  • 2.  RE: Altiris Agent Current Site Server

    Broadcom Partner
    Posted Dec 20, 2014 11:22 AM

    Hi DaveSmith 3,

    You are right in 7.5 getpackageinfo.aspx is not working any more...

    You have 3 options:

    1) If your Site Server has the Role of Task and Package Server than you can make use of the Task Server Token. Add a new token (if it does not exist...) and use the query below..

     

    select c.name from TaskTargetDeviceCache vc left outer join Inv_Client_Task_Resources ctr on ctr._ResourceGuid = vc.Guid And vc.Guid = '%COMPUTERID%' left outer join Inv_Client_Task_Servers cts on cts.ClientTaskServerGuid = ctr.ClientTaskServerGuid Join vcomputer c on cts._ResourceGuid = c.guid

    2) If your Site Server is not a Task Server then you can try to use this URL:https://SMP_SERVER_Name/Altiris/Deployment/Agent/GetNearestPackageServerInfo.aspx and create a vbs Script or Powershell Script to use it the same way as the GetPackageInfo.aspx.

    3) If your Site Server is a Package Server and also a PXE Server you can make use of the Environment Variable %ALTIRIS_PXE_SERVER% or %ALTIRIS_PXE_IP% but this only works if your Client is booted into WINPE -  if you are not booted into WINPE you have to use the first or second option described above.

    The first and second Option should work in WINPE and also in Production! The third Option only works in WINPE (and your Site Server also has to be a PXE / [NBS-Server])!

    Hope this helps

    Network23