# Add-OfficeProjectTask

Adds a task or summary with a duration expressed in working days.

Cmdlet 

Aliases: ProjectTask

**Module**

`PSWriteOffice`

**Aliases**

`ProjectTask`

**Inputs**

`OfficeIMO.Project.ProjectDocument`

**Outputs**

`OfficeIMO.Project.ProjectTask`

**Source**

[AddOfficeProjectTaskCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Project/AddOfficeProjectTaskCommand.cs#L18) 

Adds a task or summary with a duration expressed in working days.

## Syntax

```
Add-OfficeProjectTask
[-Document <ProjectDocument>]
[-DurationDays <Decimal>]
[-Manual]
[-Name] <String>
[-Parent <OfficeProjectTaskSelector>]
[-PassThru]
[-Summary]
[<CommonParameters>]
```

[#](#method-add-officeprojecttask-projectdocument-decimal-switchparameter-string-officeprojecttaskselector-switchparameter-switchparameter)

Parameter set: `Document`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Project, Access, and EPUB Files](/docs/pswriteoffice/project-access-epub/) Guide
  
  Create and read Microsoft Project schedules, Access databases and EPUB books from PowerShell, without Project or Access installed.

## Examples

### Adds a task or summary with a duration expressed in working days.

```powershell
$project | Add-OfficeProjectTask -Name Design -DurationDays 3 -PassThru
```

## Parameters

**-Document ProjectDocument optionalpipeline: True (ByValue)**

Project to inspect or change.

**-DurationDays Decimal optional**

Working duration in days.

**-Manual SwitchParameter optional**

Use manual task scheduling instead of automatic scheduling.

**-Name String requiredposition: 0**

Task name.

**-Parent OfficeProjectTaskSelector optional**

Parent summary UID; omission adds a root task.

**-PassThru SwitchParameter optional**

Return the created or changed object.

**-Summary SwitchParameter optional**

Create a summary task.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:B0CF70A05084ED9791F15E7ECE1197198ADB515FEF3A0880C28227FDB142C8D2 -->
