---
title: "Export-VETPost"
description: "Exports Microsoft Teams team channel posts to a file in the HTML format. Product: Veeam Backup for Microsoft 365 Product Edition: Community, Rental License, Subscription License This cmdlet provides the following parameter sets: This cmdlet exports p"
canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/export-vetpost.html"
breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for Microsoft Teams > Export-VETPost"
dateModified: "2026-08-20"
---
# Export-VETPost
## Short Description
Exports Microsoft Teams team channel posts to a file in the HTML format.
**Product**: Veeam Backup for Microsoft 365
**Product Edition**: Community, Rental License, Subscription License
## Syntax
This cmdlet provides the following parameter sets:
## Detailed Description
This cmdlet exports posts published in Microsoft Teams team channels to a file in the HTML format.
## Parameters
|
Parameter
|
Description
|
Type
|
Required
|
Position
|
Accept Pipeline Input
|
|
Channel
|
Specifies a Microsoft Teams team channel. The cmdlet will export posts from this channel. Accepts the VETChannel object. To get this object, run the Get-VETChannel cmdlet.
|
VETChannel
|
True
|
0
|
True (ByValue)
|
|
Force
|
Defines that the cmdlet will create a folder where to save the HTML file if the specified folder does not exist. Default: False
|
SwitchParameter
|
False
|
Named
|
False
|
|
From
|
Specifies the point in time that defines the start of the period for which you want to export posts. The cmdlet will export posts created within the specified time period.
|
DateTime
|
True
|
2
|
False
|
|
Path
|
Specifies a path to the folder and a name for the HTML file where you want to export posts.
|
String
|
True
|
1
|
False
|
|
Post
|
Specifies Microsoft Teams team channel posts that you want to export. Accepts the VETPost[] object. To get this object, run the Get-VETPost cmdlet.
|
VETPost[]
|
True
|
0
|
True (ByValue)
|
|
To
|
Specifies the point in time that defines the end of the period for which you want to export posts. The cmdlet will export posts created within the specified time period.
|
DateTime
|
False
|
3
|
False
|
``
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Learn.
## Examples
::: example
### Example 1. Exporting Specified Posts
This example shows how to export specified posts. The cmdlet will export posts with the following settings:
- The cmdlet will export posts from channels of the `IT` team that contain the `announcement` keyword.
- The cmdlet will export posts to the `announcements.html` file.
```
$session = Get-VBOTeamsItemRestoreSession
$org = Get-VETOrganization -Session $session -Name "ABC*"
$team = Get-VETTeam -Organization $org -DisplayName "IT"
$post = Get-VETPost -team $team -Query "subject: announcement"
Export-VETPost -Post $post -Path "C:\export\announcements.html"
```
Perform the following steps:
1. Get posts that contain the `announcement` keyword:
1. Run the [`Get-VBOTeamsItemRestoreSession`](get-vboteamsitemrestoresession.md) cmdlet. Save the result to the `$session` variable.
2. Run the [`Get-VETOrganization`](get-vetorganization.md) cmdlet. Set the `$session` variable as the `Session` parameter value. Specify the `Name` parameter value. Use the \* wildcard character to substitute the timestamp. Save the result to the `$org` variable.
3. Run the [`Get-VETTeam`](get-vetteam.md) cmdlet. Set the `$org` variable as the `Organization` parameter value. Specify the `DisplayName` parameter value. Save the result to the `$team` variable.
4. Run the [`Get-VETPost`](get-vetpost.md) cmdlet. Set the `$team` variable as the `Team` parameter value. Specify the `Query` parameter value. Save the result to the `$post` variable.
2. Run the `Export-VETPost` cmdlet. Set the `$post` variable as the `Post` parameter value. Specify the `Path` parameter value.
:::
::: example
### Example 2. Exporting Posts of Specified Channel
This example shows how to export posts of the specified channel. The cmdlet will export posts with the following settings:
- The cmdlet will export posts from the `General` channel of the `IT` team.
- The cmdlet will export posts published between `7/1/2026 10:00 AM` and `8/31/2026 10:00 AM` to the `posts.html` file.
```
$datefrom = [datetime]"7/1/2026 10:00 AM"
$dateto = [datetime]"8/31/2026 10:00 AM"
$session = Get-VBOTeamsItemRestoreSession
$org = Get-VETOrganization -Session $session -Name "ABC*"
$team = Get-VETTeam -Organization $org -DisplayName "IT"
$channel = Get-VETChannel -Team $team -DisplayName "General"
Export-VETPost -Channel $channel -Path "C:\export\posts.html" -From $datefrom -To $dateto
```
Perform the following steps:
1. Convert the time that defines the start of the period for which you want to export posts to the DateTime format. Save the result to the `$datefrom` variable.
2. Convert the time that defines the end of the period for which you want to export posts to the DateTime format. Save the result to the `$dateto` variable.
3. Get the `General` channel:
1. Run the [`Get-VBOTeamsItemRestoreSession`](get-vboteamsitemrestoresession.md) cmdlet. Save the result to the `$session` variable.
2. Run the [`Get-VETOrganization`](get-vetorganization.md) cmdlet. Set the `$session` variable as the `Session` parameter value. Specify the `Name` parameter value. Use the \* wildcard character to substitute the timestamp. Save the result to the `$org` variable.
3. Run the [`Get-VETTeam`](get-vetteam.md) cmdlet. Set the `$org` variable as the `Organization` parameter value. Specify the `DisplayName` parameter value. Save the result to the `$team` variable.
4. Run the [`Get-VETChannel`](get-vetchannel.md) cmdlet. Set the `$team` variable as the `Team` parameter value. Specify the `DisplayName` parameter value. Save the result to the `$channel` variable.
4. Run the `Export-VETPost` cmdlet. Set the `$channel` variable as the `Channel` parameter value. Specify the `Path` parameter value. Set the `$datefrom` variable as the `From` parameter value. Set the `$dateto` variable as the `To` parameter value.
:::
## Related Commands
- [`Get-VBOTeamsItemRestoreSession`](get-vboteamsitemrestoresession.md)
- [`Get-VETOrganization`](get-vetorganization.md)
- [`Get-VETTeam`](get-vetteam.md)
- [`Get-VETChannel`](get-vetchannel.md)
- [`Get-VETPost`](get-vetpost.md)