The only method I have found is a direct cast:
> $numberAsString = \"10\" > [int]$numberAsString 10
Is this the standard approach in
I'd probably do something like that :
[int]::Parse("35")
But I'm not really a Powershell guy. It uses the static Parse method from System.Int32. It should throw an exception if the string can't be parsed.