powershell - Add a new blank like in PSObject -
powershell - Add a new blank like in PSObject -
this works want add together new blank line after each line, `n
$objaverage = new-object psobject $objaverage | add-member noteproperty -name firstname-value $firstname $objaverage | add-member noteproperty -name lastname -value $lastname $objaverage | add-member noteproperty -name office -value $office $objaverage | fl
thanks in advance
you append linefeeds strings using .net's environment.newline property so,
$objaverage = new-object psobject $objaverage | add-member noteproperty -name firstname -value $("winston"+[environment]::newline) $objaverage | add-member noteproperty -name lastname -value $("smith"+[environment]::newline) $objaverage | add-member noteproperty -name office -value $("room 101"+[environment]::newline) $objaverage | fl # output: firstname : winston lastname : smith office : room 101 ps c:\>
powershell
Comments
Post a Comment