Skip to content

Instantly share code, notes, and snippets.

@Nora-Ballard
Created February 15, 2014 18:54
Show Gist options
  • Select an option

  • Save Nora-Ballard/9023545 to your computer and use it in GitHub Desktop.

Select an option

Save Nora-Ballard/9023545 to your computer and use it in GitHub Desktop.
Claim all Windows iSCSI disks for MPIO
:MPIO
echo MPIO: Checking claimed BusTypes.
SET MSFT_BUSTYPE_iSCSI=MSFT2005iSCSIBusType_0x9
FOR /f "tokens=* delims==" %%G IN ('mpclaim -h ^|find "%MSFT_BUSTYPE_iSCSI%"') DO SET FOUND_iSCSI=%%G
mpclaim -h
echo.
if (%FOUND_iSCSI%) == ("%MSFT_BUSTYPE_iSCSI%") GOTO MPIO_Complete
:MPIO_Claim
echo MPIO: Claiming iSCSI BusType.
mpclaim.exe -r -i -d "%MSFT_BUSTYPE_iSCSI%"
echo.
:MPIO_Complete
echo MPIO: iSCSI BusType claimed.
echo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment