<div class="content"><p>The ImportXml method imports objects into the configuration.</p><dl>
<dd>
<div><pre> [id(3), helpstring(&#34;method ImportXml&#34;)] HRESULT ImportXml(
   [in] BSTR bstrPMCXml,
   [in] BSTR bstrPolicyXml,
   [in] BSTR bstrCalendarXml,
   [in] BSTR bstrConditionalXml,
   [in] BSTR bstrMachineGroupXml,
   [in] BSTR bstrConfigurationXmls,
   [in] IMPORT_TYPE enumImportType
 );
</pre></div>
</dd></dl><p><b>bstrPMCXml: </b>A string that specifies <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_65daee12-445f-41c0-8456-f728063bef24" data-linktype="relative-path">process matching criteria (PMC)</a>,
in the form of a <a href="361984a5-60a9-4e17-99ce-95c4a1e898c3" data-linktype="relative-path">ProcessMatchingCriteriaCollection</a>
element (section 2.2.5.25). For an example, see <a href="702d097a-9c16-4a63-8254-89e349a182d4" data-linktype="relative-path">ProcessMatchingCriteriaCollection</a>
example (section 4.2.21).</p><p><b>bstrPolicyXml: </b>A string that specifies a <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_559b0a4d-161b-4664-9c10-4fab98b97f1f" data-linktype="relative-path">resource policy</a>, in the
form of a <a href="1c010046-ccb3-41cb-8490-b181b715b16b" data-linktype="relative-path">PolicyCollection
element (section 2.2.5.22)</a>.</p><p><b>bstrCalendarXml: </b>A string that specifies a
calendar, in the form of a <a href="04f7e237-6892-4d93-8867-de7b62aef6e0" data-linktype="relative-path">CalendarsCollection</a>
element (section 2.2.5.11). For an example, see <a href="d0f9f144-01b1-4f21-b179-f51df713b0ca" data-linktype="relative-path">CalendarsCollection</a>
example (section 4.2.8).<a id="Appendix_A_Target_37"></a><a aria-label="Product behavior note 37" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_37" data-linktype="relative-path">&lt;37&gt;</a></p><p><b>bstrConditionalXml: </b>A string that specifies a
conditional policy, in the form of a <a href="f00d308a-d050-4368-a663-b740f11087e5" data-linktype="relative-path">ConditionalPolicy</a> element
(section 2.2.5.12).</p><p><b>bstrMachineGroupXml: </b>A string that specifies a
<a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_f4153c8c-848d-4db5-b9cc-4113e5f1e406" data-linktype="relative-path">machine group</a>, in the
form of a <a href="d137388f-8b86-4a30-8848-7ffb6029f276" data-linktype="relative-path">MachineGroup</a>
element (section 2.2.5.17).</p><p><b>bstrConfigurationXmls: </b>A string that specifies
a configuration to be loaded by the WSRM server, in the form of a <a href="8dffd3a5-d731-459b-81de-7a33287a4901" data-linktype="relative-path">ConfigurationFiles</a> element
(section 2.2.5.13).</p><p><b>enumImportType: </b>An <a href="943385f5-05b5-46b1-ac63-72792a943675" data-linktype="relative-path">IMPORT_TYPE</a> enumeration
value (section <a href="58277ad9-f953-4a97-a5f1-2fc927f24ea1" data-linktype="relative-path">2.2.3.6</a>)
that specifies the mode in which to handle <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_a4814539-33e8-4599-a479-3f211a7b032f" data-linktype="relative-path">conflicting objects</a>.</p><p><b>Return Values: </b>This method returns 0x00000000
for success or a negative <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a>
value (in the following table or in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/705fb797-2175-4a90-b5a3-3918024b10b8" data-linktype="relative-path">2.1.1</a>)
if an error occurs.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>Operation successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>One or more arguments are invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0272</p>
  <p>WRM_ERR_CAL_SCHEDULE_IN_USE</p>
  </td>
  <td>
  <p>An existing schedule with the same name as the one in
  the supplied CalendarsCollection is currently in use with an existing
  calendar. The complete import process is canceled.<a id="Appendix_A_Target_38"></a><a aria-label="Product behavior note 38" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_38" data-linktype="relative-path">&lt;38&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0070</p>
  <p>WRM_ERR_TAGS_NOT_IN_ORDER</p>
  </td>
  <td>
  <p>The <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_982b7f8e-d516-4fd5-8d5e-1a836081ed85" data-linktype="relative-path">XML</a>
  data that is maintained by the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1517eb9b-d2b2-48f0-bf23-bde76923ed30" data-linktype="relative-path">management service</a> is
  invalid or cannot be processed.<a id="Appendix_A_Target_39"></a><a aria-label="Product behavior note 39" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_39" data-linktype="relative-path">&lt;39&gt;</a></p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Additional <a href="255d6a15-9358-41e6-9e70-e8bb09847dc8" data-linktype="relative-path">IResourceManager2</a>
interface methods are specified in section 3.2.4.2.</p></div>