major update to override Write-Output func

This commit is contained in:
2023-10-05 13:11:38 -04:00
parent 31a06a9206
commit bbb4884818
52 changed files with 377 additions and 378 deletions
+4 -4
View File
@@ -6,16 +6,16 @@ If ( IsWindowsVersion -ge "10.0" ) {
$FILEDIR = Split-Path -Path $FILE -Parent
If ( Test-Path $FILE ) {
LogMsg "Clearing Quick Access links"
Write-Output "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"
Write-Output "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!"
Write-Output "Quick Access lists cannot be found!"
}
} Else {
LogMsg "Quick Access is only available on Windows 10 or greater"
Write-Output "Quick Access is only available on Windows 10 or greater"
}