The following attached are my source files, all are working fine when I run them individually until like the below example…
Get-Service DNS* | Start-Service.
Among the attached files you can see Get-ScheduledTask and Start-ScheduledTask, all my requirement is to combine (by pipe line (|)) both Get-XXX and Start-XXX (I need vice versa) but I am in vain to change the required parameters accordingly. I am always failing in this spot. Could someone correct the Get and Start (if .ps1xml) coding and revert me.
Attached Files info:
- Get-ScheduledTask - Get the scheduled tasks information on a given computer.
- Start-ScheduledTask - Starts the given scheduled task
- Format_SchTsks.ps1xml - FormatData for Get-ScheduledTask command.