You are not logged in.
Pages: 1
Hi, i have a simple function like this:
function Test-A{
$out = [pscustomobject]@{
Name = "Test"
Value = "1"
Value1 = "1"
Value2 = "1"
}
$out
}
Test-A
$out is formatted as a table by default. But I prefer the list format. Also the output should follow the pipline unformatted for further processing. I can't use $out | fl, because the output format should be affected from outside the function. E.g. test-a | ft or test-a | out-gridview. This would be in conflict with fl within the function.
If there are more than five properties, the output automatically changes to list form. However, I have fewer properties. Can I change the default output format to the list format myself?
thanks a lot
best regards
Offline
Here's a worked example of setting the Default Property Display
https://learn-powershell.net/2013/08/03 … m-objects/
Offline
Pages: 1