added script
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Make sure the computer is running Windows 10
|
||||
If ( IsWindowsVersion -ge "10.0" ) {
|
||||
|
||||
# Path to the Quick Access link list
|
||||
$FILE = "${Env:AppData}\Microsoft\Windows\Recent\AutomaticDestinations\f01b4d95cf55d32a.automaticDestinations-ms"
|
||||
$FILEDIR = Split-Path -Path $FILE -Parent
|
||||
|
||||
If ( Test-Path $FILE ) {
|
||||
LogMsg "Clearing Quick Access links"
|
||||
Try { Remove-Item $FILE -Force }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
} ElseIf ( Test-Path $FILEDIR ) {
|
||||
LogMsg "Standard Quick Access link list is not found, clearing out all automatic destinations instead"
|
||||
Try { Get-ChildItem "${FILEDIR}\*.*" | Where-Object { -not $_.PSIsContainer } | Remove-Item -Force }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
} Else {
|
||||
LogMsg "Quick Access lists cannot be found!"
|
||||
}
|
||||
} Else {
|
||||
LogMsg "Quick Access is only available on Windows 10 or greater"
|
||||
}
|
||||
Reference in New Issue
Block a user