Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell
Installing PowerShell - PowerShell | Microsoft Docs
PS C:\WINDOWS\system32> sfc /scannow
Beginning system scan. This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection did not find any integrity violations.
PS C:\WINDOWS\system32> sfc /scannowsfc /scannow
Microsoft (R) Windows (R) Resource Checker Version 6.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scans the integrity of all protected system files and replaces incorrect versions with
correct Microsoft versions.
SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
[/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory> [/OFFLOGFILE=<log file path>]]
/SCANNOW Scans integrity of all protected system files and repairs files with
problems when possible.
/VERIFYONLY Scans integrity of all protected system files. No repair operation is
performed.
/SCANFILE Scans integrity of the referenced file, repairs file if problems are
identified. Specify full path <file>
/VERIFYFILE Verifies the integrity of the file with full path <file>. No repair
operation is performed.
/OFFBOOTDIR For offline repair, specify the location of the offline boot directory
/OFFWINDIR For offline repair, specify the location of the offline windows directory
/OFFLOGFILE For offline repair, optionally enable logging by specifying a log file path
e.g.
sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows /OFFLOGFILE=c:\log.txt
sfc /VERIFYONLY
PS C:\WINDOWS\system32> dism /online /cleanup-image /scanhealth
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Image Version: 10.0.18362.535
[==========================100.0%==========================] The component store is repairable.
The operation completed successfully.
PS C:\WINDOWS\system32> dism /online /cleanup-image /restorehealth
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Image Version: 10.0.18362.535
[===========================87.5%================== ]
Error: 0x800f081f
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see
http://go.microsoft.com/fwlink/?LinkId=243077.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
PS C:\WINDOWS\system32> sfc /scannow
Beginning system scan. This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection did not find any integrity violations.
PS C:\WINDOWS\system32> chkdsk /scan
The type of the file system is NTFS.
Volume label is Windows.
Stage 1: Examining basic file system structure ...
585984 file records processed.
File verification completed.
7991 large file records processed.
0 bad file records processed.
Stage 2: Examining file name linkage ...
1222 reparse records processed.
724946 index entries processed.
Index verification completed.
0 unindexed files scanned.
0 unindexed files recovered to lost and found.
1222 reparse records processed.
Stage 3: Examining security descriptors ...
Security descriptor verification completed.
69482 data files processed.
CHKDSK is verifying Usn Journal...
39341936 USN bytes processed.
Usn Journal verification completed.
Windows has scanned the file system and found no problems.
No further action is required.
248636415 KB total disk space.
106360076 KB in 324752 files.
207992 KB in 69483 indexes.
0 KB in bad sectors.
708595 KB in use by the system.
65536 KB occupied by the log file.
141359752 KB available on disk.
4096 bytes in each allocation unit.
62159103 total allocation units on disk.
35339938 allocation units available on disk.
PS C:\WINDOWS\system32> wmic recoveros set autoreboot = false
Updating property(s) of '\\AGAVEVILLE\ROOT\CIMV2:Win32_OSRecoveryConfiguration.Name="Microsoft Windows 10 Home|C:\\WINDOWS|\\Device\\Harddisk0\\Partition3"'
Property(s) update successful.
PS C:\WINDOWS\system32> wmic recoveros set DebugInfoType = 7
Updating property(s) of '\\AGAVEVILLE\ROOT\CIMV2:Win32_OSRecoveryConfiguration.Name="Microsoft Windows 10 Home|C:\\WINDOWS|\\Device\\Harddisk0\\Partition3"'
Property(s) update successful.
PS C:\WINDOWS\system32> wmic recoveros get autoreboot
AutoReboot
FALSE
PS C:\WINDOWS\system32> wmic recoveros get DebugInfoType
DebugInfoType
7
PS C:\WINDOWS\system32> bcdedit /enum {badmemory}
Invalid command line switch: /encodedCommand
Run "bcdedit /?" for command line assistance.
The parameter is incorrect.
PS C:\WINDOWS\system32>