Search notes:

PowerShell: -as operator

The -as operator casts a value into a different type.
123.45 -as [int]                     # 123
 "42"            +  "13"             # 4213
("42" -as [int]) + ("13" -as [int])  # 55
Github repository about-PowerShell, path: /language/operator/as.ps1

Casting strings to types

'system.int32' -as [type]

See also

A value can also be cast into another type by prepending the type before it:
[int]0x40
operators

Index