In Microsoft System Center Configuration Manager 2007, you read an embedded property list from a site control file resource by getting the SMS_EmbeddedPropertyList object for the embedded object from the resources PropLists property array.

An embedded property list has the following properties that you can set. For more information, see SMS_EmbeddedPropertyList.

Value Description


The embedded property name.


An array of string values. Each array item represents a single property list item.

Making changes to the site control file can cause irreparable damage to your Configuration Manager 2007 site.

To read a site control file embedded property list

  1. Set up a connection to the SMS Provider. For more information, see About the SMS Provider in Configuration Manager.

  2. Using the connection object from step one, get a site control file resource. For more information, see About the Configuration Manager Site Control File.

  3. Get the SMS_EmbeddedPropertyList for the required embedded property list.

  4. Access the property list values by using the SMS_EmbeddedPropertyList object Values property array.


The following example method populates the supplied values parameter with the Values array of the embedded property list (SMS_EmbeddedPropertyList) identified by the propertyListName parameter. true is returned if the embedded property list is found; otherwise, false is returned.

You can update the embedded property list values that are returned from this method by using the method in How to Write a Configuration Manager Site Control File Embedded Property List.

To view code that calls these functions, see How to Read and Write to the Configuration Manager Site Control File by Using Managed Code or see How to Read and Write to the Configuration Manager Site Control File by Using WMI.

For information about calling the sample code, see Calling Configuration Manager Code Snippets.

Visual Basic Script  Copy Code
Function GetScfEmbeddedPropertyList(resource,  _
		propertyListName, 		 _
		ByRef values)

	Dim scfPropertyList

	If IsNull(resource.PropLists) = True Then
		GetScfPropertyList = False
		Exit Function
	End If

	For each scfPropertyList in resource.PropLists
	 if   scfPropertyList.PropertyListName = propertyListName Then
			' Found property list, so return the values array.
			values = scfPropertyList.Values
			GetScfEmbeddedPropertyList = True
			Exit Function
		End If
	 ' Did not find the property list.
	 GetScfEmbeddedPropertyList = False
End Function
C#  Copy Code
public bool GetScfEmbeddedPropertyList(
	IResultObject resource,
	string propertyListName,
	out ArrayList values)
	values = new ArrayList();
		if (resource.EmbeddedPropertyLists.ContainsKey(propertyListName))
			return true;
	catch(SmsException e)
		Console.WriteLine("Couldn't get the embedded property list: " + e.Message);
	return false;


The sample method has the following parameters:





  • Managed: IResultObject

  • VBScript: SWbemObject

The site control file resource that contains the embedded property.


  • Managed: String

  • VBScript: String

The embedded property list to be read.


  • Managed: String array

  • VBScript: String array

The SMS_EmbeddedProperty class Values property. An array of string values.

Compiling the Code

The C# example has the following compilation requirements:











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.