OneDrive user site deletion

Domagoj Novak 586 Reputation points
2022-10-04T14:57:42.207+00:00

Hi All,

I have seen a similar question but it was 6 years ago, so I want to ask again just to confirm if anything changed.

Is it safe to delete all content from a users OneDrive site by running cmdlet Remove-SPOSite and then run Request-SPOPersonalSite? End result is to clear all content.

I know there is a way with PnP powershell, but I'd like to do it this way. Also, is PnP powershell module approved by Microsoft?

Kind regards,
D

Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,027 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,719 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,150 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yi Lu_MSFT 17,461 Reputation points
    2022-10-05T08:00:00.413+00:00

    Hi @Domagoj Novak
    If you just want to delete a OneDrive site, you could use Remove-SPOSite.

    As to Request-SPOPersonalSite, the Request-SPOPersonalSite cmdlet requests that the users specified be enqueued so that a Personal Site be created for each. The actual Personal site is created by a Timer Job later. If the user already has a Personal Site created, the request for creation for the user will be silently ignored, in this case you may try New-SPOSite.

    Finally, PnP powershell module is approved by Microsoft.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.