how to run powershell script through excel VBA how to run powershell script through excel VBA powershell powershell

how to run powershell script through excel VBA


If your file path has spaces you need to put quotes around it.

x = Shell("POWERSHELL.exe -noexit " & _           """H:\Operations\REPORTS\Reports2018\Balance Sheet\SLmarginJE.ps1""", 1)