Substring In Powershell Script Generator