How can I run a powershell script as a background task without displaying a window?

前端 未结 2 606
攒了一身酷
攒了一身酷 2020-12-28 16:30

I\'m working on creating a script that will fire off performance counters and store them in a .csv file, rolling over when the file gets too big. Running the script from a p

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 17:16

    try this from a DOS/CMD shell:

    powershell.exe -windowstyle hidden -file C:\iis_test.ps1
    

提交回复
热议问题