external help file | Module Name | online version | schema |
---|---|---|---|
MyTasks-help.xml |
MyTasks |
2.0.0 |
Archive completed or other tasks to a new file.
Save-MyTask [[-Path] <String>] [-Task <MyTask[]>] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]
Use this command to archive or save MyTask items to a new XML file. They will be removed from the active XML source file. When you run the command by default all completed tasks will be removed from the tasks XML file and stored in a file called myTasksArchive.xml in the user's documents folder. You also have the option of archiving specific tasks. This will move the task to the new file in its current state. See examples.
This command has an alias of Archive-MyTask.
PS C:\> Archive-MyTask
Using the alias, archive all completed tasks to myTaskArchive.xml.
PS C:\> Get-MyTask -Category other | Save-MyTask -Path c:\work\myOther.xml -Passthru
Directory: C:\work
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 8/23/2020 9:55 AM 833 myOther.xml
Get all tasks in the Other category and save them to a new file. The tasks will be removed from the source file.
Write the saved task to the pipeline.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path to a new XML file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A MyTask object.
Type: MyTask[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/