-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #792 from reshmee011/channel_siteUrl
sample to get channel site url
- Loading branch information
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
plugin: add-to-gallery | ||
--- | ||
|
||
# Retrieving SharePoint Site URL for Teams Channels | ||
|
||
## Summary | ||
|
||
You may want to retrieve the SharePoint sites of private and shared channels for different reasons like to add to eDiscovery when running against "Specific Locations" or just for reporting purposes. A teams can have up to 30 Private Channels and unlimited shared channels up to the maximum of 1000 channels. This script can help to identify the SharePoint Urls associated to private and shared channels. | ||
|
||
# [PnP PowerShell](#tab/pnpps) | ||
|
||
```powershell | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string] $domain , | ||
[Parameter(Mandatory = $true)] | ||
[string] $teamName | ||
) | ||
$adminSiteURL = "https://$domain-Admin.SharePoint.com" | ||
Connect-PnPOnline -Url $adminSiteURL | ||
$team = Get-PnPTeamsTeam -Identity $teamName | ||
$m365GroupId = $team.GroupId | ||
Get-PnPTenantSite | Where-Object { $_.Template -eq 'TEAMCHANNEL#1' -and $_.RelatedGroupId -eq $m365GroupId } | select Url,Template, Title | ||
``` | ||
[!INCLUDE [More about PnP PowerShell](../../docfx/includes/MORE-PNPPS.md)] | ||
|
||
*** | ||
|
||
## Source Credit | ||
|
||
Sample first appeared on [Retrieving SharePoint Site URL for Teams Channels](https://reshmeeauckloo.com/posts/powershell-get-teams-channel-sharepoint-site/) | ||
|
||
## Contributors | ||
|
||
| Author(s) | | ||
|-----------| | ||
| [Reshmee Auckloo](https://github.com/reshmee011) | | ||
|
||
|
||
[!INCLUDE [DISCLAIMER](../../docfx/includes/DISCLAIMER.md)] | ||
<img src="https://m365-visitor-stats.azurewebsites.net/script-samples/scripts/teams-get-channel-spo-urls" aria-hidden="true" /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[ | ||
{ | ||
"name": "teams-get-channel-spo-urls", | ||
"source": "pnp", | ||
"title": "Retrieving SharePoint Site URL for Teams Channels", | ||
"shortDescription": "This script can help to identify the SharePoint Urls associated to private and shared channels. For example, eDiscovery when running against 'Specific Locations' or just for reporting purposes", | ||
"url": "https://pnp.github.io/script-samples/teams-get-channel-spo-urls/README.html", | ||
"longDescription": [ | ||
"You may want to retrieve the SharePoint sites of private and shared channels for different reasons like to add to eDiscovery when running against 'Specific Locations' or just for reporting purposes. A teams can have up to 30 Private Channels and unlimited shared channels up to the maximum of 1000 channels. This script can help to identify the SharePoint Urls associated to private and shared channels." | ||
], | ||
"creationDateTime": "2024-12-10", | ||
"updateDateTime": "2024-12-10", | ||
"products": [ | ||
"Teams" | ||
], | ||
"metadata": [ | ||
{ | ||
"key": "PNP-POWERSHELL", | ||
"value": "2.99.63" | ||
}, | ||
{ | ||
"key": "POWERSHELL", | ||
"value": "7.4.5" | ||
} | ||
], | ||
"categories": [ | ||
"Report", | ||
"Governance" | ||
], | ||
"tags": [ | ||
"Connect-PnPOnline", | ||
"Get-PnPTeamsTeam", | ||
"Get-PnPTenantSite" | ||
], | ||
"thumbnails": [ | ||
{ | ||
"type": "image", | ||
"order": 100, | ||
"url": "https://raw.githubusercontent.com/pnp/script-samples/main/scripts/teams-get-channel-spo-urls/assets/preview.png", | ||
"alt": "Retrieving SharePoint Site URL for Teams Channels" | ||
} | ||
], | ||
"authors": [ | ||
{ | ||
"gitHubAccount": "reshmee011", | ||
"company": "Avanade", | ||
"pictureUrl": "https://avatars.githubusercontent.com/u/7693852?v=4", | ||
"name": "Reshmee Auckloo" | ||
} | ||
], | ||
"references": [ | ||
{ | ||
"name": "Want to learn more about PnP PowerShell and the cmdlets", | ||
"description": "Check out the PnP PowerShell site to get started and for the reference to the cmdlets.", | ||
"url": "https://aka.ms/pnp/powershell" | ||
} | ||
] | ||
} | ||
] |