4.2.2 Modifying Configuration
To modify the configuration, a Put request is used. In this example, cfg:MaxBatchItems is changed from 20 to 10.
Put Request
-
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:waa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"> <s:Header> <wsa:To>http://localhost:80/wsman</wsa:To> <wsman:ResourceURI s:mustUnderstand="true"> http://schemas.microsoft.com/wbem/wsman/1/config </wsman:ResourceURI> <wsa:ReplyTo> <wsa:Address s:mustUnderstand="true"> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous </wsa:Address> </wsa:ReplyTo> <wsa:Action s:mustUnderstand="true"> http://schemas.xmlsoap.org/ws/2004/09/transfer/Put </wsa:Action> <wsman:MaxEnvelopeSize s:mustUnderstand="true"> 51200 </wsman:MaxEnvelopeSize> <wsa:MessageID> uuid:47F4F498-0050-4DCF-BCA1-5611732CF7DE </wsa:MessageID> <wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout> </s:Header> <s:Body> <cfg:Config xmlns:cfg="http://schemas.microsoft.com/wbem/wsman/1/config"> <cfg:MaxEnvelopeSizekb>50</cfg:MaxEnvelopeSizekb> <cfg:MaxTimeoutms>60000</cfg:MaxTimeoutms> <cfg:MaxBatchItems>10</cfg:MaxBatchItems> <cfg:MaxProviderRequests>25</cfg:MaxProviderRequests> <cfg:Client> <cfg:NetworkDelayms>5000</cfg:NetworkDelayms> <cfg:URLPrefix>wsman</cfg:URLPrefix> <cfg:AllowUnencrypted>false</cfg:AllowUnencrypted> <cfg:Auth> <cfg:Basic>false</cfg:Basic> <cfg:Digest>true</cfg:Digest> <cfg:Kerberos>true</cfg:Kerberos> <cfg:Negotiate>true</cfg:Negotiate> </cfg:Auth> <cfg:DefaultPorts> <cfg:HTTP>80</cfg:HTTP> <cfg:HTTPS>443</cfg:HTTPS> </cfg:DefaultPorts> <cfg:TrustedHosts> </cfg:TrustedHosts> </cfg:Client> <cfg:Service> <cfg:RootSDDL> O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;ER)S:P(AU;FA;GA;;;WD)(AU;S A;GWGX;;;WD) </cfg:RootSDDL> <cfg:MaxConcurrentOperations> 100 </cfg:MaxConcurrentOperations> <cfg:EnumerationTimeoutms> 60000 </cfg:EnumerationTimeoutms> <cfg:AllowUnencrypted>false</cfg:AllowUnencrypted> <cfg:Auth> <cfg:Basic>false</cfg:Basic> <cfg:Kerberos>true</cfg:Kerberos> <cfg:Negotiate>true</cfg:Negotiate> </cfg:Auth> <cfg:DefaultPorts> <cfg:HTTP>80</cfg:HTTP> <cfg:HTTPS>443</cfg:HTTPS> </cfg:DefaultPorts> <cfg:IPv4Filter>*</cfg:IPv4Filter> <cfg:IPv6Filter>*</cfg:IPv6Filter> </cfg:Service> <cfg:Winrs> <cfg:AllowRemoteShellAccess> true </cfg:AllowRemoteShellAccess> <cfg:IdleTimeout>900000</cfg:IdleTimeout> <cfg:MaxConcurrentUsers>5</cfg:MaxConcurrentUsers> <cfg:MaxShellRunTime>28800000</cfg:MaxShellRunTime> <cfg:MaxProcessesPerShell>5</cfg:MaxProcessesPerShell> <cfg:MaxMemoryPerShellMB>80</cfg:MaxMemoryPerShellMB> <cfg:MaxShellsPerUser>2</cfg:MaxShellsPerUser> </cfg:Winrs> </cfg:Config> </s:Body> </s:Envelope>
Put Response
-
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"> <s:Header> <wsa:To>http://localhost:80/wsman</wsa:To> <wsman:ResourceURI s:mustUnderstand="true"> http://schemas.microsoft.com/wbem/wsman/1/config </wsman:ResourceURI> <wsa:ReplyTo> <wsa:Address s:mustUnderstand="true"> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous </wsa:Address> </wsa:ReplyTo> <wsa:Action s:mustUnderstand="true"> http://schemas.xmlsoap.org/ws/2004/09/transfer/Put </wsa:Action> <wsman:MaxEnvelopeSize s:mustUnderstand="true"> 51200 </wsman:MaxEnvelopeSize> <wsa:MessageID> uuid:47F4F498-0050-4DCF-BCA1-5611732CF7DE </wsa:MessageID> <wsman:OperationTimeout>PT60.000S</wsman:OperationTimeout> </s:Header> <s:Body> <cfg:Config xmlns:cfg="http://schemas.microsoft.com/wbem/wsman/1/config"> <cfg:MaxEnvelopeSizekb>50</cfg:MaxEnvelopeSizekb> <cfg:MaxTimeoutms>60000</cfg:MaxTimeoutms> <cfg:MaxBatchItems>10</cfg:MaxBatchItems> <cfg:MaxProviderRequests>25</cfg:MaxProviderRequests> <cfg:Client> <cfg:NetworkDelayms>5000</cfg:NetworkDelayms> <cfg:URLPrefix>wsman</cfg:URLPrefix> <cfg:AllowUnencrypted>false</cfg:AllowUnencrypted> <cfg:Auth> <cfg:Basic>false</cfg:Basic> <cfg:Digest>true</cfg:Digest> <cfg:Kerberos>true</cfg:Kerberos> <cfg:Negotiate>true</cfg:Negotiate> </cfg:Auth> <cfg:DefaultPorts> <cfg:HTTP>80</cfg:HTTP> <cfg:HTTPS>443</cfg:HTTPS> </cfg:DefaultPorts> <cfg:TrustedHosts> </cfg:TrustedHosts> </cfg:Client> <cfg:Service> <cfg:RootSDDL> O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;ER)S:P(AU;FA;GA;;;WD)(AU;S A;GWGX;;;WD) </cfg:RootSDDL> <cfg:MaxConcurrentOperations> 100 </cfg:MaxConcurrentOperations> <cfg:EnumerationTimeoutms> 60000 </cfg:EnumerationTimeoutms> <cfg:AllowUnencrypted>false</cfg:AllowUnencrypted> <cfg:Auth> <cfg:Basic>false</cfg:Basic> <cfg:Kerberos>true</cfg:Kerberos> <cfg:Negotiate>true</cfg:Negotiate> </cfg:Auth> <cfg:DefaultPorts> <cfg:HTTP>80</cfg:HTTP> <cfg:HTTPS>443</cfg:HTTPS> </cfg:DefaultPorts> <cfg:IPv4Filter>*</cfg:IPv4Filter> <cfg:IPv6Filter>*</cfg:IPv6Filter> </cfg:Service> <cfg:Winrs> <cfg:AllowRemoteShellAccess> true </cfg:AllowRemoteShellAccess> <cfg:IdleTimeout>900000</cfg:IdleTimeout> <cfg:MaxConcurrentUsers>5</cfg:MaxConcurrentUsers> <cfg:MaxShellRunTime>28800000</cfg:MaxShellRunTime> <cfg:MaxProcessesPerShell>5</cfg:MaxProcessesPerShell> <cfg:MaxMemoryPerShellMB>80</cfg:MaxMemoryPerShellMB> <cfg:MaxShellsPerUser>2</cfg:MaxShellsPerUser> </cfg:Winrs> </cfg:Config> </s:Body> </s:Envelope>