winrm 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -10
  3. data/.rubocop.yml +26 -26
  4. data/.travis.yml +11 -11
  5. data/Gemfile +3 -3
  6. data/README.md +263 -260
  7. data/Rakefile +34 -34
  8. data/Vagrantfile +6 -6
  9. data/WinrmAppveyor.psm1 +31 -31
  10. data/appveyor.yml +51 -51
  11. data/changelog.md +107 -104
  12. data/lib/winrm.rb +39 -39
  13. data/lib/winrm/connection.rb +83 -83
  14. data/lib/winrm/connection_opts.rb +91 -91
  15. data/lib/winrm/exceptions.rb +76 -76
  16. data/lib/winrm/http/response_handler.rb +96 -96
  17. data/lib/winrm/http/transport.rb +424 -424
  18. data/lib/winrm/http/transport_factory.rb +68 -68
  19. data/lib/winrm/output.rb +59 -59
  20. data/lib/winrm/psrp/create_pipeline.xml.erb +167 -167
  21. data/lib/winrm/psrp/fragment.rb +70 -70
  22. data/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -224
  23. data/lib/winrm/psrp/message.rb +130 -130
  24. data/lib/winrm/psrp/message_data.rb +42 -42
  25. data/lib/winrm/psrp/message_data/base.rb +49 -49
  26. data/lib/winrm/psrp/message_data/error_record.rb +68 -68
  27. data/lib/winrm/psrp/message_data/pipeline_host_call.rb +32 -32
  28. data/lib/winrm/psrp/message_data/pipeline_output.rb +54 -49
  29. data/lib/winrm/psrp/message_data/pipeline_state.rb +40 -40
  30. data/lib/winrm/psrp/message_data/runspacepool_host_call.rb +32 -32
  31. data/lib/winrm/psrp/message_data/runspacepool_state.rb +39 -39
  32. data/lib/winrm/psrp/message_data/session_capability.rb +36 -36
  33. data/lib/winrm/psrp/message_defragmenter.rb +62 -62
  34. data/lib/winrm/psrp/message_factory.rb +75 -75
  35. data/lib/winrm/psrp/message_fragmenter.rb +60 -60
  36. data/lib/winrm/psrp/powershell_output_decoder.rb +144 -139
  37. data/lib/winrm/psrp/receive_response_reader.rb +97 -97
  38. data/lib/winrm/psrp/session_capability.xml.erb +7 -7
  39. data/lib/winrm/psrp/uuid.rb +40 -40
  40. data/lib/winrm/shells/base.rb +180 -180
  41. data/lib/winrm/shells/cmd.rb +65 -65
  42. data/lib/winrm/shells/power_shell.rb +202 -202
  43. data/lib/winrm/shells/retryable.rb +45 -45
  44. data/lib/winrm/shells/shell_factory.rb +58 -58
  45. data/lib/winrm/version.rb +7 -7
  46. data/lib/winrm/wsmv/base.rb +59 -59
  47. data/lib/winrm/wsmv/cleanup_command.rb +61 -61
  48. data/lib/winrm/wsmv/close_shell.rb +50 -50
  49. data/lib/winrm/wsmv/command.rb +101 -101
  50. data/lib/winrm/wsmv/command_output.rb +76 -76
  51. data/lib/winrm/wsmv/command_output_decoder.rb +55 -55
  52. data/lib/winrm/wsmv/configuration.rb +46 -46
  53. data/lib/winrm/wsmv/create_pipeline.rb +66 -66
  54. data/lib/winrm/wsmv/create_shell.rb +119 -119
  55. data/lib/winrm/wsmv/header.rb +203 -203
  56. data/lib/winrm/wsmv/init_runspace_pool.rb +95 -95
  57. data/lib/winrm/wsmv/iso8601_duration.rb +60 -60
  58. data/lib/winrm/wsmv/keep_alive.rb +68 -68
  59. data/lib/winrm/wsmv/receive_response_reader.rb +126 -126
  60. data/lib/winrm/wsmv/send_data.rb +68 -68
  61. data/lib/winrm/wsmv/soap.rb +51 -51
  62. data/lib/winrm/wsmv/wql_query.rb +79 -79
  63. data/lib/winrm/wsmv/write_stdin.rb +88 -88
  64. data/tests/integration/auth_timeout_spec.rb +18 -18
  65. data/tests/integration/cmd_spec.rb +131 -131
  66. data/tests/integration/config-example.yml +16 -16
  67. data/tests/integration/issue_59_spec.rb +26 -26
  68. data/tests/integration/powershell_spec.rb +165 -165
  69. data/tests/integration/spec_helper.rb +65 -65
  70. data/tests/integration/transport_spec.rb +99 -99
  71. data/tests/integration/wql_spec.rb +16 -16
  72. data/tests/matchers.rb +60 -60
  73. data/tests/spec/configuration_spec.rb +184 -184
  74. data/tests/spec/connection_spec.rb +39 -39
  75. data/tests/spec/exception_spec.rb +50 -50
  76. data/tests/spec/http/transport_factory_spec.rb +68 -68
  77. data/tests/spec/http/transport_spec.rb +44 -44
  78. data/tests/spec/output_spec.rb +127 -127
  79. data/tests/spec/psrp/fragment_spec.rb +62 -62
  80. data/tests/spec/psrp/message_data/base_spec.rb +13 -13
  81. data/tests/spec/psrp/message_data/error_record_spec.rb +41 -41
  82. data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +25 -25
  83. data/tests/spec/psrp/message_data/pipeline_output_spec.rb +32 -32
  84. data/tests/spec/psrp/message_data/pipeline_state_spec.rb +40 -40
  85. data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +25 -25
  86. data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +16 -16
  87. data/tests/spec/psrp/message_data/session_capability_spec.rb +30 -30
  88. data/tests/spec/psrp/message_data_spec.rb +35 -35
  89. data/tests/spec/psrp/message_defragmenter_spec.rb +47 -47
  90. data/tests/spec/psrp/message_fragmenter_spec.rb +105 -105
  91. data/tests/spec/psrp/powershell_output_decoder_spec.rb +100 -100
  92. data/tests/spec/psrp/psrp_message_spec.rb +70 -70
  93. data/tests/spec/psrp/recieve_response_reader_spec.rb +172 -172
  94. data/tests/spec/psrp/uuid_spec.rb +28 -28
  95. data/tests/spec/response_handler_spec.rb +61 -61
  96. data/tests/spec/shells/base_spec.rb +202 -202
  97. data/tests/spec/shells/cmd_spec.rb +75 -75
  98. data/tests/spec/shells/powershell_spec.rb +175 -175
  99. data/tests/spec/spec_helper.rb +47 -47
  100. data/tests/spec/stubs/clixml/error_record.xml.erb +84 -84
  101. data/tests/spec/stubs/clixml/pipeline_state.xml.erb +88 -88
  102. data/tests/spec/stubs/responses/get_command_output_response.xml.erb +13 -13
  103. data/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +10 -10
  104. data/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +10 -10
  105. data/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +12 -12
  106. data/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +9 -9
  107. data/tests/spec/stubs/responses/open_shell_v1.xml +19 -19
  108. data/tests/spec/stubs/responses/open_shell_v2.xml +20 -20
  109. data/tests/spec/stubs/responses/soap_fault_v1.xml +36 -36
  110. data/tests/spec/stubs/responses/soap_fault_v2.xml +42 -42
  111. data/tests/spec/stubs/responses/wmi_error_v2.xml +41 -41
  112. data/tests/spec/wsmv/cleanup_command_spec.rb +22 -22
  113. data/tests/spec/wsmv/close_shell_spec.rb +17 -17
  114. data/tests/spec/wsmv/command_output_decoder_spec.rb +37 -37
  115. data/tests/spec/wsmv/command_output_spec.rb +45 -45
  116. data/tests/spec/wsmv/command_spec.rb +19 -19
  117. data/tests/spec/wsmv/configuration_spec.rb +17 -17
  118. data/tests/spec/wsmv/create_pipeline_spec.rb +31 -31
  119. data/tests/spec/wsmv/create_shell_spec.rb +38 -38
  120. data/tests/spec/wsmv/init_runspace_pool_spec.rb +36 -36
  121. data/tests/spec/wsmv/keep_alive_spec.rb +21 -21
  122. data/tests/spec/wsmv/receive_response_reader_spec.rb +123 -123
  123. data/tests/spec/wsmv/send_data_spec.rb +30 -30
  124. data/tests/spec/wsmv/wql_query_spec.rb +13 -13
  125. data/tests/spec/wsmv/write_stdin_spec.rb +22 -22
  126. data/winrm.gemspec +47 -42
  127. metadata +7 -3
