adjusted for removal of Remove-File cmdlet

This commit is contained in:
2023-10-06 14:16:19 -04:00
parent 7f98291e12
commit 8fa1f1ef61
6 changed files with 9 additions and 14 deletions
+3 -2
View File
@@ -28,5 +28,6 @@ Try { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
Catch { Write-Error $_.Exception.Message }
# Delete the desktop icon
"${Env:PUBLIC}\Desktop\Emberkom Backup.LNK",
"${Env:PUBLIC}\Desktop\Emberkom Cloud Backup.LNK" | Remove-File
Write-Output "Removing desktop icon"
Remove-Item -Path "${Env:PUBLIC}\Desktop\Emberkom Backup.LNK" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "${Env:PUBLIC}\Desktop\Emberkom Cloud Backup.LNK" -Force -ErrorAction SilentlyContinue
+1 -1
View File
@@ -1,5 +1,5 @@
# Run SFC to check the filesystem, convert the result from Unicode to UTF8, delete the intermediate $tempFile
$tempFile = Get-RandomTempFile
$tempFile = New-TemporaryFile
$(sfc.exe /scannow) | Out-File $tempFile
Set-Content -Path $tempFile -Value $(Get-Content -Path $tempFile -Encoding Unicode) -Encoding UTF8
$SFCOutput = Get-Content -Path $tempFile
+1 -1
View File
@@ -29,7 +29,7 @@ If ( -not (Test-Path $SHORTCUT_PATH) ) {
If ( $BROWSER_PATH ) {
Write-Output "Installing Deltek Vision for ${APP_NAME}"
Create-Shortcut -Path "${Env:Public}\Desktop\Deltek Vision.lnk" -TargetPath $BROWSER_PATH -Arguments $VisionURL -Description "Launch Deltek Vision"
New-Shortcut -Path "${Env:Public}\Desktop\Deltek Vision.lnk" -TargetPath $BROWSER_PATH -Arguments $VisionURL -Description "Launch Deltek Vision"
}
Else { Write-Output "A compatible browser could not be found: ${BROWSER_PATH}" }
}
+3 -2
View File
@@ -42,5 +42,6 @@ Try { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
Catch { Write-Error $_.Exception.Message }
# Delete the desktop icon
"${Env:PUBLIC}\Desktop\Emberkom Backup.LNK",
"${Env:PUBLIC}\Desktop\Emberkom Cloud Backup.LNK" | Remove-File
Write-Output "Removing desktop icon"
Remove-Item -Path "${Env:PUBLIC}\Desktop\Emberkom Backup.LNK" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "${Env:PUBLIC}\Desktop\Emberkom Cloud Backup.LNK" -Force -ErrorAction SilentlyContinue
+1 -1
View File
@@ -22,7 +22,7 @@ If ( IsAdmin )
## Create shortcut on Public desktop
If ( $CreateDesktopShortcut ) {
Create-Shortcut -Path "${Env:Public}\Desktop\WireGuard VPN.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
New-Shortcut -Path "${Env:Public}\Desktop\WireGuard VPN.LNK" -TargetPath "${Env:ProgramFiles}\WireGuard\wireguard.exe" -Description "WireGuard: Fast, Modern, Secure VPN Tunnel"
}
}
Else { Write-Output "Must be an administrator to install WireGuard" }
-7
View File
@@ -1,7 +0,0 @@
$LogsToEnable = @(
''
)
ForEach ( $log in $LogsToEnable ) {
Toggle-Log -Name $log -Enable
}