How to run PowerShell in CMD

后端 未结 3 674
抹茶落季
抹茶落季 2020-12-05 04:16

I\'m trying to run a PowerShell script inside cmd command line. Someone gave me an example and it worked:

powershell.exe -noexit \"& \'c:\\Data\\Schedule         


        
3条回答
  •  感情败类
    2020-12-05 04:34

    Try just:

    powershell.exe -noexit D:\Work\SQLExecutor.ps1 -gettedServerName "MY-PC"
    

提交回复
热议问题