Since this topic never received a verified solution, I can offer a simple solution to the two issues I see you asked solutions for.
The string class offers a replace method for the string object you want to update:
Example:
$myString = $myString.replace(".","")
The system.int32 class (or simply [int] in powershell) has a method available called "TryParse" which will not only pass back a boolean indicating whether the string is an integer, but will also return the value of the integer into an existing variable by reference if it returns true.
Example:
[string]$convertedInt = "1500"
[int]$returnedInt = 0
[bool]$result = [int]::TryParse($convertedInt, [ref]$returnedInt)
I hope this addresses the issue you initially brought up in your question.