### Run Windows Setup with Unattend File Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Command to initiate Windows Setup using an answer file that excludes the DiskConfiguration section. ```cmd setup.exe /unattend:X:\unattend.xml ``` -------------------------------- ### Get File Integrity Settings Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams Retrieve the integrity stream status for a specific file or all files within a directory. ```PowerShell PS C:\> Get-FileIntegrity -FileName 'C:\Docs\TextDocument.txt' ``` ```PowerShell PS C:\> Get-Item -Path 'C:\Docs\*' | Get-FileIntegrity ``` -------------------------------- ### Configure and enable WinRE Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Commands to create the recovery directory, copy the WinRE image, and register it with the system. ```cmd mkdir :\Recovery\WindowsRE xcopy /h C:\Windows\System32\Recovery\Winre.wim :\Recovery\WindowsRE\ reagentc /setreimage /path :\Recovery\WindowsRE /target C:\Windows reagentc /enable reagentc /info ``` -------------------------------- ### Create a mirror-accelerated parity volume using PowerShell Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/mirror-accelerated-parity Uses the New-Volume cmdlet to define a volume with performance and capacity storage tiers. ```PowerShell New-Volume -FriendlyName "TestVolume" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName "StoragePoolName" -StorageTierFriendlyNames Performance, Capacity -StorageTierSizes 200GB, 800GB ``` -------------------------------- ### Unattend.xml for UEFI/GPT ReFS Boot and NTFS WinRE Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend This configuration sets up a disk with EFI, MSR, ReFS-formatted OS, and NTFS-formatted recovery partitions for Windows Server deployment. ```xml 0 true 1 EFI 200 2 MSR 16 3 Primary 120000 4 Primary 2048 1 1 FAT32 2 2 3 3 C REFS 4 4 NTFS DE94BBA4-06D1-4D40-A16A-BFD50179D6AC OnError 0 3 false ``` -------------------------------- ### Execute DiskPart Script Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Command to run the prepared layout script from the Windows PE command prompt. ```cmd diskpart /s X:\layout.txt ``` -------------------------------- ### DiskPart Script for ReFS Boot Layout Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend A script to clean a disk, convert it to GPT, and create the necessary EFI, MSR, OS (ReFS), and Recovery partitions. ```text rem === ReFS boot layout for UEFI and GPT === select disk 0 clean convert gpt rem 1. EFI System Partition (use size=200 on 512/512e disks; use size=300 on 4Kn disks) create partition efi size=200 format quick fs=fat32 label="System" assign letter=S rem 2. Microsoft Reserved create partition msr size=16 rem 3. Windows (OS) partition - ReFS (size=120000 is an example only, not a requirement; to fill the disk use (total disk size in MB) - 200 (ESP) - 16 (MSR) - 2048 (recovery), leaving no trailing unallocated space) create partition primary size=120000 format quick fs=refs label="Windows" assign letter=C rem 4. Windows Recovery (WinRE) partition - NTFS, 2 GB, marked as recovery create partition primary size=2048 format quick fs=ntfs label="Recovery" assign letter=R set id="DE94BBA4-06D1-4D40-A16A-BFD50179D6AC" gpt attributes=0x8000000000000001 list partition exit ``` -------------------------------- ### Verify ReFS volume using PowerShell Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Use the Get-Volume cmdlet to display the file system type of the boot drive. ```PowerShell Get-Volume -DriveLetter C | Format-List DriveLetter, FileSystemType, Size, SizeRemaining ``` -------------------------------- ### Verify ReFS volume using Command Prompt Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Use the fsutil command to inspect volume information and confirm the file system name. ```Windows Command Prompt fsutil fsinfo volumeinfo C: ``` -------------------------------- ### Configure DataDestageSsdFillRatioThreshold Registry Key Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/mirror-accelerated-parity PowerShell commands to set the registry key for adjusting the mirror tier rotation threshold. ```powershell Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Policies -Name DataDestageSsdFillRatioThreshold -Value 75 ``` ```powershell $Nodes = 'S2D-01', 'S2D-02', 'S2D-03', 'S2D-04' Invoke-Command $Nodes {Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Policies -Name DataDestageSsdFillRatioThreshold -Value 75} ``` -------------------------------- ### Resize Storage Tier Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/mirror-accelerated-parity PowerShell cmdlets to increase the size of the mirrored storage tier. ```powershell Resize-StorageTier -FriendlyName "Performance" -Size 20GB Resize-StorageTier -InputObject (Get-StorageTier -FriendlyName "Performance") -Size 20GB ``` -------------------------------- ### Check WinRE status Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Use this command to confirm the current state and location of the Windows Recovery Environment. ```cmd reagentc /info ``` -------------------------------- ### Set File Integrity Settings Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/integrity-streams Enable or disable integrity streams for specific files, directories, or entire volumes. ```PowerShell PS C:\> Set-FileIntegrity -FileName 'H:\Docs\TextDocument.txt' -Enable $True ``` ```PowerShell PS C:\> Get-Item -Path 'H\Docs\*' | Set-FileIntegrity -Enable $True ``` ```PowerShell PS C:\> Set-FileIntegrity H:\ -Enable $True PS C:\> Set-FileIntegrity H:\Docs -Enable $True ``` -------------------------------- ### Monitor ReFS Performance Counters Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/mirror-accelerated-parity Performance counters used to identify when ReFS writes directly to the parity tier due to mirror tier saturation. ```text # Windows Server 2016 ReFS\Data allocations slow tier/sec ReFS\Metadata allocations slow tier/sec # Windows Server 2019 ReFS\Allocation of Data Clusters on Slow Tier/sec ReFS\Allocation of Metadata Clusters on Slow Tier/sec ``` -------------------------------- ### Manage recovery partition drive letter Source: https://learn.microsoft.com/en-us/windows-server/storage/refs/refs-boot-windows-server-unattend Commands to assign or remove a drive letter for a hidden recovery partition using DiskPart. ```diskpart select disk 0 select partition 4 assign letter=R exit ``` ```diskpart select disk 0 select partition 4 remove letter=R exit ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.