Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
855f186aba | ||
|
|
10bd04c73d |
@@ -2,14 +2,21 @@ $key = "HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers"
|
|||||||
$name = "HwSchMode"
|
$name = "HwSchMode"
|
||||||
|
|
||||||
# Check to see if GPU scheduling is enabled
|
# Check to see if GPU scheduling is enabled
|
||||||
|
|
||||||
|
If ( Test-RegistryProperty -Path $key -Name $name ) {
|
||||||
$setting = (Get-ItemPropertyValue -Path $key -Name $name -ErrorAction SilentlyContinue)
|
$setting = (Get-ItemPropertyValue -Path $key -Name $name -ErrorAction SilentlyContinue)
|
||||||
If ( $setting -eq 2 ) {
|
If ( $setting -eq 2 ) {
|
||||||
LogMsg "Hardware assisted GPU scheduling is already enabled"
|
LogMsg "Hardware assisted GPU scheduling is already enabled"
|
||||||
$HardwareGPUSchedulingEnabled = $true
|
$HardwareGPUSchedulingEnabled = $true
|
||||||
} Else {
|
} Else {
|
||||||
LogMsg "Hardware assisted GPU scheduling is not currently enabled"
|
LogMsg "Hardware assisted GPU scheduling is disabled"
|
||||||
$HardwareGPUSchedulingEnabled = $false
|
$HardwareGPUSchedulingEnabled = $false
|
||||||
}
|
}
|
||||||
|
} Else {
|
||||||
|
LogMsg "Hardware assisted GPU scheduling is disabled"
|
||||||
|
$HardwareGPUSchedulingEnabled = $false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Find a GPU in the system so we can enable GPU scheduling
|
# Find a GPU in the system so we can enable GPU scheduling
|
||||||
If ( $HardwareGPUSchedulingEnabled -eq $false ) {
|
If ( $HardwareGPUSchedulingEnabled -eq $false ) {
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
|
$ScheduleCheckDisk = $false
|
||||||
|
|
||||||
# Run the System File Checker to scan for and repair any problems with protected system files
|
# Run the System File Checker to scan for and repair any problems with protected system files
|
||||||
LogMsg "Running System File Checker"
|
LogMsg "Running System File Checker"
|
||||||
$SFCOutput = $(sfc /scannow) | Out-String
|
$SFCOutput = $(sfc /scannow) | Out-String
|
||||||
LogMsg $SFCOutput
|
LogMsg $SFCOutput
|
||||||
|
|
||||||
|
$SFCOutputWithSpaces = " W i n d o w s R e s o u r c e P r o t e c t i o n d i d n o t f i n d a n y i n t e g r i t y v i o l a t i o n s ."
|
||||||
|
$SFCOutputWithoutSpaces = "Windows Resource Protection did not find any integrity violations."
|
||||||
|
If ( !($SFCOutput -match $SFCOutputWithSpaces) -or !($SFCOutput -match $SFCOutputWithoutSpaces) ) { $ScheduleCheckDisk = $true }
|
||||||
|
|
||||||
# Run enhanced DISM for Windows 8 and higher endpoints
|
# Run enhanced DISM for Windows 8 and higher endpoints
|
||||||
If ( IsWindowsVersion -ge "6.2" )
|
If ( IsWindowsVersion -ge "6.2" )
|
||||||
{
|
{
|
||||||
@@ -27,3 +33,9 @@ If ( IsWindowsVersion -ge "6.2" )
|
|||||||
LogMsg "Completed Windows Component Store log data collection"
|
LogMsg "Completed Windows Component Store log data collection"
|
||||||
}
|
}
|
||||||
Else { LogMsg "Online image cleanup and restoration is only supported on Windows 8 and higher" }
|
Else { LogMsg "Online image cleanup and restoration is only supported on Windows 8 and higher" }
|
||||||
|
|
||||||
|
# Schedule Check Disk if needed
|
||||||
|
If ( $ScheduleCheckDisk ) {
|
||||||
|
LogMsg "Check Disk scheduled to repair disk at next boot"
|
||||||
|
& echo y | chkdsk /F /R /X
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user