none
WUA Api get updates from WSUS server

    Question

  • Hi

    I have a question. Is is possible to make WU get update from a WSUS server other than ssManagedServer option?
    ssManagedServer option requires setting up client computers with GPO and all.

    What i want to achieve is to use 'ssOthers' option and let client specify the server url. But from documentation the server url
    is get only property ... is there a work around for that?

    Thanks,
    umibau

    Monday, May 06, 2013 1:19 PM

Answers

  • is there a work around for that?

    No. There are two options.

    UseWUServer is undefined or set to FALSE -- the WUAgent gets updates from WU/MU.

    UseWUServer is set to TRUE -- the WUAgent gets updates from the URL defined in WUServer.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, May 06, 2013 3:55 PM
  • can we set a temporary wsus url for one session only using the api, with out changing the registry or the computers wsus settings?

    No. A client can only have one WU/WSUS target .. either it's an AU client (UseWUServer=FALSE) or it's a WSUS client (UseWUServer=TRUE) and the WSUS server is defined in WUServer. These configuration values are read at service startup, and the only way to force a configuration change is to [a] restart the service, or [b] impose a configuration change via policy.

    There is an API call to temporarily override the UseWUServer value and force the WUAgent to scan from WU/MU -- this is used in the WUApp -- but not to change the target to an alternate WSUS server.

    Changing the registry value and restarting the service is the only way to target an alternate WSUS server:

    1. Set WUServer and WUStatusServer to the new target.
    2. Restart the WUAUServ on the client.
    3. Use the alternate target.
    4. Reset WUServer and WUStatusServer to the original target.
    5. Restart the WUAUServ on the client.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, May 27, 2013 5:50 PM

All replies

  • is there a work around for that?

    No. There are two options.

    UseWUServer is undefined or set to FALSE -- the WUAgent gets updates from WU/MU.

    UseWUServer is set to TRUE -- the WUAgent gets updates from the URL defined in WUServer.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, May 06, 2013 3:55 PM
  • Thanks Lawrence for reply it made things clear to me.

    What i wanted to know is, can we set a temporary wsus url for one session only using the api, with out changing the registry or the computers wsus settings?

    Regards

    Tuesday, May 07, 2013 7:46 AM
  • can we set a temporary wsus url for one session only using the api, with out changing the registry or the computers wsus settings?

    No. A client can only have one WU/WSUS target .. either it's an AU client (UseWUServer=FALSE) or it's a WSUS client (UseWUServer=TRUE) and the WSUS server is defined in WUServer. These configuration values are read at service startup, and the only way to force a configuration change is to [a] restart the service, or [b] impose a configuration change via policy.

    There is an API call to temporarily override the UseWUServer value and force the WUAgent to scan from WU/MU -- this is used in the WUApp -- but not to change the target to an alternate WSUS server.

    Changing the registry value and restarting the service is the only way to target an alternate WSUS server:

    1. Set WUServer and WUStatusServer to the new target.
    2. Restart the WUAUServ on the client.
    3. Use the alternate target.
    4. Reset WUServer and WUStatusServer to the original target.
    5. Restart the WUAUServ on the client.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Monday, May 27, 2013 5:50 PM
  • @Lawrence,

    Where is this documented in the API reference? Also, do you have any sample code to support this statement?

    There is an API call to temporarily override the UseWUServer value and force the WUAgent to scan from WU/MU -- this is used in the WUApp -- but not to change the target to an alternate WSUS server.

    Jeffrey S. Patton Jeffrey S. Patton Systems Specialist, Enterprise Systems University of Kansas 1001 Sunnyside Ave. Lawrence, KS. 66045 (785) 864-0242 | http://patton-tech.com

    Monday, August 26, 2013 7:22 PM
  • Where is this documented in the API reference?

    I had no idea where it was documented... (in the WUAgent API, of course)

    but a 10 minute search found the ServerSelection enumeration:

    typedef enum  {
      ssDefault       = 0,
      ssManagedServer = 1,
      ssWindowsUpdate = 2,
      ssOthers        = 3
    } ServerSelection;

    Even without the documentation, the behavior is self-evident. Look at the WUApp on a WSUS client and observe the link "Check online for updates from Microsoft Update". Click on it and observe the log entries in the WindowsUpdate.log.

    We also use the API call in SolarWinds Patch Manager to do the same thing -- force the WUAgent of a WSUS client to scan WU/MU instead of the WSUS server.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    Saturday, August 31, 2013 3:38 PM
  • You know, I saw that...and for whatever reason assumed that it wasn't settable, or something. I'll test this out when I get in to work next week.

    Thanks!


    Jeffrey S. Patton Jeffrey S. Patton Systems Specialist, Enterprise Systems University of Kansas 1001 Sunnyside Ave. Lawrence, KS. 66045 (785) 864-0242 | http://patton-tech.com

    Saturday, August 31, 2013 10:07 PM
  • Where is this documented in the API reference?

    I had no idea where it was documented... (in the WUAgent API, of course)

    but a 10 minute search found the ServerSelection enumeration:

    typedef enum  {
      ssDefault       = 0,
      ssManagedServer = 1,
      ssWindowsUpdate = 2,
      ssOthers        = 3
    } ServerSelection;

    Even without the documentation, the behavior is self-evident. Look at the WUApp on a WSUS client and observe the link "Check online for updates from Microsoft Update". Click on it and observe the log entries in the WindowsUpdate.log.

    We also use the API call in SolarWinds Patch Manager to do the same thing -- force the WUAgent of a WSUS client to scan WU/MU instead of the WSUS server.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    So I've updated the code I was working on and that totally worked, I'm not really sure why I thought that property was only get-able. Thanks a lot!

    Jeffrey S. Patton Jeffrey S. Patton Systems Specialist, Enterprise Systems University of Kansas 1001 Sunnyside Ave. Lawrence, KS. 66045 (785) 864-0242 | http://patton-tech.com

    Tuesday, September 03, 2013 2:30 PM