********************** Windows PowerShell transcript start Start time: 20180819163931 Username: BAT\bat RunAs User: BAT\bat Configuration Name: Machine: BAT (Microsoft Windows NT 10.0.16299.0) Host Application: powershell -executionpolicy bypass C:\jr-hqp\jrexp.ps1 Process ID: 8008 PSVersion: 5.1.16299.547 PSEdition: Desktop PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.16299.547 BuildVersion: 10.0.16299.547 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1 ********************** Transcript started, output file is C:\jr-hqp\log.text Exception calling "Substring" with "1" argument(s): "StartIndex cannot be less than zero. Parameter name: startIndex" At C:\jr-hqp\jrexp.ps1:101 char:1 + $sub = $correctfile.Substring($filename.IndexOf(":\", $correctfile.I ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentOutOfRangeException Exception calling "Substring" with "1" argument(s): "StartIndex cannot be less than zero. Parameter name: startIndex" At C:\jr-hqp\jrexp.ps1:101 char:1 + $sub = $correctfile.Substring($filename.IndexOf(":\", $correctfile.I ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ArgumentOutOfRangeException PS>$global:? True ********************** Windows PowerShell transcript end End time: 20180819163935 **********************