20 lines
1.3 KiB
PowerShell
20 lines
1.3 KiB
PowerShell
#Requires -Version 5.1
|
|||
|
|
# Upload this shim to Syncro. Windows PowerShell 5.1; Run As: System.
|
||
|
|
# See docs/OneDrive-PathPreparation.md. Configure these string variables in Syncro:
|
||
|
|
# [string]$UserProfilePath - Required target profile, e.g. C:\Users\Jane
|
||
|
|
# [string]$OneDriveRoot - Intended sync root, e.g. C:\Users\Jane\OneDrive - Contoso
|
||
|
|
# [string]$Apply - Dropdown: false (default: preview), true (rename files)
|
||
|
|
# [string]$MaxPathLength - 240 (default); allowed range 40-520
|
||
|
|
# [string]$MaxNameLength - 255 (default); allowed range 16-255
|
||
|
|
# [string]$ReportDirectory - e.g. C:\ProgramData\Emberkom\Output\OneDrivePathPreparation
|
||
|
|
# Optional source overrides, each defaulting to Auto; supply all three paths or none:
|
||
|
|
# [string]$DocumentsPath, [string]$PicturesPath, [string]$DesktopPath
|
||
|
|
# Every variable configured in Syncro needs a nonempty value. Do not overwrite
|
||
|
|
# injected values here. The main script reads them directly and converts Apply.
|
||
|
|
# Use Apply=false first and review the CSV before selecting true.
|
||
|
|
|
||
|
|
$ErrorActionPreference = 'Stop'
|
||
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||
|
|
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
||
|
|
Run-Script -LivePSScript Repair-OneDriveKnownFolderPaths
|