Werbung

Herkunft

Kurzinformation

Gets tasks scheduled on the computer

Syntax

<# .Synopsis Gets tasks scheduled on the computer .Description Gets scheduled tasks that are registered on a computer .Example Get-ScheduleTask -Recurse #> param( # The name or name pattern of the scheduled task [Parameter()] $Name = "*", # The folder the scheduled task is in [Parameter()] [String[]] $Folder = "", # If this is set, hidden tasks will also be shown. # By default, only tasks that are not marked by Task Scheduler as hidden are shown. [Switch] $Hidden, # The name of the computer to connect to. $ComputerName, # The credential used to connect [Management.Automation.PSCredential] $Credential, # If set, will get tasks recursively beneath the specified folder [switch] $Recurse ) process { $scheduler = Connect-ToTaskScheduler -ComputerName $ComputerName -Credential $Credential $taskFolder = $scheduler.GetFolder($folder) $taskFolder.GetTasks($Hidden -as [bool]) | Where-Object { $_.Name -like $name } if ($Recurse) { $taskFolder.GetFolders(0) | ForEach-Object { $psBoundParameters.Folder = $_.Path Get-ScheduledTask @psBoundParameters } } }

Beschreibung

Gets scheduled tasks that are registered on a computer

Links

Liste aller Commandlets Mehr über die Windows PowerShell

Bücher zur PowerShell

Buchcover Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe) Windows PowerShell 5.0 - Das Praxishandbuch (1. Auflage 2016/5. Auflage Gesamtreihe)
Autoren: Dr. Holger Schwichtenberg
erschienen 2016, 996 Seiten, 49,99 €
ISBN: 3446446435
Bestellung: Amazon.de oder im Buchhandel über ISBN 3446446435

Schulungen/Seminare

Offene Seminare zur PowerShell
In-House-Seminare zur PowerShell