Office-365-Extractor icon indicating copy to clipboard operation
Office-365-Extractor copied to clipboard

Error: "Input string was not in a correct format."

Open oXydus opened this issue 3 years ago • 0 comments

if ($AmountResults) { $number = $AmountResults.tostring().split(":")[1] $script:integer = [int]$number

Third line is generating error like this: InvalidArgument: C:\Temp\Office365_Extractor.ps1:XXX Line | XXX | $script:integer = [int]$number | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot convert value " YYY" to type "System.Int32". Error: "Input string was not in a correct | format."

I'm using Powershell 7.2.1

oXydus avatar Jan 22 '22 06:01 oXydus