Forum Discussion

JasonPPF's avatar
JasonPPF
Tin Contributor
Dec 21, 2021
Solved

Need help, MicrosoftTeams PowerShell StorageQuota cmdlet doesn't work

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