Last active
July 5, 2019 07:55
-
-
Save win2000b/dc810a4a8369bd72b305fb93f6992430 to your computer and use it in GitHub Desktop.
AutoMount SharePoint Library via Intune PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tenantAutoMountRegKey="HKLM:\SOFTWARE\Policies\Microsoft\OneDrive\TenantAutoMount" | |
$autoMountTeamSitesList= @{ | |
#Enter your SharePoint libraries to configure here as key/value pairs | |
Technical="INSERT URL IN HERE" | |
} | |
if (-not (Test-Path $tenantAutoMountRegKey)){ | |
New-Item -Path $tenantAutoMountRegKey -Force | |
} | |
#add registry entries from the hashtable above | |
$autoMountTeamSitesList.GetEnumerator() | ForEach-Object { | |
Set-ItemProperty -Path $tenantAutoMountRegKey -Name $PSItem.Key -Value $PSItem.Value -ErrorAction Stop | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment