Skip to content

Commit 28af30b

Browse files
Update README.md
1 parent 92f7690 commit 28af30b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
.
1+
Short Powershell script that enables or disables a setting to send emails to OneDrive for Business owners when someone creates an anonymous link to the ODB owner's content.
2+
3+
It uses CSOm and requires SharePoint Online SDK. The script is part of and more explained in a Technet Wiki article:
4+
[OneDrive for Business notification settings with Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39385.onedrive-for-business-notifications-with-powershell.aspx)
5+
6+
7+
## How to use?
8+
9+
- Download and open the .ps1 file.
10+
- Add correct libraries:
11+
12+
```PowerShell
13+
#Paths to SDK
14+
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
15+
Add-Type -Path "C:\Program Files\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
16+
```
17+
18+
- Enter the correct url and admin login:
19+
20+
```PowerShell
21+
#Enter the data
22+
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
23+
$username="admin@TENANT.onmicrosoft.com"
24+
$Url="https://TENANT-admin.sharepoint.com"
25+
$OwnerAnonymousNotification=$true #Whether ODB owner should be notified when anonymous link is created or changed
26+
```
27+
28+
- Run the script

0 commit comments

Comments
 (0)