From 72445c170157b81ffd117d8844b85bfaa7a72e83 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Thu, 5 Oct 2023 13:35:12 -0400 Subject: [PATCH] remove alias in favor of calling exe --- Fix-WindowsHealth.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fix-WindowsHealth.ps1 b/Fix-WindowsHealth.ps1 index 9d05cd9..66d0358 100644 --- a/Fix-WindowsHealth.ps1 +++ b/Fix-WindowsHealth.ps1 @@ -35,6 +35,6 @@ Else { Write-Output "Online image cleanup and restoration is only supported on W # Schedule Check Disk if needed If ( $ScheduleCheckDisk ) { - Write-Output "Check Disk scheduled to repair disk at next boot" - & echo y | chkdsk /F /R /X + Write-Output "Scheduling disk repair at next boot" + Start-Process "cmd.exe" -ArgumentList '/C echo y | chkdsk /F /R /X' -Wait } \ No newline at end of file