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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -