, , , , Write-Host , . . , , Write-Host Write-Output , , , , Write-Verbose / Write-Warning.
, , , -OutVariable ().
, , .
function print-with-tab {
[cmdletbinding()]
Param()
Write-Host "HostFoo`t`t`tHostBar"
Write-Output "OutFoo`t`t`tOutBar"
Write-Warning "You have been warned."
}
print-with-tab -OutVariable outvar -WarningVariable warnvar
Write-Output "Out -->"
$outvar
$outvar -replace "`t", "-"
Write-Output "Warn -->"
$warnvar
HostFoo HostBar
OutFoo OutBar
WARNING: You have been warned.
Out -->
OutFoo OutBar
OutFoo---OutBar
Warn -->
You have been warned.
, , ( , ), , 4 , , . , , Write-Host ... .
, , - :
$objectsToProcess += $inputObject -replace " ", "`t"