
This is an archive version of the document. To get the most up-to-date information, see the
current version.
Get-VETPost
Returns Microsoft Teams posts.
Product Edition: Community, Standard, Enterprise, Enterprise Plus
This cmdlet provides parameter sets that allow you to:
- Get posts from a channel.
Get-VETPost -Channel <VETChannel> [-Query <string>] [-Recurse] [<CommonParameters>] |
- Get posts under the specified parent post.
Get-VETPost -ParentPost <VETPost> [-Query <string>] [-Recurse] [<CommonParameters>] |
- Get posts from an organization.
Get-VETPost -Organization <VETOrganization[]> [-Query <string>] [<CommonParameters>] |
Get-VETPost -Team <VETTeam> [-Query <string>] [<CommonParameters>] |
This cmdlet returns posts published in Microsoft Teams team channels. You can get parent and child posts from the following backed-up sources:
- Microsoft Office 365 organization
- Microsoft Teams team
- Microsoft Teams channel
Parameter | Description | Type | Required | Position | Accept Pipeline Input | Accept Wildcard Characters |
---|
Channel | Specifies a Microsoft Teams team channel. The cmdlet will return posts from this channel. | Accepts the VETChannel object. To get this object, run the Get-VETChannel cmdlet. | True | Named | True (ByValue) | False |
ParentPost | Specifies a parent post. The cmdlet will return child posts of this parent post. | Accepts the VETPost type. | True | Named | True (ByValue) | False |
Organization | Specifies an organization. The cmdlet will return posts from this organization. | Accepts the VETOrganization[] object. To get this object, run the Get-VETOrganization cmdlet. | True | Named | True (ByValue) | False |
Team | Specifies a Microsoft Teams team. This cmdlet will return posts from this team. | Accepts the VETTeam object. To get this object, run the Get-VETTeam cmdlet. | True | Named | True (ByValue) | False |
Query | Specifies a query string for post search. The cmdlet will return posts that match the search query from the specified organization, team, channel or parent post. | String | False | Named | False | False |
Recurse | Indicates that the cmdlet will return the specified parent post and all of its child posts. | SwitchParameter | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
The cmdlet returns the VETPost object that contains Microsoft Teams posts.
This example shows how to get all posts from the General channel. $session = Get-VBOTeamsItemRestoreSession $org = Get-VETOrganization -Session $session -Name "ABC" $team = Get-VETTeam -Organization $org -DisplayName "IT" $channel = Get-VETChannel -Team $team -DisplayName "General" Get-VETPost -Channel $channel |
Perform the following steps: - Get the channel:
- Run the Get-VBOTeamsItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VETOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $org variable.
- Run the Get-VETTeam cmdlet. Set the $org variable as the Organization parameter value. Specify the DisplayName parameter value. Save the result to the $team variable.
- Run the Get-VETChannel cmdlet. Set the $team variable as the Team parameter value. Specify the DisplayName parameter value. Save the result to the $channel variable.
- Run the Get-VETPost cmdlet. Set the $channel variable as the Channel parameter value.
|
This example shows how to get channel posts under the Announcement parent post. $session = Get-VBOTeamsItemRestoreSession $org = Get-VETOrganization -Session $session -Name "ABC" $post = Get-VETPost -Organization $org -Query "subject: announcement" Get-VETPost -ParentPost $post |
Perform the following steps: - Get the parent post:
- Run the Get-VBOTeamsItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VETOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $org variable.
- Run the Get-VETPost cmdlet. Set the $org variable as the Organization parameter value. Specify the Query parameter value. Save the result to the $post variable.
- Run the Get-VETPost cmdlet. Set the $post variable as the ParentPost parameter value.
|
This example shows how to get channel posts from the ABC organization. $session = Get-VBOTeamsItemRestoreSession $org = Get-VETOrganization -Session $session -Name "ABC" Get-VETPost -Organization $org |
Perform the following steps: - Get the organization:
- Run the Get-VBOTeamsItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VETOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $org variable.
- Run the Get-VETPost cmdlet. Set the $org variable as the Organization parameter value.
|
This example shows how to get channel posts from the IT team. $session = Get-VBOTeamsItemRestoreSession $org = Get-VETOrganization -Session $session -Name "ABC" $team = Get-VETTeam -Organization $org -DisplayName "IT" Get-VETPost -Team $team |
Perform the following steps: - Get the team:
- Run the Get-VBOTeamsItemRestoreSession cmdlet. Save the result to the $session variable.
- Run the Get-VETOrganization cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $org variable.
- Run the Get-VETTeam cmdlet. Set the $org variable as the Organization parameter value. Specify the DisplayName parameter value. Save the result to the $team variable.
- Run the Get-VETPost cmdlet. Set the $team variable as the Team parameter value.
|
Related Commands