Updated powershell file based on execution findings.

@sryabkov @junshao Please review

Changes:

1. Added logic to check Powershell version
2. Added two optional parameters to use SQL authentication, if specified
3. Added logic to log and continue execution in case of error