Added console app version of powershell script as codebetter PS is < v3