Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the urvanov-syntax-highlighter domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in C:\home\site\wwwroot\wp-includes\functions.php on line 6114
Set MPIO Policy via PowerShell for Storage Spaces – A Geeks World

Set MPIO Policy via PowerShell for Storage Spaces

Here is a small script to set the MPIO Policy via Powershell according to Microsofts Best Practices for Storage Spaces as seen here https://technet.microsoft.com/library/0923b851-eb0a-48ee-bfcb-d584363be668

It will set the Global MPIO policy to Least Block and then change the MPIO Policy for all SSD’s to Round Robin. Though, it’s possible that mpclaim.exe will use a different DiskID from what Powershell/Device Manager is using.
So the script has a built-in feature to adjust the DiskId if needed, though you have to verify and set the value manually before running the script! 

 

2 thoughts on “Set MPIO Policy via PowerShell for Storage Spaces”

  1. Tjena Marcus. Bra post. Hittade ett sätt att räkna ut MPIO disk ID dynamiskt.
    /Simon

    $ssds | %{
    # Get disk uniqueid
    Write-Output “Physical Disk Unique ID:”
    $UniqueID = $_.UniqueId

    $MPIODisk = (gwmi -Namespace root\wmi -Class mpio_disk_info).driveinfo | ?{$_.SerialNumber -eq $UniqueID}

    Write-Output “MPIO Disk:”
    $MPIODiskID = $MPIODisk.Name.Replace(“MPIO Disk”,””)
    $MPIODiskID
    $ArgumentList = “-l -d $MPIODisk 2”
    start-process “c:\windows\system32\mpclaim.exe” -ArgumentList $ArgumentList -Wait
    }

Leave a Reply