Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Command for MPIO

Posted on 2014-01-14
12
Medium Priority
?
2,488 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:Sasha 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:Sasha 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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:Sasha 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:Sasha 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:Sasha 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:
Sasha Kranjac earned 2000 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:Sasha Kranjac
ID: 39877529
You're welcome!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

886 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