Array Setup and Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Automate Windows iSCSI Connections

 
Highlighted
Trusted Contributor

Re: Automate Windows iSCSI Connections

This could be one of two things.

  1. Try starting PowerShell as an administrator. You will need to right click on the PowerShell icon and select "Run as Administrator."
  2. 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.
Highlighted
Not applicable

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.

Highlighted
New Member

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.

---

$MPIOPolicy = (“Non-Selected”,”Failover Only”,”Round Robin”,”Round Robin with Subset”,”Least Queue Depth”,”Weighted Paths”,”Least Blocks”)

$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]}

}

Highlighted
Honored Contributor

Re: Automate Windows iSCSI Connections

Hey Adam,

Did the update with Least Queue Depth change ever get released ?

Thanks
Rich

Highlighted
New Member

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.

nimblempio error.png

Highlighted
New Member

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.

Highlighted
Advisor

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

Highlighted
New Member

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

Highlighted
Frequent Advisor

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

 

Regards
Rajesh Balakrishnan
I am a HPE Employee