December 25th, 2012

PowerTip: Get ISCSIConnections on Remote Server

Doctor Scripto
Scripter

Summary: Use Windows PowerShell 3.0 on Windows 8 or Windows Server 2012 to get ISCSI connections from a remote server.

Hey, Scripting Guy! Question How can I get ISCSI connection information from a remote server?

Hey, Scripting Guy! Answer First, create a new CIM session by using the New-CimSession cmdlet and specify the target server and credentials appropriate for that machine. Next, use the Get-ISCSIConnection cmdlet / function to retrieve the information, as shown here.

$hyperv2 = New-CimSession -ComputerName hyperv2 -Credential nwtraders\administrator

Get-IscsiConnection -CimSession $hyperv2

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.