Email: [email protected]

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Windows
      • Office
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/News/Switch OneDrive for Business Accounts to Intelligent Versioning

Switch OneDrive for Business Accounts to Intelligent Versioning

Tony Redmond / 2024-12-04
Switch OneDrive for Business Accounts to Intelligent Versioning
News

Bringing Intelligent Automatic Versioning to OneDrive for Business

In October, I reported about the deployment of intelligent versioning for SharePoint Online and noted that I thought this is a significant advance for storage management. Some of the gloss is taken off by the clash between retention processing and intelligent versioning. The former wants to keep versions while the latter seeks to remove unwanted versions. Still, anything that seeks to relieve the pressure on expensive SharePoint Online storage is appreciated, and I think intelligent versioning is the way forward.

OneDrive for Business Storage

Because Microsoft makes generous amounts of storage quota available for OneDrive for Business users, less pressure arises through the cost of storage. Microsoft has dedicated a lot of effort to move the files generated by apps such as Loop (components), Whiteboard, and Stream to OneDrive for Business with the idea being that OneDrive is your personal storage space. Sometimes too much gets stored in OneDrive, such as the selection of OneDrive by PowerShell as the default location to install new modules, but overall, it’s a good thing to have a common default storage location for personal files.

Enabling Intelligent Versioning Manually

Which brings us to the question of whether it’s possible to enable automatic versioning for OneDrive for Business. The answer is yes. You can enable intelligent versioning manually or with PowerShell.

To enable an account manually:

  1. Sign into the account and access site settings through the cogwheel icon.
  2. Select OneDrive Settings.
  3. Click More Settings and then choose the link to Return to the Old Site settings page.
  4. Select Site Libraries and Lists.
  5. Click on the link to the default document library. In English, the link is Documents.
  6. Choose Versioning settings.
  7. Select Automatic versioning (Figure 1) and click OK.
Switching a OneDrive for Business account to intelligent versioning
Figure 1: Switching a OneDrive for Business account to intelligent versioning

Enabling Intelligent Versioning with PowerShell

Enabling an important feature manually is boring when it needs to be done for many OneDrive for Business accounts. PowerShell is the go-to tool for automating Microsoft 365 administrative operations, so that’s the next step. Despite explaining how to use the SharePoint Online management module to enable intelligent versioning for SharePoint Online sites in my article, I began by investigating if it is possible to do the job with the PnP module. One good reason for selecting PnP is because this module offers more access to SharePoint settings than any other route.

I started by connecting to a OneDrive for Business account by using the Get-MgUserDrive cmdlet to find the OneDrive account for a user account, trimming the OneDrive URL to the form required by PnP, and connecting. If you’re not a regular user of PnP, a recent change in the multitenant app used by the module means that interactive connections are handled differently. After connecting, I was able to run Get-PnPList to retrieve the settings of the document library:

$User = Get-MgUser -UserId [email protected]
$OneDrive = Get-MgUserDrive -userid $User.Id | Select-Object {$_.Name -like "*OneDrive*"}
$SiteUrl = $Drive.WebUrl.Substring(0, $Drive.WebUrl.IndexOf("/Documents")+1)

Connect-PnPOnline $SiteURL -Interactive -ClientId cb5f363f-fbc0-46cb-bcfd-0933584a8c57
$LibrarySettings = Get-PnPList -Identity 'Documents'

Alas, the settings don’t include anything to enable intelligent versioning, so this experiment came to a crashing halt.

Next, I fell back on a combination of the Microsoft Graph PowerShell SDK and the SharePoint Online management module to:

  • Find the set of user accounts licensed to use SharePoint Online.
  • For each account, find if they have a OneDrive for Business account. The Get-SPOSite cmdlet can fetch details of either a SharePoint Online site or OneDrive for Business account.
  • If an account exists, check if intelligent versioning is enabled and if not, enable it.
  • Capture and report the results.

This approach worked and all the OneDrive for Business accounts in my tenant are now enabled for intelligent versioning (Figure 2). You can download the script from GitHub.

A bunch of OneDrive for Business accounts enabled for intelligent versioning
Figure 2: A bunch of OneDrive for Business accounts enabled for intelligent versioning

Keep PowerShell Modules Updated

After going down the rabbit hole of PnP, it was nice to find a solution with the Graph SDK and SharePoint Online PowerShell. This is no criticism of PnP. New builds of that module appear frequently, and the maintainers do an excellent job to track change within SharePoint Online and respond with cmdlet updates. Perhaps the change to deal with enabling intelligent versioning is in one of their nightly updates.

It is important to update modules on an ongoing basis. I used V2.25 of the SDK, version 16.0.25409.12000 of the SharePoint Online management module, and version 2.2.0 of the PnP.PowerShell module. Use the script described in this article to update your modules (and clear out old versions of modules).


Need more help to write PowerShell for Microsoft 365? Get a copy of the Automating Microsoft 365 with PowerShell eBook, available standalone or as part of the Office 365 for IT Pros eBook bundle.

 

Share this!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: [email protected]
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss