The ImportRole Windows Management Instrumentation (WMI) class method, in System Center 2012 Configuration Manager, imports a role defined by an XML string to the database.

The following syntax is simplified from Managed Object Format (MOF) code and defines the method.

SInt32 ImportRole(
	 String RolesXml,
	 Boolean OverwrittenExisted, 
	 String ErrorStr,



Data type: StringQualifiers: [in]The id of the role.

Data type: BooleanQualifiers: [in]true, if an existing role should be overwritten. The default value is true.

Data type: StringQualifiers: [out]The error information if there is any error while importing the role.

Return Values

An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.


Runtime Requirements

Development Requirements

See Also