Clearing Version history for file in Users OneDrive folders #2785
-
Hi All, Is there a way to find out the current version history for a file in a users OneDrive folder, and then remove the old versions? Some of these files have 1,000's of versions that cant be cleared via the browser. Thanks Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can access a users OneDrive documents folder as a normal SharePoint document library with PnP PowerShell: Connect-PnPOnline -Url https://mytenant-my.sharepoint.com/personal/myuser_mytenant_com However, not sure why though, we have no cmdlets available for handling version of files. I'll see what we can do in that area. |
Beta Was this translation helpful? Give feedback.
-
A short update: the upcoming July version of PnP PowerShell will contain these new cmdlets: Get-PnPFileVersion, Remove-PnPFileVersion, Restore-PnPFileVersion |
Beta Was this translation helpful? Give feedback.
-
Awesome!
Thank you for the quick reply!
Just putting it out there, Will the Remove-PnPFileVersion allow for the removal of all old versions, or would it need to be in a loop to work through them all.
Do you need to book some time with me to discuss an issue you are facing? If so please, Book a time<https://outlook.office365.com/owa/calendar/HeadspaceIT1@fitz.com.au/bookings/>
Thanks
Steven Reid MCP
IT Manager
[cid:FitzFinancialGroup_7b9a5063-f19a-427c-aa75-c40dc33e4925.png]
D 07 3105 6545 F 07 3831 7377 M 0419 798 949 E Steven.Reid@ftz.com.au<mailto:Steven.Reid@ftz.com.au>
Postal GPO Box 273, Brisbane, QLD 4000
Office Level 23, 215 Adelaide St Brisbane QLD 4000
www.fitz.com.au<http://www.fitz.com.au>
Fitzpatricks Private Wealth, ABN 33 093 667 595, holder of Australian Financial Services Licence (AFSL) No. 247 429, and Atrium Investment Management Pty Ltd (Atrium), ABN 17 137 088 745, holder of AFSL 338 634. The content of this email contains general information only and is not intended to provide you with advice or take into account your objectives, financial situation or needs. When we provide you with advice this will be set out and recorded in an eligible advice document. The views expressed in this email and our website are the opinions of the authors at the time of writing and do not constitute a recommendation to act. All information referenced are believed to be accurate at the time of compilation and is provided by Fitzpatricks Private Wealth or Atrium in good faith. The information contained in this email is confidential. It is intended solely for the addressee. If you receive this email in error please contact the sender and delete the email. With the exception of any personal advice provided, Fitzpatricks Private Wealth and Atrium have no liability (including liability in negligence) to any person for any loss or damage consequential or otherwise suffered or incurred by that person resulting directly or indirectly from either the use of, or reliance on, the information contained herein. Fitzpatricks Private Wealth and Atrium do not guarantee the performance of any fund, stock or the return of an investor's capital. Past performance is not a reliable indicator of future performance.
From: Erwin van Hunen <notifications@github.com>
Sent: Friday, 10 July 2020 11:14 PM
To: pnp/PnP-PowerShell <PnP-PowerShell@noreply.github.com>
Cc: Steven Reid <Steven.Reid@ftz.com.au>; Author <author@noreply.github.com>
Subject: Re: [pnp/PnP-PowerShell] Clearing Version history for file in Users OneDrive folders (#2785)
A short update: the upcoming July version of PnP PowerShell will contain these new cmdlets:
Get-PnPFileVersion, Remove-PnPFileVersion, Restore-PnPFileVersion
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2785 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB24PL6UKNCCXLJLUPG7T6TR24HZZANCNFSM4OWMIE2Q>.
|
Beta Was this translation helpful? Give feedback.
A short update: the upcoming July version of PnP PowerShell will contain these new cmdlets:
Get-PnPFileVersion, Remove-PnPFileVersion, Restore-PnPFileVersion