en-US/CodeOwls.PowerShell.ScriptCS.dll-help.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<helpItems schema="maml">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
    <command:details>
      <command:name>Invoke-ScriptCS</command:name>
      <maml:description>
        <maml:para>Invoke-ScriptCS [-Script] &lt;String&gt; [-Input &lt;Object[]&gt;] [-References &lt;String[]&gt;] [-Namespaces &lt;String[]&gt;] [-Verbose] [-Debug] [-ErrorAction &lt;ActionPreference&gt;] [-WarningAction &lt;ActionPreference&gt;] [-ErrorVariable &lt;String&gt;] [-WarningVariable &lt;String&gt;] [-OutVariable &lt;String&gt;] [-OutBuffer &lt;Int32&gt;]
</maml:para>
      </maml:description>
      <maml:copyright>
        <maml:para />
      </maml:copyright>
      <command:verb>Invoke</command:verb>
      <command:noun>ScriptCS</command:noun>
      <dev:version />
    </command:details>
    <maml:description>
      <maml:para>Executes ScriptCS code as part of the pipeline.</maml:para>
      <maml:para>The ScriptCS code is evaluated once for each input object pipes to the Invoke-ScriptCS cmdlet. Pipeline input is available in the ScriptCS code using the Input property of the automatic variable "pscmdlet". This Input property is always of type object[].</maml:para>
      <maml:para>The ScriptCS code is evaluated once for each input object pipes to the Invoke-ScriptCS cmdlet. Pipeline input, as well as most methods and properties of the cmdlet iteself, can be access from the ScriptCS code using the variable named "pscmdlet". This ScriptCS variable is equivalent to the $pscmdlet PowerShell variable available in advanced functions.</maml:para>
      <maml:para>Any objects returned by the ScriptCS code are written to the current pipeline. In addition, you can use the pscmdlet.WriteObject method from your ScriptCS code to write objects to the pipeline in a piecemeal fashion.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <command:name>Invoke-ScriptCS</command:name>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="">
          <maml:name>Input</maml:name>
          <maml:description>
            <maml:para>The input to supply to the ScriptCS script. These objects are available in the ScriptCS code from the pscmdlet.Input property.</maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.Object[]</command:parameterValue>
        </command:parameter>
        <command:parameter required="True" variableLength="false" globbing="false" pipelineInput="false" position="0">
          <maml:name>Script</maml:name>
          <maml:description>
            <maml:para>The ScriptCS script.</maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>References</maml:name>
          <maml:description>
            <maml:para>The list of assembly references, specified as assembly names and/or locations. If unspecified, defaults to "System", "System.Core", "System.Data", "System.Data.DataSetExtensions", "System.Xml", "System.Xml.Linq"</maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.String[]</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>Namespaces</maml:name>
          <maml:description>
            <maml:para>The list of default namespaces to import. If unspecified, defaults to "System", "System.Collections.Generic", "System.Linq", "System.Text", "System.Threading.Tasks"</maml:para></maml:description>
          <command:parameterValue required="True" variableLength="false">System.String[]</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>Verbose</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>Debug</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>ErrorAction</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="False" variableLength="false">SilentlyContinue | Stop | Continue | Inquire</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>WarningAction</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="False" variableLength="false">SilentlyContinue | Stop | Continue | Inquire</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>ErrorVariable</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>WarningVariable</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>OutVariable</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        </command:parameter>
        <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
          <maml:name>OutBuffer</maml:name>
          <maml:description>
            <maml:para></maml:para>
          </maml:description>
          <command:parameterValue required="True" variableLength="false">System.Int32</command:parameterValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="">
        <maml:name>Input</maml:name>
        <maml:description>
          <maml:para>The input to supply to the ScriptCS script. These objects are available in the ScriptCS code from the pscmdlet.Input property.</maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.Object[]</command:parameterValue>
        <dev:type>
          <maml:name>Object[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="True" variableLength="false" globbing="false" pipelineInput="false" position="0">
        <maml:name>Script</maml:name>
        <maml:description>
          <maml:para>The ScriptCS script.</maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>References</maml:name>
        <maml:description>
          <maml:para>The list of assembly references, specified as assembly names and/or locations. If unspecified, defaults to "System", "System.Core", "System.Data", "System.Data.DataSetExtensions", "System.Xml", "System.Xml.Linq"</maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>Namespaces</maml:name>
        <maml:description>
            <maml:para>The list of default namespaces to import. If unspecified, defaults to "System", "System.Collections.Generic", "System.Linq", "System.Text", "System.Threading.Tasks"</maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>Verbose</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>Debug</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>ErrorAction</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="False" variableLength="false">System.Management.Automation.ActionPreference</command:parameterValue>
        <dev:type>
          <maml:name>ActionPreference</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="False" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>WarningAction</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="False" variableLength="false">System.Management.Automation.ActionPreference</command:parameterValue>
        <dev:type>
          <maml:name>ActionPreference</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>ErrorVariable</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>WarningVariable</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>OutVariable</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
      <command:parameter required="" variableLength="false" globbing="false" pipelineInput="false" position="">
        <maml:name>OutBuffer</maml:name>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
        <command:parameterValue required="True" variableLength="false">System.Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue />
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
          <maml:description>
            <maml:para>You can pipe objects to Invoke-ScriptCS. These objects will be available from ScriptCS in the pscmdlet.Input property.</maml:para>
          </maml:description>
        </dev:type>
        <maml:description />
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
          <maml:description>
            <maml:para>Any object returned from the ScriptCS code is written to the pipeline.</maml:para>
          </maml:description>
        </dev:type>
        <maml:description />
      </command:returnValue>
    </command:returnValues>
    <command:terminatingErrors />
    <command:nonTerminatingErrors />
    <maml:alertSet>
      <maml:title />
      <maml:alert>
        <maml:para />
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
          <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
          <maml:introduction>
            <maml:para>C:\PS&gt;</maml:para>
          </maml:introduction>
          <dev:code>Invoke-ScriptCS -Script '"Hello PowerShell " + "from " + "ScriptCS!"';</dev:code>
          <dev:remarks>
            <maml:para>Uses ScriptCS to concatenate a string.</maml:para>
            <maml:para />
            <maml:para />
            <maml:para />
            <maml:para />
          </dev:remarks>
          <command:commandLines>
            <command:commandLine>
              <command:commandText />
            </command:commandLine>
          </command:commandLines>
        </command:example>
        <command:example>
          <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
          <maml:introduction>
            <maml:para>C:\PS&gt;</maml:para>
          </maml:introduction>
          <dev:code>0..9 | Invoke-ScriptCS "pscmdlet.Input"</dev:code>
          <dev:remarks>
            <maml:para>This example demonstrates how to access pipeline input from ScriptCS.</maml:para>
            <maml:para>The pscmdlet object instance is defined automatically by the ScriptCS PowerShell module. The Input property of pscmdlet is an object[] that contains the current pipeline contents.</maml:para>
            <maml:para />
            <maml:para />
            <maml:para />
          </dev:remarks>
          <command:commandLines>
            <command:commandLine>
              <command:commandText />
            </command:commandLine>
          </command:commandLines>
        </command:example>
        <command:example>
          <maml:title>-------------- EXAMPLE 3 --------------</maml:title>
          <maml:introduction>
            <maml:para>C:\PS&gt;</maml:para>
          </maml:introduction>
          <dev:code>0..9 | Invoke-ScriptCS "pscmdlet.WriteVerbose( pscmdlet.Input[0] )"</dev:code>
          <dev:remarks>
            <maml:para>This example demonstrates how to access pscmdlet methods and properties from ScriptCS.</maml:para>
            <maml:para>The pscmdlet object instance is defined automatically by the ScriptCS PowerShell module. This object is equivalent to the $pscmdlet object available in advanced PowerShell functions.</maml:para>
            <maml:para />
            <maml:para />
            <maml:para />
          </dev:remarks>
          <command:commandLines>
            <command:commandLine>
              <command:commandText />
            </command:commandLine>
          </command:commandLines>
        </command:example>
        <command:example>
          <maml:title>-------------- EXAMPLE 4 --------------</maml:title>
          <maml:introduction>
            <maml:para>C:\PS&gt;</maml:para>
          </maml:introduction>
          <dev:code>Invoke-ScriptCS "DateTime.Now" | get-member</dev:code>
          <dev:remarks>
            <maml:para>This example demonstrates how to write objects to the pipeline from ScriptCS.</maml:para>
            <maml:para>Any objects returned from Invoke-ScriptCS are written to the pipeline. In addition, you can use the pscmdlet.WriteObject method to place output on the pipeline.</maml:para>
            <maml:para />
            <maml:para />
            <maml:para />
          </dev:remarks>
          <command:commandLines>
            <command:commandLine>
              <command:commandText />
            </command:commandLine>
          </command:commandLines>
        </command:example>
    </command:examples>
    <maml:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Invoke-ScriptCS</maml:linkText>
        <maml:uri />
      </maml:navigationLink>
    </maml:relatedLinks>
  </command:command>
</helpItems>