Misc-PowerShell-Stuff icon indicating copy to clipboard operation
Misc-PowerShell-Stuff copied to clipboard

Get-Mattifestation is broken

Open jaredhaight opened this issue 8 years ago • 0 comments

I'm trying to figure out what my mattifestation count is, but the script is broken. Error out put is below, I took the try catch out to get the actual error.

PS C:\Users\Jared\Desktop> Get-Mattifestation -Handle jaredhaight
Cannot convert value "," to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\Jared\Desktop\Get-Mattifestation.ps1:34 char:17
+                 [int]$Mattifestation = $Matches[1]
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

Cannot convert value "," to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\Jared\Desktop\Get-Mattifestation.ps1:40 char:13
+             [int]$User = $Matches[1]
+             ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

Attempted to divide by zero.
At C:\Users\Jared\Desktop\Get-Mattifestation.ps1:43 char:9
+         $Properties = @{
+         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], RuntimeException
    + FullyQualifiedErrorId : RuntimeException

jaredhaight avatar Feb 16 '17 18:02 jaredhaight