- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Setup and Networking
- >
- Automate Windows iSCSI Connections
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2013 09:16 AM
тАО02-21-2013 09:16 AM
Automate Windows iSCSI Connections
This script will work on Windows Server 2003, 2008, 2008R2, and 2012 with the native software iSCSI initiator. Any Nimble volumes accessible to the server will be mapped with all possible paths.
NOTE!
By default PowerShell scrips are disabled from running. You must set the PowerShell ExecutionPolicy to from Restricted to at least AllSigned. Please see this MS KB for more information : Using the Set-ExecutionPolicy Cmdlet Also it may be necessary to run this script from a PowerShell session launched with Administrator privileges.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2013 10:18 AM
тАО03-04-2013 10:18 AM
Re: Automate Windows iSCSI Connections
This script is great to use with customers/partners that bring up MPIO setup as a potential blocker to our solution. Great work Adam!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2013 03:22 AM
тАО03-06-2013 03:22 AM
Re: Automate Windows iSCSI Connections
Nice work Adam - it works every time.
Only question I have is if it would be possible to automate the failover policy to Least Queue Depth vs the Round Robin it defaults to?
A blog available on the web seems to have found a way to do this... Connecting MPIO iSCSI Targets via PowershellтАж and a bit of dirty VBscript.
twitter: @nick_dyer_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2013 07:27 AM
тАО03-07-2013 07:27 AM
Re: Automate Windows iSCSI Connections
Absolutely, it's very possible. I have an update that I'll post soon and that will be a part of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-15-2013 08:36 PM
тАО04-15-2013 08:36 PM
Re: Automate Windows iSCSI Connections
Thanks for the Script. Does this script automatically detect the Initiators and Nimble Target and maps them or we manually need to key in the parameters?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2013 12:24 AM
тАО04-16-2013 12:24 AM
Re: Automate Windows iSCSI Connections
Hey Sathish,
The script will automatically detect the Nimble volumes presented and will map/MPIO them for you. Give it a go on a windows VM - works perfectly!
twitter: @nick_dyer_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2013 08:52 AM
тАО04-18-2013 08:52 AM
Re: Automate Windows iSCSI Connections
When using this script, you would first have to define allowed connections to the Nimble volume through the web interface, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2013 08:56 AM
тАО04-18-2013 08:56 AM
Re: Automate Windows iSCSI Connections
Hi Hakan,
If i'm reading your question right - yes you have to configure your access control list correctly in the Nimble GUI/CLI for your host before you run the script on said host.
twitter: @nick_dyer_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2013 10:26 AM
тАО04-18-2013 10:26 AM
Re: Automate Windows iSCSI Connections
That's exactly what I meant. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2013 02:14 PM
тАО05-13-2013 02:14 PM
Re: Automate Windows iSCSI Connections
Adam,
I'm trying to run my script. I ran the Set-ExecutionPolicy RemoteSigned and then i tried launching the NimbleMPIO script but get this. Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2013 02:39 PM
тАО05-13-2013 02:39 PM
Re: Automate Windows iSCSI Connections
This could be one of two things.
- Try starting PowerShell as an administrator. You will need to right click on the PowerShell icon and select "Run as Administrator."
- If you are using a hardware dependent iSCSI card (eg Broadcom) and using it as the initiator instead of the Windows software iSCSI initiator. Use the normal network interfaces for IP connectivity instead of the hardware iSCSI initiator and it would fix this issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2013 11:45 AM
тАО05-14-2013 11:45 AM
Re: Automate Windows iSCSI Connections
Just wanted to update the forum with what my issue was. I just rebooted the host and it fixed the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2013 10:45 AM
тАО06-12-2013 10:45 AM
Re: Automate Windows iSCSI Connections
I found a bug in that script. The LoadBalancePolicy should be set to 4 and not 2 as is used in their script. Here's the corrected script.
---
$Policies = get-wmiobject -namespace ROOT\WMI -class DSM_QueryLBPolicy_V2
foreach($Policy in $Policies){
$Instance = $Policy.InstanceName
$objShare = Get-WmiObject -Namespace ROOT\WMI -Class DSM_LB_Operations | where{$_.InstanceName -eq $Instance}
$InParams = $objShare.GetMethodParameters(тАЬDsmSetLoadBalancePolicyALUAтАЭ)
Write-Host Current Policy is $MPIOPolicy[$policy.LoadBalancePolicy.LoadBalancePolicy] for $policy.InstanceName$policy.LoadBalancePolicy.LoadBalancePolicy = 2
$InParams.LoadBalancePolicy = $Policy.LoadBalancePolicy
$Inparams1 = $InParams.LoadBalancePolicy
$Inparams1.LoadBalancePolicy = 4
$Inparams.LoadBalancePolicy = $Inparams1
$outparams = $objShare.DsmSetLoadBalancePolicy($inparams.LoadBalancePolicy)
If ($outparams.Status = 2){Write-Host Policy Set to $MPIOPolicy[$Inparams1.LoadBalancePolicy]}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2013 02:11 AM
тАО07-10-2013 02:11 AM
Re: Automate Windows iSCSI Connections
Hey Adam,
Did the update with Least Queue Depth change ever get released ?
Thanks
Rich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2013 11:04 AM
тАО08-27-2013 11:04 AM
Re: Automate Windows iSCSI Connections
Hey Adam,
I get the following message when I try to run in Windows 2003 R2. New to PowerShell so any help would do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2013 02:37 PM
тАО08-27-2013 02:37 PM
Re: Automate Windows iSCSI Connections
Never mind. Installed PowerShell 2.0 and it ran successfully; however, it made double amount of persistent connection for each volume.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2013 03:49 PM
тАО08-27-2013 03:49 PM
Re: Automate Windows iSCSI Connections
Hey Adam,
Is this script something I could use to do a daily VSS snapshot (clone and mount) for an additional SQL server that needs less resources and privileges?
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2013 09:09 AM
тАО12-09-2013 09:09 AM
Re: Automate Windows iSCSI Connections
I am having a problem with this script on a Windows 2008R2 server. I have downloaded the script twice and unzipped it, but keep getting the same error about the hash of the file not matching the digital signature. I am running Powershell as Administrator. Is there a security problem with the NimbleMPIO.ps1 script available for download?
PS C:\Users\hprudhommeadm\Documents\NimbleMPIO.ps1> .\NimbleMPIO.ps1
File C:\Users\hprudhommeadm\Documents\NimbleMPIO.ps1\NimbleMPIO.ps1 cannot be loaded. The contents of file C:\Users\hprudhommeadm\Documents\NimbleMPIO.ps1\NimbleMPIO.ps1 may have been tampered because the hash of the file does not match the hash stored in the digital signature. The script will not execute on the system. Please see "get-help about_signing"
for more details..
At line:1 char:17
+ .\NimbleMPIO.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
Thanks,
Henri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2018 02:22 AM
тАО07-09-2018 02:22 AM
Re: Automate Windows iSCSI Connections
Hi Henri,
You may have to change the execution policy for PowerShell. Get the following help to get more information in order to decide what to select - "help about_Execution_Policies".
Try below PowerShell command:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Rajesh Balakrishnan
I am a HPE Employee