SOLVED

Need help, MicrosoftTeams PowerShell StorageQuota cmdlet doesn't work

Copper Contributor

Trying to create new Teams then setting the Teams SharePoint Online's Storage Quota.
Code has no error, but the Storage Quota haven't changed, keeping 1048576.
Just wondering is there something wrong or something miss?

 

 

 

 

try{
    Connect-MicrosoftTeams
    Connect-SPOService
    $url = "http://abc.sharepoint.com/sites/"
    $group = New-Team -DisplayName $displayName -Description $description -Visibility Private -Owner $owner 
    Add-TeamUser -GroupId $group.GroupId -User $user 
    $siteUrl = $url + $group.MailNickName
    Set-SPOSite -Identity $siteUrl -Sharingcapability ExistingExternalUserSharingOnly
    Set-SPOSite -Identity $siteUrl -StorageQuota 10240 #★result = 1048576★
}
catch{
}
finally{
}

 

 

 

 

 

2 Replies
best response confirmed by JasonPPF (Copper Contributor)
Solution

@JasonPPF 

 

Hmm, may be because site limits are set to Automatic in the SPO Admin Centre

 

Manage site storage limits - SharePoint in Microsoft 365 | Microsoft Docs

 

Let me know if this is the case

 

Best, Chris

@ Christopher Hoard

Thank you for your answer!
I'm not sure it's related to Management Shell or not.
Just try the code's order, then it's work!
Maybe it's related to tenant issue.
Thank you for your help!

1 best response

Accepted Solutions
best response confirmed by JasonPPF (Copper Contributor)
Solution

@JasonPPF 

 

Hmm, may be because site limits are set to Automatic in the SPO Admin Centre

 

Manage site storage limits - SharePoint in Microsoft 365 | Microsoft Docs

 

Let me know if this is the case

 

Best, Chris

View solution in original post