1781309997
This commit is contained in:
@@ -5,12 +5,17 @@
|
||||
# alt+y
|
||||
# Run:
|
||||
# In powershell Terminal:
|
||||
# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair2.ps1"; &"$env:TEMP\windows-repair2.ps1"
|
||||
# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair3.ps1"; &"$env:TEMP\windows-repair3.ps1"
|
||||
|
||||
# check if hasadmin rights, if notm run script in new terminal, clopsing old
|
||||
## if not, carry on
|
||||
if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) {
|
||||
# launch tghis script int new window after promopting for admin
|
||||
Start-Process -FilePath 'powershell' -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File $PSCommandPath"
|
||||
}
|
||||
|
||||
# CLOSE previous terminal
|
||||
exit 0
|
||||
} else {
|
||||
Write-Host "`nFIXING WINDOWS FULL STYLE`n"
|
||||
|
||||
Write-Host "ABORTING ANY SCHEDULED SHUTDOWN"
|
||||
@@ -44,3 +49,4 @@ Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot
|
||||
|
||||
Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n"
|
||||
shutdown /r /t 300
|
||||
}
|
||||
Reference in New Issue
Block a user