<div class="content" name="RefreshRemoteSessionWeights" uuid="ae9e126f-8d31-4278-b4ae-7824cc7187e0"><p>The RefreshRemoteSessionWeights method forces reallocation
of CPU quotas for the sessions run by users according to the category type
specified in <i>bstrTargetUserSessions</i>.</p><dl>
<dd>
<div><pre> [id(3), helpstring(&#34;method RefreshRemoteSessionWeights&#34;)] HRESULT RefreshRemoteSessionWeights(
   [in] BSTR bstrTaregetUserSessions,
   [in] BOOL bUpdateAll
 );
</pre></div>
</dd></dl><p><b>bstrTargetUserSessions: </b>A string that
specifies a list of user categories, in the format of a <a href="8dffd3a5-d731-459b-81de-7a33287a4901" data-linktype="relative-path">ConfigurationFiles</a> element
(section 2.2.5.13).</p><p><b>bUpdateAll: </b>A Boolean value that specifies
whether to recursively delete all instances of the specified machine group.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>FALSE 0x00000000</td>
  <td>Only the CPU quotas for users specified in bstrTargetUserSessions are reallocated according to their category type.</td>
 </tr><tr>
  <td>TRUE 0x00000001</td>
  <td>The CPU quotas for all remote sessions are reallocated according to the category type specified in bstrTargetUserSessions.</td>
 </tr></tbody></table>
</dd></dl><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>0xC1FF0070 WRM_ERR_TAGS_NOT_IN_ORDER</td>
  <td>The XML data is invalid or cannot be processed.</td>
 </tr><tr>
  <td>0xC1FF006F WRM_ERR_ID_VALUE</td>
  <td>The specified name contains characters that are invalid. The name cannot start with a hyphen (-), cannot contain spaces, and cannot contain any of the following characters: \   / ? * | : &lt; &gt; &#34; , ;</td>
 </tr><tr>
  <td>0x00000000 S_OK</td>
  <td>Operation successful.</td>
 </tr></tbody></table>
</dd></dl><p>Additional <a href="e92c2589-b1ae-4bee-980a-b1f96710b4e7" data-linktype="relative-path">IWRMRemoteSessionMgmt</a>
interface methods are specified in section 3.2.4.9.</p></div>