major update to override Write-Output func
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user