Tag Archives: OneDrive

How to create an old document in SharePoint

Sometimes, mostly during PoC or testing policies like retention policy or lifecycle policy you would need some documents created and updated weeks, months or even years ago.

But if you create or upload a document in SharePoint library – it will be just a regular new document. So, how to get old documents in the new environment?

I see two options:

  1. Sync with OneDrive
    If you sync a library with your local folder (done Microsoft by OneDrive desktop app) and put some old document in your synced folder – the doc will be synchronized back to SharePoint library with Created and Modified properties preserved.
  2. Make the document older with PowerShell
    With “Set-PnPListItem” PowerShell command you can update not only such properties like Title, but also “Created By”, “Modified By” and even date and time document was created and modified via “Created” and “Modified”.
    Optionally you can play with document history with “-UpdateType” parameter.
    UpdateType possible values are:
    • Update: Sets field values and creates a new version if versioning is enabled for the list
    • SystemUpdate: Sets field values and does not create a new version. Any events on the list will trigger.
    • UpdateOverwriteVersion: Sets field values and does not create a new version. No events on the list will trigger
Office.com OneDrive icon

OneDrive vs OneDrive vs Personal Site

 

Microsoft sells OneDrive as a personal cloud storage service… But There are actually two separate products behind the service, and each product provides more than “personal cloud storage service”…

What is OneDrive? What is the difference between OneDrive and Personal SharePoint site? Let’s see…

When you login to Office.com, you can click on OneDrive icon:
Office.com OneDrive icon

and you will found yourself at OneDrive site, so

one OneDrive is a SharePoint Personal site:

OneDrive - SharePoint Personal Site

The other OneDrive is a desktop application

i.e. program that runs in the background and synchronizes files from your personal SharePoint site (“first OneDrive”) to your local machine and back:

OneDrive as a desktop application - installed

OneDrive as a desktop application - running OneDrive as a desktop application - running in the background

Below is OneDrive desktop application in Windows File Explorer. Please notice how “test 01.txt” file and “test 02” folder are synchronized to first OneDrive.

OneDrive desktop application syncs data from Personal SharePoint Site

Confused? No? Wanna more?

Here are some more confusing details…

Using OneDrive desktop application you can synchronize your regular SharePoint site library with your desktop computer.

Here is a regular SharePoint site (Test23) with a LibUnderSharePoint library. You can click on the “Sync” button:

SharePoint site Library - Synchronized to Onedrive

and see the magic! Now you have another folder on your local Windows machine:

OneDrive Syncs SharePoint site

– but this time OneDrive synchronizes it to regular SharePoint site.

 

There is also a “Personal OneDrive” – the same as regular OneDrive but free…
(again, do not be confused: initially there was just OneDrive – free personal version and OneDrive for Business – version you could have with Office 365 subscription; now they are Onedrive and Personal OneDrive 🙂 )

OneDrive is a Microsoft thing. 
Google has “Drive File Stream” (Google drive)
Dropbox – Dropbox sync