winrm 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/winrm/http/transport.rb +1 -1
  3. data/lib/winrm/psrp/message.rb +128 -128
  4. data/lib/winrm/shells/power_shell.rb +0 -1
  5. data/lib/winrm/version.rb +1 -1
  6. metadata +12 -85
  7. data/.gitignore +0 -10
  8. data/.rubocop.yml +0 -38
  9. data/.travis.yml +0 -10
  10. data/Gemfile +0 -2
  11. data/Rakefile +0 -33
  12. data/Vagrantfile +0 -6
  13. data/WinrmAppveyor.psm1 +0 -32
  14. data/appveyor.yml +0 -50
  15. data/changelog.md +0 -133
  16. data/preamble +0 -17
  17. data/tests/integration/auth_timeout_spec.rb +0 -17
  18. data/tests/integration/cmd_spec.rb +0 -130
  19. data/tests/integration/config-example.yml +0 -16
  20. data/tests/integration/issue_59_spec.rb +0 -25
  21. data/tests/integration/powershell_spec.rb +0 -164
  22. data/tests/integration/spec_helper.rb +0 -62
  23. data/tests/integration/transport_spec.rb +0 -98
  24. data/tests/integration/wql_spec.rb +0 -33
  25. data/tests/matchers.rb +0 -59
  26. data/tests/spec/configuration_spec.rb +0 -183
  27. data/tests/spec/connection_spec.rb +0 -37
  28. data/tests/spec/exception_spec.rb +0 -49
  29. data/tests/spec/http/transport_factory_spec.rb +0 -66
  30. data/tests/spec/http/transport_spec.rb +0 -43
  31. data/tests/spec/output_spec.rb +0 -128
  32. data/tests/spec/psrp/fragment_spec.rb +0 -60
  33. data/tests/spec/psrp/message_data/base_spec.rb +0 -11
  34. data/tests/spec/psrp/message_data/error_record_spec.rb +0 -39
  35. data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +0 -23
  36. data/tests/spec/psrp/message_data/pipeline_output_spec.rb +0 -30
  37. data/tests/spec/psrp/message_data/pipeline_state_spec.rb +0 -38
  38. data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +0 -23
  39. data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +0 -14
  40. data/tests/spec/psrp/message_data/session_capability_spec.rb +0 -28
  41. data/tests/spec/psrp/message_data_spec.rb +0 -33
  42. data/tests/spec/psrp/message_defragmenter_spec.rb +0 -45
  43. data/tests/spec/psrp/message_fragmenter_spec.rb +0 -103
  44. data/tests/spec/psrp/powershell_output_decoder_spec.rb +0 -98
  45. data/tests/spec/psrp/psrp_message_spec.rb +0 -73
  46. data/tests/spec/psrp/recieve_response_reader_spec.rb +0 -170
  47. data/tests/spec/psrp/uuid_spec.rb +0 -28
  48. data/tests/spec/response_handler_spec.rb +0 -69
  49. data/tests/spec/shells/base_spec.rb +0 -227
  50. data/tests/spec/shells/cmd_spec.rb +0 -75
  51. data/tests/spec/shells/powershell_spec.rb +0 -221
  52. data/tests/spec/spec_helper.rb +0 -46
  53. data/tests/spec/stubs/clixml/error_record.xml.erb +0 -84
  54. data/tests/spec/stubs/clixml/pipeline_state.xml.erb +0 -88
  55. data/tests/spec/stubs/responses/get_command_output_response.xml.erb +0 -13
  56. data/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +0 -10
  57. data/tests/spec/stubs/responses/get_omi_command_output_response.xml.erb +0 -23
  58. data/tests/spec/stubs/responses/get_omi_command_output_response_not_done.xml.erb +0 -24
  59. data/tests/spec/stubs/responses/get_omi_config_response.xml +0 -45
  60. data/tests/spec/stubs/responses/get_omi_powershell_keepalive_response.xml.erb +0 -33
  61. data/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +0 -10
  62. data/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +0 -12
  63. data/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +0 -9
  64. data/tests/spec/stubs/responses/open_shell_omi.xml +0 -43
  65. data/tests/spec/stubs/responses/open_shell_v1.xml +0 -19
  66. data/tests/spec/stubs/responses/open_shell_v2.xml +0 -20
  67. data/tests/spec/stubs/responses/soap_fault_omi.xml +0 -31
  68. data/tests/spec/stubs/responses/soap_fault_v1.xml +0 -36
  69. data/tests/spec/stubs/responses/soap_fault_v2.xml +0 -42
  70. data/tests/spec/stubs/responses/wmi_error_v2.xml +0 -41
  71. data/tests/spec/wsmv/cleanup_command_spec.rb +0 -20
  72. data/tests/spec/wsmv/close_shell_spec.rb +0 -15
  73. data/tests/spec/wsmv/command_output_decoder_spec.rb +0 -35
  74. data/tests/spec/wsmv/command_output_spec.rb +0 -43
  75. data/tests/spec/wsmv/command_spec.rb +0 -17
  76. data/tests/spec/wsmv/configuration_spec.rb +0 -15
  77. data/tests/spec/wsmv/create_pipeline_spec.rb +0 -30
  78. data/tests/spec/wsmv/create_shell_spec.rb +0 -39
  79. data/tests/spec/wsmv/init_runspace_pool_spec.rb +0 -38
  80. data/tests/spec/wsmv/keep_alive_spec.rb +0 -21
  81. data/tests/spec/wsmv/receive_response_reader_spec.rb +0 -124
  82. data/tests/spec/wsmv/send_data_spec.rb +0 -30
  83. data/tests/spec/wsmv/wql_query_spec.rb +0 -11
  84. data/tests/spec/wsmv/write_stdin_spec.rb +0 -20
  85. data/winrm.gemspec +0 -46
@@ -1,75 +0,0 @@
1
- require 'winrm/shells/cmd'
2
-
3
- describe WinRM::Shells::Cmd do
4
- let(:retry_limit) { 1 }
5
- let(:shell_id) { 'shell_id' }
6
- let(:output) { 'output' }
7
- let(:create_shell_payload) { 'create_shell_payload' }
8
- let(:close_shell_payload) { 'close_shell_payload' }
9
- let(:cleanup_payload) { 'cleanup_payload' }
10
- let(:command) { 'run this command' }
11
- let(:arguments) { ['args'] }
12
- let(:command_response) { "<a xmlns:rsp='foo'><rsp:CommandId>command_id</rsp:CommandId></a>" }
13
- let(:connection_options) { { max_commands: 100, retry_limit: retry_limit, retry_delay: 0 } }
14
- let(:transport) { double('transport', send_request: nil) }
15
-
16
- before do
17
- allow_any_instance_of(WinRM::WSMV::CloseShell).to receive(:build)
18
- .and_return(close_shell_payload)
19
- allow_any_instance_of(WinRM::WSMV::CreateShell).to receive(:build)
20
- .and_return(create_shell_payload)
21
- allow_any_instance_of(WinRM::WSMV::CleanupCommand).to receive(:build)
22
- .and_return(cleanup_payload)
23
- allow_any_instance_of(WinRM::WSMV::ReceiveResponseReader).to receive(:read_output)
24
- .and_return(output)
25
- allow(transport).to receive(:send_request)
26
- .with(create_shell_payload)
27
- .and_return(REXML::Document.new("<blah Name='ShellId'>#{shell_id}</blah>"))
28
- allow(transport).to receive(:send_request)
29
- .with(/#{command}/)
30
- .and_return(REXML::Document.new(command_response))
31
- end
32
-
33
- subject { described_class.new(connection_options, transport, Logging.logger['test']) }
34
-
35
- describe '#run' do
36
- it 'opens a shell and gets shell id' do
37
- subject.run(command, arguments)
38
- expect(subject.shell_id).to eq shell_id
39
- end
40
-
41
- it 'sends create shell through transport' do
42
- expect(transport).to receive(:send_request).with(create_shell_payload)
43
- subject.run(command, arguments)
44
- end
45
-
46
- it 'returns output from generated command' do
47
- expect(subject.run(command, arguments)).to eq output
48
- end
49
-
50
- it 'sends command through transport' do
51
- expect(transport).to receive(:send_request).with(/#{command}/)
52
- subject.run(command, arguments)
53
- end
54
-
55
- it 'sends cleanup message through transport' do
56
- expect(transport).to receive(:send_request).with(cleanup_payload)
57
- subject.run(command, arguments)
58
- end
59
- end
60
-
61
- describe '#close' do
62
- it 'sends close shell through transport' do
63
- subject.run(command, arguments)
64
- expect(transport).to receive(:send_request).with(close_shell_payload)
65
- subject.close
66
- end
67
-
68
- it 'creates a shell closer with default shell uri' do
69
- allow(WinRM::WSMV::CloseShell).to receive(:new) do |_, opts|
70
- expect(opts[:shell_uri]).to be nil
71
- end.and_call_original
72
- subject.close
73
- end
74
- end
75
- end
@@ -1,221 +0,0 @@
1
- require 'winrm/shells/power_shell'
2
-
3
- describe WinRM::Shells::Powershell do
4
- let(:retry_limit) { 1 }
5
- let(:max_envelope_size_kb) { 150 }
6
- let(:shell_id) { 'bc1bfbba-8215-4a04-b2df-7a3ac0310e16' }
7
- let(:output) { 'output' }
8
- let(:command_id) { '4218A578-0F18-4B19-82C3-46B433319126' }
9
- let(:keepalive_payload) { 'keepalive_payload' }
10
- let(:configuration_payload) { 'configuration_payload' }
11
- let(:command_payload) { 'command_payload' }
12
- let(:create_shell_payload) { 'create_shell_payload' }
13
- let(:close_shell_payload) { 'close_shell_payload' }
14
- let(:cleanup_payload) { 'cleanup_payload' }
15
- let(:command) { 'command' }
16
- let(:output_message) { double('output_message', build: 'output_message') }
17
- let(:connection_options) { { max_commands: 100, retry_limit: retry_limit, retry_delay: 0 } }
18
- let(:transport) { double('transport', send_request: nil) }
19
- let(:protocol_version) { 2.2 }
20
- let(:test_data1) do
21
- <<-EOH
22
- <Obj RefId="0">
23
- <MS>
24
- <Version N="protocolversion">#{protocol_version}</Version>
25
- <Version N="PSVersion">2.0</Version>
26
- <Version N="SerializationVersion">1.1.0.1</Version>
27
- </MS>
28
- </Obj>
29
- EOH
30
- end
31
- let(:test_data2) { '<Obj RefId="0"><MS><I32 N="RunspaceState">2</I32></MS></Obj>' }
32
- let(:message1) do
33
- WinRM::PSRP::Message.new(
34
- shell_id,
35
- WinRM::PSRP::Message::MESSAGE_TYPES[:session_capability],
36
- test_data1,
37
- command_id
38
- )
39
- end
40
- let(:message2) do
41
- WinRM::PSRP::Message.new(
42
- shell_id,
43
- WinRM::PSRP::Message::MESSAGE_TYPES[:runspacepool_state],
44
- test_data2,
45
- command_id
46
- )
47
- end
48
- let(:fragment1) { WinRM::PSRP::Fragment.new(1, message1.bytes) }
49
- let(:fragment2) { WinRM::PSRP::Fragment.new(1, message2.bytes) }
50
- let(:test_data_stdout1) { Base64.strict_encode64(fragment1.bytes.pack('C*')) }
51
- let(:test_data_stdout2) { Base64.strict_encode64(fragment2.bytes.pack('C*')) }
52
-
53
- {
54
- 'powershell' => {
55
- keepalive_template_path: 'get_powershell_keepalive_response.xml.erb',
56
- config: "<a xmlns:cfg='f'><cfg:MaxEnvelopeSizekb>" \
57
- '<%= max_envelope_size_kb %></cfg:MaxEnvelopeSizekb></a>',
58
- command: "<a xmlns:rsp='foo'><rsp:CommandId><%= command_id %></rsp:CommandId></a>"
59
- },
60
- 'omi' => {
61
- keepalive_template_path: 'get_omi_powershell_keepalive_response.xml.erb',
62
- config: File.read('tests/spec/stubs/responses/get_omi_config_response.xml'),
63
- command: "<p:CommandResponse xmlns:p='foo'><p:CommandId>" \
64
- '<%= command_id %></p:CommandId></p:CommandResponse>'
65
- }
66
- }.each_pair do |server_type, response|
67
- context "with server type #{server_type}" do
68
- let(:command_response) { ERB.new(response[:command]).result(binding) }
69
-
70
- before do
71
- config_response = ERB.new(response[:config]).result(binding)
72
- test_data_xml_template = ERB.new(stubbed_response(response[:keepalive_template_path]))
73
-
74
- allow(SecureRandom).to receive(:uuid).and_return(command_id)
75
- allow(subject).to receive(:command_output_message)
76
- .with(shell_id, command_id)
77
- .and_return(output_message)
78
- allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
79
- .and_return(command_payload)
80
- allow_any_instance_of(WinRM::WSMV::CloseShell).to receive(:build)
81
- .and_return(close_shell_payload)
82
- allow_any_instance_of(WinRM::WSMV::InitRunspacePool).to receive(:build)
83
- .and_return(create_shell_payload)
84
- allow_any_instance_of(WinRM::WSMV::Configuration).to receive(:build)
85
- .and_return(configuration_payload)
86
- allow_any_instance_of(WinRM::WSMV::CleanupCommand).to receive(:build)
87
- .and_return(cleanup_payload)
88
- allow_any_instance_of(WinRM::WSMV::KeepAlive).to receive(:build)
89
- .and_return(keepalive_payload)
90
- allow_any_instance_of(WinRM::PSRP::ReceiveResponseReader).to receive(:read_output)
91
- .with(output_message).and_return(output)
92
- allow(transport).to receive(:send_request).with(configuration_payload) do |_|
93
- # parse real XML with ResponseHandler to raise WinRMSoapFault
94
- WinRM::ResponseHandler.new(config_response, 500).parse_to_xml if server_type == 'omi'
95
- REXML::Document.new(config_response)
96
- end
97
- allow(transport).to receive(:send_request)
98
- .with(create_shell_payload)
99
- .and_return(REXML::Document.new("<blah Name='ShellId'>#{shell_id}</blah>"))
100
- allow(transport).to receive(:send_request)
101
- .with(command_payload)
102
- .and_return(REXML::Document.new(command_response))
103
- allow(transport).to receive(:send_request)
104
- .with(keepalive_payload)
105
- .and_return(REXML::Document.new(test_data_xml_template.result(binding)))
106
- end
107
-
108
- subject { described_class.new(connection_options, transport, Logging.logger['test']) }
109
-
110
- describe '#run' do
111
- it 'opens a shell and gets shell id' do
112
- subject.run(command)
113
- expect(subject.shell_id).to eq shell_id
114
- end
115
-
116
- it 'sends create shell through transport' do
117
- expect(transport).to receive(:send_request).with(create_shell_payload)
118
- subject.run(command)
119
- end
120
-
121
- it 'sends keepalive shell through transport' do
122
- expect(transport).to receive(:send_request).with(keepalive_payload)
123
- subject.run(command)
124
- end
125
-
126
- it 'returns output from generated command' do
127
- expect(subject.run(command)).to eq output
128
- end
129
-
130
- it 'sends command through transport' do
131
- expect(transport).to receive(:send_request).with(command_payload)
132
- subject.run(command)
133
- end
134
-
135
- it 'sends cleanup message through transport' do
136
- expect(transport).to receive(:send_request).with(cleanup_payload)
137
- subject.run(command)
138
- end
139
-
140
- # OMI server doesn't respond to configuration so these tests are irrelevant there
141
- context 'non admin user', if: server_type == 'powershell' do
142
- before do
143
- allow(transport).to receive(:send_request)
144
- .with(configuration_payload)
145
- .and_raise(WinRM::WinRMWSManFault.new('no access for you', '5'))
146
- end
147
-
148
- context 'protocol version 2.1' do
149
- let(:protocol_version) { 2.1 }
150
- let(:command) { 'c' * 200000 }
151
-
152
- it 'sets the fragmenter max_blob_length' do
153
- expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
154
- .with(153600)
155
- subject.run(command)
156
- end
157
-
158
- it 'fragments messages smaller than max envelope size' do
159
- allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
160
- .and_call_original
161
- allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
162
- expect(payload.length).to eq 206512
163
- end.and_return(REXML::Document.new(command_response))
164
- subject.run(command)
165
- end
166
- end
167
-
168
- context 'protocol version 2.2' do
169
- let(:protocol_version) { 2.2 }
170
- let(:command) { 'c' * 200000 }
171
-
172
- it 'sets the fragmenter max_blob_length' do
173
- expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
174
- .with(512000)
175
- subject.run(command)
176
- end
177
-
178
- it 'fragments messages smaller than max envelope size' do
179
- allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
180
- .and_call_original
181
- allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
182
- expect(payload.length).to eq 276028
183
- end.and_return(REXML::Document.new(command_response))
184
- subject.run(command)
185
- end
186
- end
187
- end
188
-
189
- context 'fragment large command' do
190
- let(:command) { 'c' * 200000 }
191
-
192
- it 'fragments messages as large as max envelope size' do
193
- allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build).and_call_original
194
- allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
195
- fallback = subject.max_fragment_blob_size ==
196
- WinRM::PSRP::MessageFragmenter::DEFAULT_BLOB_LENGTH
197
- # OMI server uses default blob size b/c config endpoint unavailable
198
- expect(payload.length).to eq fallback ? 45404 : max_envelope_size_kb * 1024
199
- end.and_return(REXML::Document.new(command_response))
200
- subject.run(command)
201
- end
202
- end
203
- end
204
-
205
- describe '#close' do
206
- it 'sends close shell through transport' do
207
- subject.run(command)
208
- expect(transport).to receive(:send_request).with(close_shell_payload)
209
- subject.close
210
- end
211
-
212
- it 'creates a shell closer with powershell uri' do
213
- allow(WinRM::WSMV::CloseShell).to receive(:new) do |_, opts|
214
- expect(opts[:shell_uri]).to be WinRM::WSMV::Header::RESOURCE_URI_POWERSHELL
215
- end.and_call_original
216
- subject.close
217
- end
218
- end
219
- end
220
- end
221
- end
@@ -1,46 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler/setup'
3
- require 'winrm'
4
- require 'json'
5
- require_relative '../matchers'
6
-
7
- # Unit test spec helper
8
- module SpecUnitHelper
9
- def stubbed_response(file)
10
- File.read("tests/spec/stubs/responses/#{file}")
11
- end
12
-
13
- def stubbed_clixml(file)
14
- File.read("tests/spec/stubs/clixml/#{file}")
15
- end
16
-
17
- def default_connection_opts
18
- {
19
- user: 'Administrator',
20
- password: 'password',
21
- endpoint: 'http://localhost:5985/wsman',
22
- max_envelope_size: 153600,
23
- session_id: '05A2622B-B842-4EB8-8A78-0225C8A993DF',
24
- operation_timeout: 60,
25
- locale: 'en-US'
26
- }
27
- end
28
- end
29
-
30
- # Strip leading whitespace from each line that is the same as the
31
- # amount of whitespace on the first line of the string.
32
- # Leaves _additional_ indentation on later lines intact.
33
- # and remove newlines.
34
- class String
35
- def unindent
36
- gsub(/^#{self[/\A[ \t]*/]}/, '').delete("\n")
37
- end
38
-
39
- def to_byte_string
40
- force_encoding(Encoding::ASCII_8BIT)
41
- end
42
- end
43
-
44
- RSpec.configure do |config|
45
- config.include(SpecUnitHelper)
46
- end
@@ -1,84 +0,0 @@
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 +0,0 @@
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>