HP Sure Recover User Guide





16



 
\r\n(CR + LF) 

















powershell 












C:\staging
CD /D C:\staging
1. 


powershell 





 UTF 8 without BOM 




: notepad C:\staging\generate-manifest.ps1




:
$mftFilename = "custom.mft"
$imageVersion = 1907 (
: 

16
)
$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()



7