File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,17 +74,17 @@ Setup-ScheduledTask -DefinitionFile "C:\path\to\definition.ps1"
7474# Via .json definition file
7575Setup-ScheduledTask -DefinitionFile "C:\path\to\definition.json" -AsJson
7676
77- # Via directory containing .ps1 definition files
77+ # Via directory containing .ps1 definition file(s)
7878Setup-ScheduledTask -DefinitionDirectory "C:\path\to\definition\directory\"
7979
80- # Via directory containing .json definition files
80+ # Via directory containing .json definition file(s)
8181Setup-ScheduledTask -DefinitionDirectory "C:\path\to\definition\directory\" -AsJson
8282
8383# Via definition object(s)
8484$tasks = . "C:\path\to\definition.ps1" # From .ps1 definition file
8585$tasks = Get-Content "C:\path\to\definition.json" | ConvertFrom-Json | % { $_ } # From .json definition file
86- $tasks = Get-ChildItem "C:\path\to\definition\directory\" -File | ? { $_.Extension -eq '.ps1' } | % { . $_.FullName } # From multiple .ps1 definition files
87- $tasks = Get-ChildItem "C:\path\to\definition\directory\" -File | ? { $_.Extension -eq '.json' } | % { Get-Content $_.FullName | ConvertFrom-Json | % { $_ } } # From multiple .json definition files
86+ $tasks = Get-ChildItem "C:\path\to\definition\directory\" -File | ? { $_.Extension -eq '.ps1' } | % { . $_.FullName } # From directory containing .ps1 definition file(s)
87+ $tasks = Get-ChildItem "C:\path\to\definition\directory\" -File | ? { $_.Extension -eq '.json' } | % { Get-Content $_.FullName | ConvertFrom-Json | % { $_ } } # From directory containing .json definition file(s)
8888## Via parameter
8989Setup-ScheduledTask -DefinitionObject $tasks
9090## Via pipeline
You can’t perform that action at this time.
0 commit comments