Search

Search

powershell

String Formatting

TypeExampleOutputNotes
Formatting Switch'select {0} from sys.tables' -f 'name'select name from sys.tablesSame concept as .NET [string]::Format(). Token based replacement
.NET String Format[string]::Format('select {0} from sys.tables','name')select name from sys.tablesWhy would you do this? Because you want to showoff your .NET chops?

Math & Number Conversions

FromToExampleOutputNotes
scientific notationDecimal2.19095E+08 / 1MB208.945274353027 MBNative PowerShell, supports 1MB, 1KB, 1GB