Office 365: How to remove a ODFB site using PowerShell!

A common question in regards of OneDrive For Business (ODFB) is about how to delete a ODFB site in Office 365. Fortunately, this question has a simple answer: just use PowerShell. Indeed, using Remove-SPOSite you can easily delete an existing ODFB site as described in the following PowrShell script:

#Ejecución en la Consola de Administración de SharePoint Online

$sUserName="jcgonzalez@nuberosnet.onmicrosoft.com"

$sMessage="Introduce your SPO Credentials"

$sSPOAdminCenterUrl="https://nuberosnet-admin.sharepoint.com/" 

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

Connect-SPOService -Url $sSPOAdminCenterUrl -Credential $msolcred 

$spoSiteODFBSiteToDelete="https://nuberosnet-my.sharepoint.com/personal/user2_nuberosnet_onmicrosoft_com/"

Remove-SPOSite -Identity $spoSiteODFBSiteToDelete

If you run this PowerShell script in the SharePoint Online (SPO) Administration Console, you will see how the script is executed without problems:

image

Using Get-SPOSite you can verify that the ODFB site is not existing anymore:

image

Finally, if end user try to access his/her ODFB site, he will see that the ODFB site is going to be provisioned from scratch.

image

Anuncios

Un pensamiento en “Office 365: How to remove a ODFB site using PowerShell!

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

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