June 22, 2012

.Net framework formating Type for the format operator (-f)

The powershell format operator (-f) let’s you format string using the .NET string object format method. To use this method you have to use a “FormatString” whith a special syntax.

Ex : "{0:yyMMdd}" -f (Get-Date)

You will find bellow somes references in MSDN to various FormatString you can use in your Formating Types :

No comments:

Post a Comment