Hello - I’m new to the forum, as well as Powershell. For the most part I’ve gotten through the script, but for some reason it now throws an error that I hadn’t seen before.
Errors:
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1712 char:7
+ $intErrors = [int]$_.Errors
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1729 char:7
+ $intWarnings = [int]$_.Warnings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1712 char:7
+ $intErrors = [int]$_.Errors
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1729 char:7
+ $intWarnings = [int]$_.Warnings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1712 char:7
+ $intErrors = [int]$_.Errors
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Cannot convert value "Not collected" to type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\a-ckrafcky\Desktop\SystemStatus\SystemStatus.ps1:1729 char:7
+ $intWarnings = [int]$_.Warnings
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
If the whole code is required, what is the allowed format to get it into the post?