Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Latest commit

 

History

History
152 lines (102 loc) · 3 KB

Save-MyTask.md

File metadata and controls

152 lines (102 loc) · 3 KB
external help file Module Name online version schema
MyTasks-help.xml
MyTasks
2.0.0

Save-MyTask

SYNOPSIS

Archive completed or other tasks to a new file.

SYNTAX

Save-MyTask [[-Path] <String>] [-Task <MyTask[]>] [-Passthru] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

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.

EXAMPLES

EXAMPLE 1

PS C:\> Archive-MyTask

Using the alias, archive all completed tasks to myTaskArchive.xml.

EXAMPLE 2

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.

PARAMETERS

-Passthru

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

-Path

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

-Task

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

-Confirm

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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).

INPUTS

MyTask[]

OUTPUTS

None

NOTES

Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/

RELATED LINKS

Get-MyTask

Complete-MyTask

Get-MyTaskArchive