CInt
Definition: Returns an expression that has been converted to
a
Variantof subtype
Integer.
Need to convert a value to the integer data type? No problem: not only will Windows PowerShell make the conversion for you, but it will also round the value off to the nearest whole number. (Some languages convert a value to an integer simply by stripping off the decimal point.) The following two commands assign a string value to the variable $a, then convert the data type of $ a tointeger: