Solved

Command for MPIO

Posted on 2014-01-14
12
1,754 Views
Last Modified: 2014-02-21
I am looking for a command or a script to find the version of MPIO for a list of servers (Win2k8 and Win2k3)
0
Comment
Question by:jmohan0302
  • 7
  • 5
12 Comments
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39780974
You can manage MPIO using PowerShell but MultiPath I/O is available on Windows Server 2012 only.

Here are the cmdlets for MPIO on Microsoft TechNet: MultiPath I/O (MPIO) Cmdlets in Windows PowerShell

Another nice article can be found here: Managing MPIO with Windows PowerShell on Windows Server 2012
0
 

Author Comment

by:jmohan0302
ID: 39783775
Thnx.  I would like to know can this be used to find the version of MPIO. It will be helpful if I get a script to find this
0
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39784023
During the MPIO install on Windows Server 2008 R2 corresponding registry subkeys are created. You could write a script to query remote computers if such registry subkeys exist.
For example, to find MPIO driver version on remote computer type:

C:\Windows\system32>reg query \\Machine\HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\0004 /s

where Machine is the name of the computer you are querying. If the command is run locally, \\Machine\ is omitted.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:jmohan0302
ID: 39784405
I tried this command but I am getting the below error:

ERROR: The system was unable to find the specified registry key or value.

whats next
0
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39784711
Try first searching if MPIO specific registry entry exist, and if it does query the key to find driver version. Examples below perform search on local server.

1. search for entries

reg query HKLM\SYSTEM\CurrentControlSet\Control\Class /s /f "Microsoft Multi-Path Bus Driver"

2. query the key you got as a result to find driver version. It should be listed under DriverVersion
(I am using the key I got from one of my servers as an example)

reg query HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\0004
0
 

Author Comment

by:jmohan0302
ID: 39785605
I got the following output from one of my machine, in this where can I find the MPIO version, also the powershell command let is not found for MPIO, do I need to install any powershell module for MPIO


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BF
C1-08002BE10318}
    LegacyAdapterDetection    REG_DWORD    0x0
    Class    REG_SZ    SCSIAdapter
    ClassDesc    REG_SZ    @%SystemRoot%\System32\SysClass.Dll,-3005
    (Default)    REG_SZ    Storage controllers
    IconPath    REG_MULTI_SZ    %SystemRoot%\System32\setupapi.dll,-10
    Installer32    REG_SZ    SysClass.Dll,ScsiClassInstaller

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BF
C1-08002BE10318}\0000
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BF
C1-08002BE10318}\Properties
0
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39785998
I omitted to say that I have typed these commands in cmd.exe.

This command in PowerShell lists Microsoft MPIO driver version:

Get-ItemProperty -Path c:\windows\system32\drivers\mpio.sys | Format-List -Property *

To check if module is installed, type:

Get-WindowsOptionalFeature –Online –FeatureName MultiPathIO

If you have another version MPIO solution modify path to list specific drivers properties.
0
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39811737
Have you tried yet the PowerShell commands from the last comment?
0
 

Author Comment

by:jmohan0302
ID: 39820942
multipath IO has been installed, but none of the MPIO commands in the powershell is working......
0
 
LVL 6

Accepted Solution

by:
Sasa Kranjac earned 500 total points
ID: 39823679
Hmm...

Usually the MPIO driver in Windows is mpio.sys. Regardless of the file and its vendor the point is to find the version of the file/driver.

Try this command:

driverquery /S system /U domain\username /P password /FO CSV > driverlist.csv
where system is the remote computer you are querying; domain and username are credentials you use to connect to query the remote computer. If /P password is omitted then you will be asked for password; /FO CSV > directs output to driverlist.csv file in the working folder.

What is even better, PowerShell can do this and a lot more:

driverquery.exe /v /fo csv | ConvertFrom-CSV
will get you a list and properties of installed drivers. To make it more readable and choose what do display (for example) type:

driverquery.exe /v /fo csv | ConvertFrom-CSV | Select-Object "Display Name", "State", "Status", Path
Finally, to find out a version of the file (shell32.dll is used as an example) type either:

(Get-Command c:\windows\system32\shell32.dll).FileVersionInfo
or

[System.Diagnostics.FileVersionInfo]::GetVersionInfo("c:\windows\system32\shell32.dll").FileVersion
I prefer the first one instead of calling .NET class because it has more readable output.
0
 

Author Closing Comment

by:jmohan0302
ID: 39871286
thnx
0
 
LVL 6

Expert Comment

by:Sasa Kranjac
ID: 39877529
You're welcome!
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now