Skip to content

Instantly share code, notes, and snippets.

View MalikSayriii's full-sized avatar
🙃
The Art Of Knowing is, Knowing What To Ignore...

Malik Sarfraz MalikSayriii

🙃
The Art Of Knowing is, Knowing What To Ignore...
View GitHub Profile
#Requires -RunAsAdministrator
Stop-Service -Name @("bits","wuauserv","appidsvc","cryptsvc")
del "$env:ALLUSERSPROFILE\Application Data\Microsoft\Network\Downloader\qmgr*.*"
if(Test-Path variable:global:errs) {Remove-Variable -Name @("errs") -ErrorAction SilentlyContinue } #$err = $null
$errs = [System.Collections.ArrayList](@{})
function Start-Backup {
param([string[]]$paths = @("$env:SystemRoot\system32\catroot2","$env:SystemRoot\SoftwareDistribution"))
foreach($path in $paths){
$bak = "$($path).bak"
if((Test-Path -PathType Any $bak) -and (Test-Path -PathType Any $path)){