Powershell: Get LUN name of a connected iSCSI Device
-
Thursday, November 22, 2012 8:18 AM
Hi,
how can I get the real name (of the LUN) of the connected iSCSI "disk" with powershell?
Windows storage server 2008 R2 has a powershell module which can do that, but how can I get similar functionality without it?
I could not find a wmi MSiSCSI class with the information I was looking for.
The Result should look like this:
Id : Server0.contoso.local:FileCluster
TargetName : FileCluster
TargetIqn : iqn.1991-05.com.microsoft:server0-filecluster-target
Description : Storage for File Server Cluster
Enable : True
Status : Connected
ComputerName : Server0.contoso.local
InitiatorIds : {IPAddress:192.168.100.1, IPAddress:192.168.100.2}
LunMappings : {TargetName:FileCluster;WTD:0;LUN:0, TargetName:FileCluster;WTD:1;LUN:1} # THIS IS THE INFO I'M ASKING FOR
Version : 3.3.16543
ServerInfo : Server0.contoso.localBest Regards
..next time we eat bacon
All Replies
-
Tuesday, December 18, 2012 10:46 PMModerator
Hi,
Please read the following:
Bill
- Marked As Answer by Bill_StewartMicrosoft Community Contributor, Moderator Tuesday, January 22, 2013 9:06 PM
-
Wednesday, December 19, 2012 12:37 AM
Why don't you want to use the CmdLets that are designed for it?
¯\_(ツ)_/¯

