# Add-OfficeAccessTable

Adds a table to a newly created native database model.

Cmdlet 

Aliases: AccessTable

**Module**

`PSWriteOffice`

**Aliases**

`AccessTable`

**Inputs**

`OfficeIMO.Access.AccessDocument`

**Outputs**

`OfficeIMO.Access.AccessTable`

**Source**

[AddOfficeAccessTableCommand.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Access/AddOfficeAccessTableCommand.cs#L17) 

Adds a table to a newly created native database model.

## Syntax

```
Add-OfficeAccessTable
[[-Content] <ScriptBlock>]
[-Document <AccessDocument>]
[-Name] <String>
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officeaccesstable-scriptblock-accessdocument-string-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 table to a newly created native database model.

```powershell
$table = $database | Add-OfficeAccessTable -Name Contacts -PassThru
```

## Parameters

**-Content ScriptBlock optionalposition: 1**

Content block whose AccessColumn and AccessRow commands target the new table.

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

Live database document.

**-Name String requiredposition: 0**

Table name.

**-PassThru SwitchParameter optional**

Return the created or changed object.

## 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:ED63E11983C7346E2190BA66E07F10A47D8C69E226DB5EB4E035EC3FAFB25970 -->
