• I use to call this powershell script via batch file.

    Here is the code for the batch file

    @echo off

    powershell -executionpolicy bypass -File C:\Users\mayank\Documents\Powershell\SqlMisc.ps1

    pause

    Just change the path for the powershell script