Skip to content

Commit 2013932

Browse files
Create README.md
1 parent 8466b86 commit 2013932

File tree

1 file changed

+47
-0
lines changed
  • OneDrive for Business/Enable versioning for all lists in selected OneDrive sites

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Powershell script that enables versioning for all the libraries and lists in personal sites (OneDrive for Business).
2+
3+
It requires SharePoint Online Management Shell and SharePoint SDK installed:
4+
5+
http://technet.microsoft.com/en-us/library/fp161372(v=office.15).aspx
6+
7+
http://www.microsoft.com/en-us/download/details.aspx?id=30722
8+
9+
10+
11+
For some lists, enabling version may not be possible and you will receive a notification of that.
12+
13+
At the end, a csv file is generated with the lists' urls and the status whether enabling was successful or not.
14+
15+
16+
17+
As the script runs you will see green lists' titles for which the enabling succeeded and red for those which failed (not all lists support versioning).
18+
19+
20+
21+
22+
23+
24+
25+
You need to enter the appropriate data:
26+
27+
28+
29+
```PowerShell
30+
# Paths to SDK. Please verify location on your computer.
31+
Add-Type -Path "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.Client\v4.0_16.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Client.dll"
32+
Add-Type -Path "c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SharePoint.Client.Runtime\v4.0_16.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.Client.Runtime.dll"
33+
34+
# Insert the credentials and the name of the admin site inthe next 3 lines
35+
$Username="ana@etr56.onmicrosoft.com"
36+
Connect-SPOService https://etr56-admin.sharepoint.com -Credential $Username
37+
$myhost="https://etr56-my.sharepoint.com"
38+
```
39+
The user list is imported from a csv file that should look like this:
40+
41+
42+
43+
44+
45+
46+
47+
There is another version of this script that enables versioning for ALL users: https://gallery.technet.microsoft.com/office/Enable-versioning-for-all-83548eb6

0 commit comments

Comments
 (0)