IUpdateServerConfiguration.Save Method ()
Applies To: Windows Server Update Services
Saves WSUS configuration information to the database.
Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)
Syntax
void Save()
void Save()
abstract Save : unit -> unit
Sub Save
Exceptions
Exception
Condition
Thrown for any of the following reasons:
If UseProxy is true, ProxyName cannot be empty and ProxyServerPort must be valid
If UseProxyis true and AnonymousProxyAccess is false, ProxyUserName cannot be empty
If SyncFromMicrosoftUpdate is false, UpstreamWsusServerName cannot be empty
If HostBinariesOnMicrosoftUpdate is true, AllUpdateLanguagesEnabled must be true
If HostBinariesOnMicrosoftUpdate is false and AllUpdateLanguagesEnabled is false, you must use SetEnabledUpdateLanguages to enable at least one language
Thrown for any of the following reasons:
WSUS is currently synchronizing updates
WSUS is currently processing a previous configuration save request
If IsReplicaServer is true, SyncFromMicrosoftUpdate cannot be true
Remarks
When you call GetConfiguration, you will receive a copy of the configuration information that is currently saved in the WSUS database. Changes that you make to the configuration information are made only to your local copy. To make your changes visible to other application and to the WSUS server, call Save.WSUS contains configuration information from the last application to save changes.
Changes to some configuration settings can cause WSUS to start a background process, which can prevent other processes from saving configuration settings (the process can run for up to three minutes). If you call Save while the background process is running, WSUS throws the InvalidOperationException exception. You can implement retry logic to handle this exception or call GetUpdateServerConfigurationState before calling Save to determine if you can save configuration settings.
This operation requires WSUS Administrator privileges.
See Also
Save Overload
IUpdateServerConfiguration Interface
Microsoft.UpdateServices.Administration Namespace
Return to top