HP Sure Recover User Guide
CD /D C:\staging
1. Tạo powershell script bằng cách sử dụng một trình soạn thảo có thể tạo tệp tin văn bản theo 
định dạng UTF-8 và không có BOM, bằng lệnh sau: notepad C:\staging\generate-
manifest.ps1
Tạo script sau:
$mftFilename = "custom.mft"
$imageVersion = 1907 (Lưu ý: Số này có thể là bất kỳ số nguyên 16-bit nào)
$header = "mft_version=1, image_version=$imageVersion"
Out-File -Encoding UTF8 -FilePath $mftFilename -InputObject $header
$swmFiles = Get-ChildItem "." -Filter "*.swm"
$ToNatural = { [regex]::Replace($_, '\d*\....$', 
{ $args[0].Value.PadLeft(50) }) }
$pathToManifest = (Resolve-Path ".").Path
$total = $swmFiles.count
$current = 1
$swmFiles | Sort-Object $ToNatural | ForEach-Object {
 Write-Progress
 -Activity "Generating manifest" `
 -Status "$current of $total ($_)" `
 -PercentComplete ($current / $total * 100)
 $hashObject = Get-FileHash -Algorithm SHA256 -Path $_.FullName
 $fileHash = $hashObject.Hash.ToLower()
 $filePath = $hashObject.Path.Replace($pathToManifest + '\', '')
 $fileSize = (Get-Item $_.FullName).length
 $manifestContent = "$fileHash $filePath $fileSize"
 Out-File -Encoding utf8 -FilePath $mftFilename -InputObject 
$manifestContent -Append
 $current = $current + 1
}
Tạo tập tin kê khai 7