@@ -1,47 +1,47 @@
1
- # encoding: UTF-8
2
- require 'rubygems'
3
- require 'bundler/setup'
4
- require 'winrm'
5
- require 'json'
6
- require_relative '../matchers'
7
-
8
- # Unit test spec helper
9
- module SpecUnitHelper
10
- def stubbed_response(file)
11
- File.read("tests/spec/stubs/responses/#{file}")
12
- end
13
-
14
- def stubbed_clixml(file)
15
- File.read("tests/spec/stubs/clixml/#{file}")
16
- end
17
-
18
- def default_connection_opts
19
- {
20
- user: 'Administrator',
21
- password: 'password',
22
- endpoint: 'http://localhost:5985/wsman',
23
- max_envelope_size: 153600,
24
- session_id: '05A2622B-B842-4EB8-8A78-0225C8A993DF',
25
- operation_timeout: 60,
26
- locale: 'en-US'
27
- }
28
- end
29
- end
30
-
31
- # Strip leading whitespace from each line that is the same as the
32
- # amount of whitespace on the first line of the string.
33
- # Leaves _additional_ indentation on later lines intact.
34
- # and remove newlines.
35
- class String
36
- def unindent
37
- gsub(/^#{self[/\A[ \t]*/]}/, '').delete("\n")
38
- end
39
-
40
- def to_byte_string
41
- force_encoding(Encoding::ASCII_8BIT)
42
- end
43
- end
44
-
45
- RSpec.configure do |config|
46
- config.include(SpecUnitHelper)
47
- end
1
+ # encoding: UTF-8
2
+ require 'rubygems'
3
+ require 'bundler/setup'
4
+ require 'winrm'
5
+ require 'json'
6
+ require_relative '../matchers'
7
+
8
+ # Unit test spec helper
9
+ module SpecUnitHelper
10
+ def stubbed_response(file)
11
+ File.read("tests/spec/stubs/responses/#{file}")
12
+ end
13
+
14
+ def stubbed_clixml(file)
15
+ File.read("tests/spec/stubs/clixml/#{file}")
16
+ end
17
+
18
+ def default_connection_opts
19
+ {
20
+ user: 'Administrator',
21
+ password: 'password',
22
+ endpoint: 'http://localhost:5985/wsman',
23
+ max_envelope_size: 153600,
24
+ session_id: '05A2622B-B842-4EB8-8A78-0225C8A993DF',
25
+ operation_timeout: 60,
26
+ locale: 'en-US'
27
+ }
28
+ end
29
+ end
30
+
31
+ # Strip leading whitespace from each line that is the same as the
32
+ # amount of whitespace on the first line of the string.
33
+ # Leaves _additional_ indentation on later lines intact.
34
+ # and remove newlines.
35
+ class String
36
+ def unindent
37
+ gsub(/^#{self[/\A[ \t]*/]}/, '').delete("\n")
38
+ end
39
+
40
+ def to_byte_string
41
+ force_encoding(Encoding::ASCII_8BIT)
42
+ end
43
+ end
44
+
45
+ RSpec.configure do |config|
46
+ config.include(SpecUnitHelper)
47
+ end
@@ -1,84 +1,84 @@
1
- <?xml version="1.0"?>
2
- <Obj RefId="0">
3
- <TN RefId="0">
4
- <T>System.Management.Automation.ErrorRecord</T>
5
- <T>System.Object</T>
6
- </TN>
7
- <ToString><%= error_message %></ToString>
8
- <MS>
9
- <B N="writeErrorStream">true</B>
10
- <Obj N="Exception" RefId="1">
11
- <TN RefId="1">
12
- <T>Microsoft.PowerShell.Commands.WriteErrorException</T>
13
- <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
14
- <T>System.Exception</T>
15
- <T>System.Object</T>
16
- </TN>
17
- <ToString>Microsoft.PowerShell.Commands.WriteErrorException: <%= error_message %></ToString>
18
- <Props>
19
- <S N="Message"><%= error_message %></S>
20
- <Obj N="Data" RefId="2">
21
- <TN RefId="2">
22
- <T>System.Collections.ListDictionaryInternal</T>
23
- <T>System.Object</T>
24
- </TN>
25
- <DCT/>
26
- </Obj>
27
- <Nil N="InnerException"/>
28
- <Nil N="StackTrace"/>
29
- <Nil N="HelpLink"/>
30
- <Nil N="Source"/>
31
- <I32 N="HResult">-2146233088</I32>
32
- </Props>
33
- </Obj>
34
- <Nil N="TargetObject"/>
35
- <S N="FullyQualifiedErrorId"><%= error_id %></S>
36
- <Obj N="InvocationInfo" RefId="3">
37
- <TN RefId="3">
38
- <T>System.Management.Automation.InvocationInfo</T>
39
- <T>System.Object</T>
40
- </TN>
41
- <ToString>System.Management.Automation.InvocationInfo</ToString>
42
- <Props>
43
- <Nil N="MyCommand"/>
44
- <Obj N="BoundParameters" RefId="4">
45
- <TN RefId="4">
46
- <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
47
- <T>System.Object</T>
48
- </TN>
49
- <DCT/>
50
- </Obj>
51
- <Obj N="UnboundArguments" RefId="5">
52
- <TN RefId="5">
53
- <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
54
- <T>System.Object</T>
55
- </TN>
56
- <LST/>
57
- </Obj>
58
- <I32 N="ScriptLineNumber">1</I32>
59
- <I32 N="OffsetInLine">1</I32>
60
- <I64 N="HistoryId">1</I64>
61
- <S N="ScriptName"/>
62
- <S N="Line">write-error '<%= error_message %>'</S>
63
- <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ write-error '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
64
- <S N="PSScriptRoot"><%= script_root %></S>
65
- <Nil N="PSCommandPath"/>
66
- <S N="InvocationName"/>
67
- <I32 N="PipelineLength">0</I32>
68
- <I32 N="PipelinePosition">0</I32>
69
- <B N="ExpectingInput">false</B>
70
- <S N="CommandOrigin">Internal</S>
71
- <Nil N="DisplayScriptPosition"/>
72
- </Props>
73
- </Obj>
74
- <I32 N="ErrorCategory_Category">0</I32>
75
- <S N="ErrorCategory_Activity">Write-Error</S>
76
- <S N="ErrorCategory_Reason">WriteErrorException</S>
77
- <S N="ErrorCategory_TargetName"/>
78
- <S N="ErrorCategory_TargetType"/>
79
- <S N="ErrorCategory_Message"><%= category_message %></S>
80
- <B N="SerializeExtendedInfo">false</B>
81
- <S N="ErrorDetails_ScriptStackTrace"><%= stack_trace %></S>
82
- <Nil N="PSMessageDetails"/>
83
- </MS>
84
- </Obj>
1
+ <?xml version="1.0"?>
2
+ <Obj RefId="0">
3
+ <TN RefId="0">
4
+ <T>System.Management.Automation.ErrorRecord</T>
5
+ <T>System.Object</T>
6
+ </TN>
7
+ <ToString><%= error_message %></ToString>
8
+ <MS>
9
+ <B N="writeErrorStream">true</B>
10
+ <Obj N="Exception" RefId="1">
11
+ <TN RefId="1">
12
+ <T>Microsoft.PowerShell.Commands.WriteErrorException</T>
13
+ <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
14
+ <T>System.Exception</T>
15
+ <T>System.Object</T>
16
+ </TN>
17
+ <ToString>Microsoft.PowerShell.Commands.WriteErrorException: <%= error_message %></ToString>
18
+ <Props>
19
+ <S N="Message"><%= error_message %></S>
20
+ <Obj N="Data" RefId="2">
21
+ <TN RefId="2">
22
+ <T>System.Collections.ListDictionaryInternal</T>
23
+ <T>System.Object</T>
24
+ </TN>
25
+ <DCT/>
26
+ </Obj>
27
+ <Nil N="InnerException"/>
28
+ <Nil N="StackTrace"/>
29
+ <Nil N="HelpLink"/>
30
+ <Nil N="Source"/>
31
+ <I32 N="HResult">-2146233088</I32>
32
+ </Props>
33
+ </Obj>
34
+ <Nil N="TargetObject"/>
35
+ <S N="FullyQualifiedErrorId"><%= error_id %></S>
36
+ <Obj N="InvocationInfo" RefId="3">
37
+ <TN RefId="3">
38
+ <T>System.Management.Automation.InvocationInfo</T>
39
+ <T>System.Object</T>
40
+ </TN>
41
+ <ToString>System.Management.Automation.InvocationInfo</ToString>
42
+ <Props>
43
+ <Nil N="MyCommand"/>
44
+ <Obj N="BoundParameters" RefId="4">
45
+ <TN RefId="4">
46
+ <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
47
+ <T>System.Object</T>
48
+ </TN>
49
+ <DCT/>
50
+ </Obj>
51
+ <Obj N="UnboundArguments" RefId="5">
52
+ <TN RefId="5">
53
+ <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
54
+ <T>System.Object</T>
55
+ </TN>
56
+ <LST/>
57
+ </Obj>
58
+ <I32 N="ScriptLineNumber">1</I32>
59
+ <I32 N="OffsetInLine">1</I32>
60
+ <I64 N="HistoryId">1</I64>
61
+ <S N="ScriptName"/>
62
+ <S N="Line">write-error '<%= error_message %>'</S>
63
+ <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ write-error '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
64
+ <S N="PSScriptRoot"><%= script_root %></S>
65
+ <Nil N="PSCommandPath"/>
66
+ <S N="InvocationName"/>
67
+ <I32 N="PipelineLength">0</I32>
68
+ <I32 N="PipelinePosition">0</I32>
69
+ <B N="ExpectingInput">false</B>
70
+ <S N="CommandOrigin">Internal</S>
71
+ <Nil N="DisplayScriptPosition"/>
72
+ </Props>
73
+ </Obj>
74
+ <I32 N="ErrorCategory_Category">0</I32>
75
+ <S N="ErrorCategory_Activity">Write-Error</S>
76
+ <S N="ErrorCategory_Reason">WriteErrorException</S>
77
+ <S N="ErrorCategory_TargetName"/>
78
+ <S N="ErrorCategory_TargetType"/>
79
+ <S N="ErrorCategory_Message"><%= category_message %></S>
80
+ <B N="SerializeExtendedInfo">false</B>
81
+ <S N="ErrorDetails_ScriptStackTrace"><%= stack_trace %></S>
82
+ <Nil N="PSMessageDetails"/>
83
+ </MS>
84
+ </Obj>
@@ -1,88 +1,88 @@
1
- <?xml version="1.0"?>
2
- <Obj RefId="0">
3
- <MS>
4
- <I32 N="PipelineState"><%= pipeline_state %></I32>
5
- <Obj N="ExceptionAsErrorRecord" RefId="1">
6
- <TN RefId="0">
7
- <T>System.Management.Automation.ErrorRecord</T>
8
- <T>System.Object</T>
9
- </TN>
10
- <ToString><%= error_message %></ToString>
11
- <MS>
12
- <Obj N="Exception" RefId="2">
13
- <TN RefId="1">
14
- <T>System.Management.Automation.RuntimeException</T>
15
- <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
16
- <T>System.Exception</T>
17
- <T>System.Object</T>
18
- </TN>
19
- <ToString>System.Management.Automation.RuntimeException: <%= error_message %></ToString>
20
- <Props>
21
- <S N="ErrorRecord"><%= error_message %></S>
22
- <B N="WasThrownFromThrowStatement">true</B>
23
- <S N="Message"><%= error_message %></S>
24
- <Obj N="Data" RefId="3">
25
- <TN RefId="2">
26
- <T>System.Collections.ListDictionaryInternal</T>
27
- <T>System.Object</T>
28
- </TN>
29
- <DCT />
30
- </Obj>
31
- <Nil N="InnerException" />
32
- <Nil N="StackTrace" />
33
- <Nil N="HelpLink" />
34
- <Nil N="Source" />
35
- <I32 N="HResult">-2146233088</I32>
36
- </Props>
37
- </Obj>
38
- <S N="TargetObject"><%= error_message %></S>
39
- <S N="FullyQualifiedErrorId"><%= error_id %></S>
40
- <Obj N="InvocationInfo" RefId="4">
41
- <TN RefId="3">
42
- <T>System.Management.Automation.InvocationInfo</T>
43
- <T>System.Object</T>
44
- </TN>
45
- <ToString>System.Management.Automation.InvocationInfo</ToString>
46
- <Props>
47
- <Nil N="MyCommand" />
48
- <Obj N="BoundParameters" RefId="5">
49
- <TN RefId="4">
50
- <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
51
- <T>System.Object</T>
52
- </TN>
53
- <DCT />
54
- </Obj>
55
- <Obj N="UnboundArguments" RefId="6">
56
- <TN RefId="5">
57
- <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
58
- <T>System.Object</T>
59
- </TN>
60
- <LST />
61
- </Obj>
62
- <I32 N="ScriptLineNumber">1</I32>
63
- <I32 N="OffsetInLine">1</I32>
64
- <I64 N="HistoryId">-1</I64>
65
- <S N="ScriptName"></S>
66
- <S N="Line">throw '<%= error_message %>'</S>
67
- <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ throw '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~</S>
68
- <S N="PSScriptRoot"></S>
69
- <Nil N="PSCommandPath" />
70
- <S N="InvocationName"></S>
71
- <I32 N="PipelineLength">0</I32>
72
- <I32 N="PipelinePosition">0</I32>
73
- <B N="ExpectingInput">false</B>
74
- <S N="CommandOrigin">Internal</S>
75
- <Nil N="DisplayScriptPosition" />
76
- </Props>
77
- </Obj>
78
- <I32 N="ErrorCategory_Category">14</I32>
79
- <S N="ErrorCategory_Activity"></S>
80
- <S N="ErrorCategory_Reason">RuntimeException</S>
81
- <S N="ErrorCategory_TargetName"><%= error_message %></S><S N="ErrorCategory_TargetType">String</S>
82
- <S N="ErrorCategory_Message"><%= category_message %></S>
83
- <B N="SerializeExtendedInfo">false</B>
84
- <S N="ErrorDetails_ScriptStackTrace">at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1</S>
85
- </MS>
86
- </Obj>
87
- </MS>
88
- </Obj>
1
+ <?xml version="1.0"?>
2
+ <Obj RefId="0">
3
+ <MS>
4
+ <I32 N="PipelineState"><%= pipeline_state %></I32>
5
+ <Obj N="ExceptionAsErrorRecord" RefId="1">
6
+ <TN RefId="0">
7
+ <T>System.Management.Automation.ErrorRecord</T>
8
+ <T>System.Object</T>
9
+ </TN>
10
+ <ToString><%= error_message %></ToString>
11
+ <MS>
12
+ <Obj N="Exception" RefId="2">
13
+ <TN RefId="1">
14
+ <T>System.Management.Automation.RuntimeException</T>
15
+ <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
16
+ <T>System.Exception</T>
17
+ <T>System.Object</T>
18
+ </TN>
19
+ <ToString>System.Management.Automation.RuntimeException: <%= error_message %></ToString>
20
+ <Props>
21
+ <S N="ErrorRecord"><%= error_message %></S>
22
+ <B N="WasThrownFromThrowStatement">true</B>
23
+ <S N="Message"><%= error_message %></S>
24
+ <Obj N="Data" RefId="3">
25
+ <TN RefId="2">
26
+ <T>System.Collections.ListDictionaryInternal</T>
27
+ <T>System.Object</T>
28
+ </TN>
29
+ <DCT />
30
+ </Obj>
31
+ <Nil N="InnerException" />
32
+ <Nil N="StackTrace" />
33
+ <Nil N="HelpLink" />
34
+ <Nil N="Source" />
35
+ <I32 N="HResult">-2146233088</I32>
36
+ </Props>
37
+ </Obj>
38
+ <S N="TargetObject"><%= error_message %></S>
39
+ <S N="FullyQualifiedErrorId"><%= error_id %></S>
40
+ <Obj N="InvocationInfo" RefId="4">
41
+ <TN RefId="3">
42
+ <T>System.Management.Automation.InvocationInfo</T>
43
+ <T>System.Object</T>
44
+ </TN>
45
+ <ToString>System.Management.Automation.InvocationInfo</ToString>
46
+ <Props>
47
+ <Nil N="MyCommand" />
48
+ <Obj N="BoundParameters" RefId="5">
49
+ <TN RefId="4">
50
+ <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
51
+ <T>System.Object</T>
52
+ </TN>
53
+ <DCT />
54
+ </Obj>
55
+ <Obj N="UnboundArguments" RefId="6">
56
+ <TN RefId="5">
57
+ <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
58
+ <T>System.Object</T>
59
+ </TN>
60
+ <LST />
61
+ </Obj>
62
+ <I32 N="ScriptLineNumber">1</I32>
63
+ <I32 N="OffsetInLine">1</I32>
64
+ <I64 N="HistoryId">-1</I64>
65
+ <S N="ScriptName"></S>
66
+ <S N="Line">throw '<%= error_message %>'</S>
67
+ <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ throw '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~</S>
68
+ <S N="PSScriptRoot"></S>
69
+ <Nil N="PSCommandPath" />
70
+ <S N="InvocationName"></S>
71
+ <I32 N="PipelineLength">0</I32>
72
+ <I32 N="PipelinePosition">0</I32>
73
+ <B N="ExpectingInput">false</B>
74
+ <S N="CommandOrigin">Internal</S>
75
+ <Nil N="DisplayScriptPosition" />
76
+ </Props>
77
+ </Obj>
78
+ <I32 N="ErrorCategory_Category">14</I32>
79
+ <S N="ErrorCategory_Activity"></S>
80
+ <S N="ErrorCategory_Reason">RuntimeException</S>
81
+ <S N="ErrorCategory_TargetName"><%= error_message %></S><S N="ErrorCategory_TargetType">String</S>
82
+ <S N="ErrorCategory_Message"><%= category_message %></S>
83
+ <B N="SerializeExtendedInfo">false</B>
84
+ <S N="ErrorDetails_ScriptStackTrace">at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1</S>
85
+ </MS>
86
+ </Obj>
87
+ </MS>
88
+ </Obj>
@@ -1,13 +1,13 @@
1
- <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
- <s:Header>
3
- </s:Header>
4
- <s:Body>
5
- <rsp:ReceiveResponse>
6
- <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
- <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
- <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
9
- <rsp:ExitCode>0</rsp:ExitCode>
10
- </rsp:CommandState>
11
- </rsp:ReceiveResponse>
12
- </s:Body>
13
- </s:Envelope>
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
+ <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
9
+ <rsp:ExitCode>0</rsp:ExitCode>
10
+ </rsp:CommandState>
11
+ </rsp:ReceiveResponse>
12
+ </s:Body>
13
+ </s:Envelope>