$f1 = [pscustomobject]@{
field1 = 'f1'
}
$f2 = @(
[pscustomobject]@{
field1 = 'f11'
field2 = 'f21'
}
[pscustomobject]@{
field2 = 'f22'
}
[pscustomobject]@{
field2 = 'f23'
}
)
$f1 #| out-host
#'aaa' | out-host
'bbb' | format-list
'ccc'
$a = read-host
#$f2
#$f2 | %{ $_ }
$f2 | out-host
'ddd'
$f1=...
и $f2=...
добавить dir d:\
, внезапно выводится всё. даже без | out-host
NAME
Start-Process
...
OUTPUTS
None, System.Diagnostics.Process
This cmdlet generates a System.Diagnostics.Process object, if you specify the PassThru parameter. Otherwise, this cmdlet does not return any output.
$version = & docker version
Verified: Signed
Signing date: 20:56 13.01.2017
Publisher: Microsoft Corporation
Company: n/a
Description: n/a
Product: n/a
Prod version: n/a
File version: n/a
MachineType: n/a
$argument1 = '-noprofile -command "Start-Process powershell.exe -Verb RunAs"'
$argument1 = '-noprofile -command "Start-Process powershell.exe -Verb RunAs -ArgumentList scriptName.ps1 "'