Forum Discussion
JasonPPF
Dec 27, 2021Copper Contributor
PowerShell & Teams, want to figure out the Cmdlet can work or not, thanks a lot.
PowerShell rookie need help! Want to figure out about #Q1 #Q2 #Q3 Appreciate! try{
Connect-MicrosoftTeams
Connect-SPOService
$url = "http://abc.sharepoint.com/sites/"
...
Dec 28, 2021
What is it you are trying to achieve? Create a script to report on a Team and underlying quota of the SharePoint Site?
A good article for getting the SharePoint Site Quota is here:
Think $Site.StorageQuota and $Site.StorageUsageCurrent is what you are looking for Q3.
Also notice at the top, should $url = https:// not http://
Let's see if we can get Q3 right then move onto the other 2 😄
Hope that helps
Best, Chris
- JasonPPFDec 29, 2021Copper ContributorThank you for replies! And sorry, my description is not clear enough.
The column No.1~17, is the script for create Teams and setting Owner and StorageQuota.
(It's working without error, and value setting also correct so far.)
The No.21~35 is the script which I'm trying to get, DisplayName, Owner, StorageQuota perfectly. (Especially Q2.)
As you say, report the Team's information which just been created, and underlying information of the SharePoint Site
Q1. DisplayName
Wan't to knnow No.21 or No.23~24, which can retrieve the DisplayName correctly, or both?
Q2. Owner
The log showing >>Microsoft.Teams.PowerShell.TeamsCmdlets.GetTeamUserResponse<<
I think GroupId is no problem, but don't know why it can't retrieve the SharePoint Site's owner value "Terry".
Q3. StorageQuota
I think the No.33, pipeline and select to retrieve the StorageQuota value is working right.
But want to know how to make the value "@{StorageQuota=10240}" to "10240" in log file? Sorry, still learning PowerShell.
Sorry, need to wait till 1/5 to test.