|
|
@ -3878,7 +3878,10 @@ function NavigationPaneExpand |
|
|
|
Uninstall OneDrive |
|
|
|
|
|
|
|
.PARAMETER Install |
|
|
|
Install OneDrive 64-bit |
|
|
|
Install OneDrive 64-bit depending which installer is triggered |
|
|
|
|
|
|
|
.PARAMETER Install -AllUsers |
|
|
|
Install OneDrive 64-bit for all users to %ProgramFiles% depending which installer is triggered |
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
OneDrive -Uninstall |
|
|
@ -3886,6 +3889,9 @@ function NavigationPaneExpand |
|
|
|
.EXAMPLE |
|
|
|
OneDrive -Install |
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
OneDrive -Install -AllUsers |
|
|
|
|
|
|
|
.NOTES |
|
|
|
The OneDrive user folder won't be removed |
|
|
|
|
|
|
@ -3908,7 +3914,14 @@ function OneDrive |
|
|
|
ParameterSetName = "Install" |
|
|
|
)] |
|
|
|
[switch] |
|
|
|
$Install |
|
|
|
$Install, |
|
|
|
|
|
|
|
[Parameter( |
|
|
|
Mandatory = $true, |
|
|
|
ParameterSetName = "Install" |
|
|
|
)] |
|
|
|
[switch] |
|
|
|
$AllUsers |
|
|
|
) |
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
@ -4001,7 +4014,12 @@ public static bool MarkFileDelete (string sourcefile) |
|
|
|
} |
|
|
|
|
|
|
|
Remove-ItemProperty -Path HKCU:\Environment -Name OneDrive, OneDriveConsumer -Force -ErrorAction Ignore |
|
|
|
Remove-Item -Path HKCU:\Software\Microsoft\OneDrive, HKLM:\SOFTWARE\WOW6432Node\Microsoft\OneDrive, "$env:ProgramData\Microsoft OneDrive", $env:SystemDrive\OneDriveTemp -Recurse -Force -ErrorAction Ignore |
|
|
|
$Path = @( |
|
|
|
"HKCU:\Software\Microsoft\OneDrive", |
|
|
|
"$env:ProgramData\Microsoft OneDrive", |
|
|
|
"$env:SystemDrive\OneDriveTemp" |
|
|
|
) |
|
|
|
Remove-Item -Path $Path -Recurse -Force -ErrorAction Ignore |
|
|
|
Unregister-ScheduledTask -TaskName *OneDrive* -Confirm:$false -ErrorAction Ignore |
|
|
|
|
|
|
|
# Getting the OneDrive folder path |
|
|
@ -4053,12 +4071,20 @@ public static bool MarkFileDelete (string sourcefile) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (Test-Path -Path $env:SystemRoot\SysWOW64\OneDriveSetup.exe) |
|
|
|
if (Test-Path -Path $env:SystemRoot\System32\OneDriveSetup.exe) |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.OneDriveInstalling -Verbose |
|
|
|
|
|
|
|
Start-Process -FilePath $env:SystemRoot\SysWOW64\OneDriveSetup.exe |
|
|
|
if ($AllUsers) |
|
|
|
{ |
|
|
|
# Install OneDrive for all users |
|
|
|
Start-Process -FilePath $env:SystemRoot\System32\OneDriveSetup.exe -ArgumentList "/allusers" -Wait |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Start-Process -FilePath $env:SystemRoot\System32\OneDriveSetup.exe -Wait |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -4102,7 +4128,15 @@ public static bool MarkFileDelete (string sourcefile) |
|
|
|
} |
|
|
|
Invoke-WebRequest @Parameters |
|
|
|
|
|
|
|
Start-Process -FilePath "$DownloadsFolder\OneDriveSetup.exe" -Wait |
|
|
|
if ($AllUsers) |
|
|
|
{ |
|
|
|
# Install OneDrive for all users to %ProgramFiles% |
|
|
|
Start-Process -FilePath $env:SystemRoot\SysWOW64\OneDriveSetup.exe -ArgumentList "/allusers" -Wait |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Start-Process -FilePath $env:SystemRoot\SysWOW64\OneDriveSetup.exe |
|
|
|
} |
|
|
|
|
|
|
|
Remove-Item -Path "$DownloadsFolder\OneDriveSetup.exe" -Force |
|
|
|
} |
|
|
@ -5884,6 +5918,7 @@ function NetworkAdaptersSavePower |
|
|
|
Get-NetAdapter -Physical -Name $PhysicalAdaptersStatusUp | Where-Object -FilterScript {($_.Status -eq "Disconnected") -and $_.MacAddress} |
|
|
|
) |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Patient -Verbose |
|
|
|
Start-Sleep -Seconds 2 |
|
|
|
} |
|
|
@ -6416,7 +6451,6 @@ public static string GetString(uint strId) |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.RetrievingDrivesList -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
# Store all drives letters to use them within ShowMenu function |
|
|
|
$DriveLetters = @((Get-Disk | Where-Object -FilterScript {$_.BusType -ne "USB"} | Get-Partition | Get-Volume | Where-Object -FilterScript {$null -ne $_.DriveLetter}).DriveLetter | Sort-Object) |
|
|
@ -6440,8 +6474,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $DesktopLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6459,8 +6491,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6473,8 +6505,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $DocumentsLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6492,8 +6522,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6506,8 +6536,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $DownloadsLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6525,8 +6553,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6539,8 +6567,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $MusicLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6558,8 +6584,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6572,8 +6598,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $PicturesLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6591,8 +6615,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6605,8 +6629,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderRequest -f $VideosLocalizedString |
|
|
|
$No = $Localization.No |
|
|
@ -6624,8 +6646,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -6638,8 +6660,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $DesktopLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6669,8 +6689,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6681,8 +6701,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $DocumentsLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6712,8 +6730,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6724,8 +6742,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $DownloadsLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6755,8 +6771,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6767,8 +6783,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $MusicLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6798,8 +6812,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6810,8 +6824,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $PicturesLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6841,8 +6853,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6853,8 +6865,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserFolderSelect -f $VideosLocalizedString |
|
|
|
$Browse = $Localization.Browse |
|
|
@ -6884,8 +6894,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -6898,8 +6908,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserDefaultFolder -f $DesktopLocalizedString |
|
|
|
$Yes = $Localization.Yes |
|
|
@ -6916,8 +6924,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6928,8 +6936,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserDefaultFolder -f $DocumentsLocalizedString |
|
|
|
$Yes = $Localization.Yes |
|
|
@ -6946,8 +6952,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -6958,8 +6964,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserDefaultFolder -f $DownloadsLocalizedString |
|
|
|
$Yes = $Localization.Yes |
|
|
@ -6988,8 +6992,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserDefaultFolder -f $MusicLocalizedString |
|
|
|
$Yes = $Localization.Yes |
|
|
@ -7006,8 +7008,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -7018,8 +7020,6 @@ public static string GetString(uint strId) |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Warning -Message $Localization.FilesWontBeMoved |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
|
|
$Title = "" |
|
|
|
$Message = $Localization.UserDefaultFolder -f $PicturesLocalizedString |
|
|
|
$Yes = $Localization.Yes |
|
|
@ -7036,8 +7036,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -7066,8 +7066,8 @@ public static string GetString(uint strId) |
|
|
|
} |
|
|
|
"1" |
|
|
|
{ |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Skipped -Verbose |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -10567,6 +10567,7 @@ function HEVC |
|
|
|
# Installing "HEVC Video Extensions from Device Manufacturer" |
|
|
|
if ([System.Version]$HEVCPackageName -gt [System.Version](Get-AppxPackage -Name Microsoft.HEVCVideoExtension).Version) |
|
|
|
{ |
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Patient -Verbose |
|
|
|
Write-Verbose -Message $Localization.HEVCDownloading -Verbose |
|
|
|
|
|
|
@ -13391,6 +13392,7 @@ function UpdateLGPEPolicies |
|
|
|
Write-Verbose -Message ([string]($_.FriendlyName, '|', $_.MediaType, '|', $_.BusType)) -Verbose |
|
|
|
} |
|
|
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
Write-Verbose -Message $Localization.Patient -Verbose |
|
|
|
Write-Verbose -Message $Localization.GPOUpdate -Verbose |
|
|
|
Write-Verbose -Message HKLM -Verbose |
|
|
|