In Microsoft System Center Configuration Manager 2007, you view the client agent settings on a Configuration Manager client by using the resource manager (UIResourceMgrClass) object GetClientAgentSettings to get a ClientAgentSettings object.

To view the Configuration Manager client agent settings

  1. Get the Configuration Manager client resource manager object (UIResourceMgrClass).

  2. From the UIResourceMgrClass object, call GetClientAgentSettings to get a Programs collection of available programs.

  3. Display the ClientAgentSettings properties.


The following example method displays a list of client agent property values.

For information about calling the sample code, see How to Call Configuration Manager COM Automation Objects.

Visual Basic Script  Copy Code
Sub ClientAgentSettings

	' On Error Resume Next.

	Dim oUIResManager 
	Dim oAgentSettings

	Set oUIResManager = createobject("UIResource.UIResourceMgr")

	If oUIResManager Is Nothing Then
		Wscript.Echo "Couldn't create Resource Manager - quitting"
		Exit Sub
	End If

	Set oAgentSettings=oUIResManager.GetClientAgentSettings()

	If oAgentSettings Is Nothing Then
		Set oUIResManager=Nothing
		Wscript.Echo "Couldn't get software distribution information - quitting"
		Exit Sub
	End If
	' Display client agent settings.
	WScript.Echo "Day reminder interval: " & _
		 FormatNumber(oAgentSettings.DayReminderInterval/60,0) + " minutes"

	WScript.StdOut.Write "Display new program notification: " 

	If oAgentSettings.DisplayNewProgramNotification = 0 Then
		WScript.Echo "False"
		WScript.Echo "True"
	End If
	WScript.Echo "Hour reminder interval: " & _
	FormatNumber(oAgentSettings.HourReminderInterval/60,0) & " minutes"
	WScript.Echo "Reminder interval: " + _
	FormatNumber(oAgentSettings.ReminderInterval/60,0) + " minutes"
	WScript.Echo "Branding title: " + oAgentSettings.BrandingTitle
	WScript.Echo "Software updates branding title: " + oAgentSettings.SUMBrandingSubtitle
	WScript.Echo "Operating system deployment branding title " + oAgentSettings.OSDBrandingSubtitle
	WScript.Echo "Software distribution branding title: " + oAgentSettings.SWDBrandingSubtitle

	Set oAgentSettings=Nothing 
	Set oUIResManager=Nothing

End Sub
C#  Copy Code
public void ClientAgentSettings()
			// Get client agent settings.
			UIResourceMgrClass uiResMgr = new UIRESOURCELib.UIResourceMgrClass();
			ClientAgentSettings agentSettings = uiResMgr.GetClientAgentSettings();

			// Display settings.
			Console.WriteLine("Day reminder interval: " + 
				(agentSettings.DayReminderInterval/60).ToString() + " minutes");

			Console.Write("Display new program notification: ");
			if (agentSettings.DisplayNewProgramNotification == 0)
			Console.WriteLine("Hour reminder interval:" + 
				(agentSettings.HourReminderInterval/60).ToString() + " minutes");
			Console.WriteLine("Reminder interval: " + 
				(agentSettings.ReminderInterval/60).ToString() + " minutes");
			Console.WriteLine("Branding title" + agentSettings.BrandingTitle);
			Console.WriteLine("Software updates branding title: " + agentSettings.SUMBrandingSubtitle);
			Console.WriteLine("Operating system deployment branding title " + agentSettings.OSDBrandingSubtitle);
			Console.WriteLine("Software distribution branding title: " + agentSettings.SWDBrandingSubtitle);
	catch (COMException e)
		Console.WriteLine("Error performing actions: " + e.Message);

The example method has no parameters.

Compiling the Code

This C# example requires:







COM Reference

UIResource 1.0 Type Library

Robust Programming

For more information about error handling, see About Configuration Manager Errors.


For more information about securing Configuration Manager applications, see About Securing Configuration Manager Applications.

See Also

Send comments about this topic to Microsoft.