PowerShell script updates

Updated the powershell script. It now supports parameters and also validates them