Compartilhar via


2.2.4.42 WinrsType

WinrsType is the overall container for the Remote Shell server configuration. It uses the following schema. The schema MUST be as shown here.

 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns="http://schemas.microsoft.com/wbem/wsman/1/config/winrs"  
    targetNamespace="http://schemas.microsoft.com/wbem/wsman/1/config"
    attributeFormDefault="unqualified">
     <xs:complexType name="WinrsType">
         <xs:annotation>
             <xs:documentation>This schema defines winrs configuration 
             settings </xs:documentation>
         </xs:annotation>
         <xs:sequence>
             <xs:element name="AllowRemoteShellAccess" type="xs:boolean" 
              default="True"/>
             <xs:element name="IdleTimeout" type="xs:unsignedLong" 
              default="180000"/>
             <xs:element name="MaxConcurrentUsers" type="xs:unsignedShort" 
              default="10"/>
             <xs:element name="MaxShellRunTime" type="xs:unsignedLong" 
              default="28800000"/>
             <xs:element name="MaxProcessesPerShell" type="xs:unsignedLong" default="25"/>
             <xs:element name="MaxMemoryPerShellMB" type="xs:unsignedLong" default="1024"/>
             <xs:element name="MaxShellsPerUser" type="xs:unsignedLong" default="30"/>
         </xs:sequence>
     </xs:complexType>
 </xs:schema>
  

Elements

AllowRemoteShellAccess:  Configures access to Remote Shells. If set to False, new Remote Shell connections MUST be rejected by the server, which MUST reply with a wsman:InternalError fault. The default value is True.

MaxConcurrentUsers:  Configures the maximum number of users concurrently performing remote operations on the same system by using remote CMD Shell. The minimum value MUST be 1. The maximum value MUST be 100. The new Shell connections MUST be rejected if they exceed the specified limit, meaning the server MUST reply with an error response. The default value SHOULD be 10.<26>

IdleTimeout: Configures the maximum time, in milliseconds, that the Remote Shell will stay open without any user activity until it is automatically deleted. The time interval is measured beginning from the time that the service receives a request targeted at a Remote Shell or a wst:Create request to create a new Remote Shell, to the time that the service receives another request targeted at that Remote Shell. Any value from 0 to 0x7FFFFFFF MUST be allowed. <27><28> This configuration setting is used by the Shell Idle Timeout timer, as specified in section 3.1.5.3.

MaxShellRunTime: Configures the maximum time, in milliseconds, that the remote command or script will be allowed to execute. The maximum allowed value MUST be 0x7FFFFFFF; the server MAY<29> allow lower values, but MUST NOT allow a value less than 0. If a request attempts to set this to a value that is less than the minimum allowed value, the server SHOULD return a wsman:SchemaValidationError fault. A value of 0 MUST indicate an infinite time-out. The server MAY<30> terminate the command in progress if it takes longer than the specified amount of time. The default value is 28800000, which corresponds to eight hours.

MaxProcessesPerShell:  Configures the maximum cumulative number of processes that any Shell operations being executed within the same process are allowed to launch. Any number from 0 to 0x7FFFFFFF can be set, where 0 means an unlimited number of processes. The default value SHOULD be 25.<31> If the remote operation attempts to launch a new process and the process count exceeds the specified limit, the operation SHOULD return a wsman:InternalError fault and any future operations on that shell SHOULD return a wsman:InternalError fault until the process count decreases.<32>

MaxMemoryPerShellMB: Configures the maximum total amount of memory that can be allocated cumulatively by any active Remote Shells being executed within the same process and all their child processes. Any value from 0 to 0x7FFFFFFF can be set, where 0 means unlimited memory; that is, the ability of the remote operations to allocate memory is limited only by the available virtual memory. The remote operation MUST be terminated when a new allocation exceeds the specified quota. The default value SHOULD be 1024.<33>

MaxShellsPerUser:  Configures the maximum number of concurrent shells that any user can remotely open on the same system. Any number from 0 to 0x7FFFFFFF can be set, where 0 means an unlimited number of shells. If this policy setting is enabled, the user will not be able to open new Remote Shells if the count exceeds the specified limit. If this policy setting is disabled or is not configured, by default, the limit SHOULD be 30.<34>