.NET Types in PowerShell

say it: “DOT net TYPES in POW-er-shel” /ˈdɑt nɛt ˈtaɪps ɪn ˈpaʊərˌʃɛl/

Using .NET types directly, with `[TypeName]::Member` syntax.

What does .NET Types in PowerShell do?

PowerShell is built on .NET, so you can use any .NET type directly with [TypeName]::Member syntax.

[System.IO.Path]::GetExtension('photo.jpg')   # .jpg
[Math]::Round(3.14159, 2)                      # 3.14
[guid]::NewGuid()

Level: Master · More PowerShell terms at this level

Updated