Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

Write-Host with formated number called from cmd

$
0
0

Hi all,

I'm new in PowerShell and I try to display formated number from cmd.

Into PowerShell the following command works fine:

PS E:\> Write-Host ("{0:N0}" -f 123456789 )
123 456 789

but when I try the following from cmd, it doesn't work:

E:\>PowerShell -Command "&{Write-Host (("{0:N0}" -f 123456789 ))}"
0:N0

 

Thank you for your help.

Olivier.

 

 


Viewing all articles
Browse latest Browse all 8583

Trending Articles