How to convert string to integer in PowerShell
You can specify the type of a variable before it to force its type. It’s called (dynamic) casting (more information is here): As an example, the following snippet adds, to each object in $fileList, an IntVal property with the integer value of the Name property, then sorts $fileList on this new property (the default is … Read more