windows - 使用powershell查找设置为唤醒电脑的计划任务

标签 windows powershell windows-8.1

我已经下载了位于此处的 powershell 脚本:http://gallery.technet.microsoft.com/scriptcenter/Get-Scheduled-tasks-from-3a377294

但是,这并没有提供我正在寻找的信息。我想看看是否有任何任务设置为唤醒电脑以运行该任务。我看到它在脚本中的哪个位置循环显示每个任务的属性。但我不熟悉使用 powershell 或 Schedule.Service 对象,所以我不知道那是什么属性。有人可以告诉我一种方法来获取设置为唤醒电脑的任务列表吗?或者只是告诉我如何编辑该脚本以显示该信息。

谢谢

最佳答案

这可以在一行中完成:

Get-ScheduledTask | where {$_.settings.waketorun}

Get-ScheduledTask 是 available在 Windows 8.1、Windows PowerShell 4.0、Windows Server 2012 R2 中。

关于windows - 使用powershell查找设置为唤醒电脑的计划任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20529169/

相关文章:

c# - Windows 8 应用程序 XAML 中的持久导航栏

c++ - 如何在 Windows 中捕获 HDR 帧缓冲区?

windows - Nano 服务器上的 Powershell 5 输出

azure - 当我尝试将字符串作为参数传递给 Azure 自定义脚本扩展中的 powershell 函数时,出现 "Invalid array passed in..."

mysql - 从表A到表B的触发器ID

c# - 计算水平偏移以将 ListView 滚动到 SelectedItem 的中心

linux - 使用powershell区分linux和windows机器

Windows 批处理文件 : PID of last process?

windows - Powershell - 关联/导入证书与 RD 网关

java - Maven 全新安装失败 [索引路径中存在非法字符]