Office 365: How to change Storage Quota in OneDrive for Business (I)!

If we wanto to change the storage quota for onedrive for Business (ODFB) in Office 365, we have to use PowerShell and the Set-SPOSite particular command. The following script shows how to allocate a quota of 500 MB to a particular ODFB site::How to update ODFB Storage Quota (Office 365)

function Set-OneDriveFBQuotaStorage

{

    param ($sUserName,$sMessage,$sSPOAdminCenterUrl,$sSPOODFBHostUrl,$sSPODFBRelativePath,$iODFBQuota)

    try

    {    

        Write-Host "----------------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "Setting the Quota Storage for $sUserName ODFB" -foregroundcolor Green

        Write-Host "----------------------------------------------------------------------------------"  -foregroundcolor Green

        $msolCred = Get-Credential -UserName $sUserName -Message $sMessage        

        Connect-SPOService -Url $sSPOAdminCenterUrl -Credential $msolCred

        $sODFBSite=$sSPOODFBHostUrl + $sSPODFBRelativePath        

        Set-SPOSite –Identity $sODFBSite –StorageQuota $iODFBQuota         

        

        Write-Host "----------------------------------------------------------------------------------"  -foregroundcolor Green

        Write-Host "Storage Quota sucessfully update for $sUserName ODFB" -foregroundcolor Green

        Write-Host "----------------------------------------------------------------------------------"  -foregroundcolor Green

    }

    catch [System.Exception]

    {

        write-host -f red $_.Exception.ToString()   

    }    

}

 

#Connection to Office 365

$sUserName="<O365User>@<O365Domain>.onmicrosoft.com"

$sMessage="Introduce your SPO Credentials"

$sSPOAdminCenterUrl="https://<O365Domain>-admin.sharepoint.com/"

$sSPOODFBHostUrl="https://<O365Domain>-my.sharepoint.com/personal/"

$sSPODFBRelativePath="<O365User>_<O365Domain>_onmicrosoft_com"

$iODFBQuota=512000

 

Set-OneDriveFBQuotaStorage -sUserName $sUserName -sMessage $sMessage -sSPOAdminCenterUrl $sSPOAdminCenterUrl -sSPOODFBHostUrl $sSPOODFBHostUrl -sSPODFBRelativePath $sSPODFBRelativePath -iODFBQuota $iODFBQuota

Through Storage Metrics page for ODFB we can check if the storage quota has been updated correctly.

image

Anuncios

2 pensamientos en “Office 365: How to change Storage Quota in OneDrive for Business (I)!

  1. Pingback: SharePoint & Office 365: Resumen de posts (III)! | Pasión por la tecnología...

  2. Pingback: SharePoint & Office 365: Resumen de posts (III)! - Blog de Juan Carlos González en Geeks.MS

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s