I am testing the following scenario:
- WinRM client is running on a Windows Server 2008 with German locale
- Hyper-V (and WinRM service respectively) is running on Windows Server 2012 R2 with English as default locale and German locale installed in addition
- Msvm_ComputerSystem instances are enumerated (sample command used: winrm e wmi/root/virtualization/v2/Msvm_ComputerSystem -r:10.10.10.10 -u:administrator -un -encoding:utf-8)
Observed: the returned result contains values that are with English locale - Msvm_ComputerSystem.Caption is equal to "Virtual Machine" (although I can see that the wsman:Locale element is present in the WSMAN request with its xml:lang property set to "de-DE")
Expected: the returned result should contain values that are with German locale - Msvm_ComputerSystem.Caption should be equal to "Virtueller Computer".
Note1: the behavior is inconsistent - I've been able to get result with either German or English locale values.
Note2: when I am getting a result containing values with English locale, I also see that the WSMAN response has the soap:Envelope element with its xml:lang property set to "de-DE".
Below I am providing the SOAP transactions for the following cases: 1) a WSMAN client sends a request with en-US locale; 2) a WSMAN client sends a request with de-DE locale.
============= en-US REQUEST / RESPONSE START =============
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<s:Header>
<a:To s:mustUnderstand="true">http://10.23.64.3:5985/wsman</a:To>
<a:ReplyTo>
<a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:Action s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action>
<a:MessageID>uuid:ED809788-36F8-4C61-8D24-4DF575936D36</a:MessageID>
<w:ResourceURI s:mustUnderstand="true" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem</w:ResourceURI>
<w:Locale s:mustUnderstand="false" xml:lang="en-US" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"/>
</s:Header>
<s:Body>
<ns1053:Pull xmlns:ns1053="http://schemas.xmlsoap.org/ws/2004/09/enumeration">
<ns1053:EnumerationContext>uuid:E94B15F6-0D5D-45FC-961C-B8EF3122E416</ns1053:EnumerationContext>
</ns1053:Pull>
</s:Body>
</s:Envelope>
<s:Header>
<a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse</a:Action>
<a:MessageID>uuid:710228F4-FC41-4EEE-B0D7-29440A72C10C</a:MessageID>
<a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
<a:RelatesTo>uuid:ED809788-36F8-4C61-8D24-4DF575936D36</a:RelatesTo>
</s:Header>
<s:Body>
<n:PullResponse>
<n:Items>
<p:Msvm_ComputerSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xsi:type="p:Msvm_ComputerSystem_Type">
<p:Caption>Virtueller Computer</p:Caption>
<p:CommunicationStatus xsi:nil="true"/>
<p:CreationClassName>Msvm_ComputerSystem</p:CreationClassName>
<p:Description>Microsoft Virtual Machine</p:Description>
<p:DetailedStatus xsi:nil="true"/>
<p:ElementName>Test VM - 2dd746be-e601-4475-bbd9-49abea182f56</p:ElementName>
<p:EnabledDefault>3</p:EnabledDefault>
<p:EnabledState>3</p:EnabledState>
<p:EnhancedSessionModeState>3</p:EnhancedSessionModeState>
<p:FailedOverReplicationType>0</p:FailedOverReplicationType>
<p:HealthState>5</p:HealthState>
<p:InstallDate>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:InstallDate>
<p:InstanceID xsi:nil="true"/>
<p:LastApplicationConsistentReplicationTime>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:LastApplicationConsistentReplicationTime>
<p:LastReplicationTime>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:LastReplicationTime>
<p:LastReplicationType>0</p:LastReplicationType>
<p:LastSuccessfulBackupTime xsi:nil="true"/>
<p:Name>6D36FE80-3A10-4D78-A5D3-1B839C32937D</p:Name>
<p:NameFormat xsi:nil="true"/>
<p:NumberOfNumaNodes>1</p:NumberOfNumaNodes>
<p:OnTimeInMilliseconds>0</p:OnTimeInMilliseconds>
<p:OperatingStatus xsi:nil="true"/>
<p:OperationalStatus>2</p:OperationalStatus>
<p:OtherEnabledState xsi:nil="true"/>
<p:PrimaryOwnerContact xsi:nil="true"/>
<p:PrimaryOwnerName xsi:nil="true"/>
<p:PrimaryStatus xsi:nil="true"/>
<p:ProcessID xsi:nil="true"/>
<p:ReplicationHealth>0</p:ReplicationHealth>
<p:ReplicationMode>0</p:ReplicationMode>
<p:ReplicationState>0</p:ReplicationState>
<p:RequestedState>12</p:RequestedState>
<p:ResetCapability>1</p:ResetCapability>
<p:Status>OK</p:Status>
<p:StatusDescriptions>Normaler Betrieb</p:StatusDescriptions>
<p:TimeOfLastConfigurationChange>
<cim:Datetime>2014-09-01T12:25:55.500398Z</cim:Datetime>
</p:TimeOfLastConfigurationChange>
<p:TimeOfLastStateChange>
<cim:Datetime>2014-09-02T07:09:55.684323Z</cim:Datetime>
</p:TimeOfLastStateChange>
<p:TransitioningToState xsi:nil="true"/>
</p:Msvm_ComputerSystem>
</n:Items>
<n:EndOfSequence/>
</n:PullResponse>
</s:Body>
</s:Envelope>
============= en-US REQUEST / RESPONSE END =============
============= de-DE REQUEST / RESPONSE START =============
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"><s:Header>
<a:To s:mustUnderstand="true">http://10.23.64.3:5985/wsman</a:To>
<a:ReplyTo>
<a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:Action s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action>
<a:MessageID>uuid:3AC125D2-882E-493F-B596-8EB54D8FD83D</a:MessageID>
<w:ResourceURI s:mustUnderstand="true" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem</w:ResourceURI>
<w:Locale s:mustUnderstand="false" xml:lang="de-DE" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"/>
</s:Header>
<s:Body>
<ns1053:Pull xmlns:ns1053="http://schemas.xmlsoap.org/ws/2004/09/enumeration">
<ns1053:EnumerationContext>uuid:18475052-6B59-4A59-916E-9A19D6237A69</ns1053:EnumerationContext>
</ns1053:Pull>
</s:Body>
</s:Envelope>
<s:Envelope xml:lang="de-DE" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<s:Header>
<a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/PullResponse</a:Action>
<a:MessageID>uuid:010E31FF-00B1-48DF-AFEA-F9271DF748B5</a:MessageID>
<a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
<a:RelatesTo>uuid:3AC125D2-882E-493F-B596-8EB54D8FD83D</a:RelatesTo>
</s:Header>
<s:Body>
<n:PullResponse>
<n:Items>
<p:Msvm_ComputerSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/virtualization/v2/Msvm_ComputerSystem" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xsi:type="p:Msvm_ComputerSystem_Type">
<p:Caption>Virtueller Computer</p:Caption>
<p:CommunicationStatus xsi:nil="true"/>
<p:CreationClassName>Msvm_ComputerSystem</p:CreationClassName>
<p:Description>Microsoft Virtual Machine</p:Description>
<p:DetailedStatus xsi:nil="true"/>
<p:ElementName>Test VM - 2dd746be-e601-4475-bbd9-49abea182f56</p:ElementName>
<p:EnabledDefault>3</p:EnabledDefault>
<p:EnabledState>3</p:EnabledState>
<p:EnhancedSessionModeState>3</p:EnhancedSessionModeState>
<p:FailedOverReplicationType>0</p:FailedOverReplicationType>
<p:HealthState>5</p:HealthState>
<p:InstallDate>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:InstallDate>
<p:InstanceID xsi:nil="true"/>
<p:LastApplicationConsistentReplicationTime>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:LastApplicationConsistentReplicationTime>
<p:LastReplicationTime>
<cim:Datetime>1601-01-01T00:00:00Z</cim:Datetime>
</p:LastReplicationTime>
<p:LastReplicationType>0</p:LastReplicationType>
<p:LastSuccessfulBackupTime xsi:nil="true"/>
<p:Name>6D36FE80-3A10-4D78-A5D3-1B839C32937D</p:Name>
<p:NameFormat xsi:nil="true"/>
<p:NumberOfNumaNodes>1</p:NumberOfNumaNodes>
<p:OnTimeInMilliseconds>0</p:OnTimeInMilliseconds>
<p:OperatingStatus xsi:nil="true"/>
<p:OperationalStatus>2</p:OperationalStatus>
<p:OtherEnabledState xsi:nil="true"/>
<p:PrimaryOwnerContact xsi:nil="true"/>
<p:PrimaryOwnerName xsi:nil="true"/>
<p:PrimaryStatus xsi:nil="true"/>
<p:ProcessID xsi:nil="true"/>
<p:ReplicationHealth>0</p:ReplicationHealth>
<p:ReplicationMode>0</p:ReplicationMode>
<p:ReplicationState>0</p:ReplicationState>
<p:RequestedState>12</p:RequestedState>
<p:ResetCapability>1</p:ResetCapability>
<p:Status>OK</p:Status>
<p:StatusDescriptions>Normaler Betrieb</p:StatusDescriptions>
<p:TimeOfLastConfigurationChange>
<cim:Datetime>2014-09-01T12:25:55.500398Z</cim:Datetime>
</p:TimeOfLastConfigurationChange>
<p:TimeOfLastStateChange>
<cim:Datetime>2014-09-02T07:09:55.684323Z</cim:Datetime>
</p:TimeOfLastStateChange>
<p:TransitioningToState xsi:nil="true"/>
</p:Msvm_ComputerSystem>
</n:Items>
<n:EndOfSequence/>
</n:PullResponse>
</s:Body>
</s:Envelope>
============= de-DE REQUEST / RESPONSE END =============
Stoimen