Appletax
Well-Known Member
- Reaction score
- 395
- Location
- Northern Michigan
I want to use Repair-Volume (PowerShell, new) instead of Check Disk (Command Prompt, old).
Can't get my script to work.
Repair-Volume -DriveLetter C -OfflineScanAndFix
Created in PowerShell ISE and saved as a .ps1 file.
Super basic version. Does not work. Discovered that by default, Windows 10 has PowerShell in Restricted mode - absolutely no PowerShell scripts will run.
Changed to Unrestricted mode to run any PowerShell scripts.
Opened PowerShell with admin privs and ran the script. Tried -ExecutionPolicy ByPass. Nothing works.
If I run the command within PowerShell admin mode (no script used), I instantly get the message "NoErrorsFound".
Here's the PowerShell ISE Debug results:

Can't get my script to work.
Repair-Volume -DriveLetter C -OfflineScanAndFix
Created in PowerShell ISE and saved as a .ps1 file.
Super basic version. Does not work. Discovered that by default, Windows 10 has PowerShell in Restricted mode - absolutely no PowerShell scripts will run.
Changed to Unrestricted mode to run any PowerShell scripts.
Opened PowerShell with admin privs and ran the script. Tried -ExecutionPolicy ByPass. Nothing works.
If I run the command within PowerShell admin mode (no script used), I instantly get the message "NoErrorsFound".
Here's the PowerShell ISE Debug results:

Last edited: