SyntaxFix
Write A Post
Hire A Developer
Questions
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.