Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- New-BurntToastNotification -AppLogo "C:\Users\Redacted\Documents\DISM & SFC logs\Resources\spanner.jpg" -Text "Initiating Chkdsk"
- if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
- Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
- exit;
- }
- . "C:\Users\Redacted\Documents\DISM & SFC logs\Resources\Chkdsk\Chkdsk & Backup Functions.ps1"
- # template ends
- # Script specifics begin
- # Preparatory Steps
- Start-UnattendedPowerPlanEnable
- # Main Course
- $JobType = "Chkdsk"
- $OriginDriveLabel = "Master Storage"
- Start-ScriptedStart
- Start-ChkdskCommand
- New-BurntToastNotification @LogoSplat -Text "$JobType for $OriginDriveLabel Complete. For logs, see C:\Users\Redacted\Documents\DISM & SFC logs"
- Start-Sleep -Seconds 10
- Start-InstanceCheckandShutdown
- Stop-Transcript
Advertisement
Add Comment
Please, Sign In to add comment