我正在尝试使用 Power shell 导出任务计划程序库下的任务计划程序作业。
但是当我尝试运行脚本时,它会显示我的机器上的所有任务,我不想将所有这些任务导出到文件中,只需要任务计划程序库下的任务。
"ScheduledTasks"
schtasks.exe /query /V /FO CSV | ConvertFrom-Csv
输出
HostName : XXXXXXXXX
TaskName : \Mozilla\Firefox Default Browser Agent
308046B0AF4A39CB
Next Run Time : 25-06-2021 18:03:40
Status : Ready
Logon Mode : Interactive only
Last Run Time : 24-06-2021 18:03:41
Last Result : 0
Author : Mozilla
Task To Run : C:\Program Files\Mozilla
Firefox\default-browser-agent.exe
do-task 308046B0AF4A39CB""
Start In : N/A
Comment : The Default Browser Agent task checks
when the default changes from Firefox
to another browser. If the change
happens under suspicious circumstances,
it will prompt users to change back to
Firefox no more than two times. This
task is installed automatic
Scheduled Task State : Enabled
Idle Time : Disabled
Power Management :
Run As User : XXXX
Delete Task If Not Rescheduled : Disabled
Stop Task If Runs X Hours and X Mins : 00:35:00
Schedule : Scheduling data is not available in
this format.
Schedule Type : Daily
Start Time : 18:03:40
Start Date : 21-06-2021
End Date : N/A
Days : Every 1 day(s)
Months : N/A
Repeat: Every : Disabled
Repeat: Until: Time : Disabled
Repeat: Until: Duration : Disabled
Repeat: Stop If Still Running : Disabled
提前致谢