Array Setup and Networking
1752790 Members
6485 Online
108789 Solutions
New Discussion

PowerShell Module

 
sniperowl42
New Member

Re: PowerShell Module

Just for my own sanity check, is the Connect-NSArray not working with 2.XXX firmware?  Just wondering because I get the same error that it can't log in.

marktheblue45
Valued Contributor

Re: PowerShell Module

Have you loaded the Nimble powershell module?

dellee131
New Member

Re: PowerShell Module

When running the iex command in the original post, I get the error below.  Any clues as to what the problem is?

The term 'param' is not recognized as the name of a cmdlet, function, script

file, or operable program. Check the spelling of the name, or if a path was in

cluded, verify that the path is correct and try again.

At line:1 char:9

+ param <<<< ([string]$InstallDirectory)

    + CategoryInfo          : ObjectNotFound: (param:String) [], CommandNot

   FoundException

    + FullyQualifiedErrorId : CommandNotFoundException

marktheblue45
Valued Contributor

Re: PowerShell Module

Type the line below:-

iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/jrich523/NimblePowerShell/master/Install.ps1')

dellee131
New Member

Re: PowerShell Module

Mark, that appears to be the same command listed in the original post.  That's what I was using when I got the error.  It turns out that part of the issue was I was using Powershell 2.0.  When I installed Powershell 3.0, I no longer get that error.

Thanks,

Del

nimblenoob11
New Member

Re: PowerShell Module

I had to wrap the entire iex statement in an extra pair of parenthesis () to get it to work on Powershell latest and greatest on 2012 R2. This tells the compiler that anything inside of the first wrapper () is being used for iex. Whereas without the outer wrapper of () the compiler doesn't understand how to use the statement.

See below:

iex ((new-object System.Net.WebClient).DownloadString('https://raw.github.com/jrich523/NimblePowerShell/master/Install.ps1'))


I also want to give a shoutout to Justin for an incredible and easy-to-use way of accessing our Nimble arrays the Windows admin way. Thanks man, this is a great contribution to the communinity!


-Regards,

Andrew

keithhp98
Occasional Advisor

Re: PowerShell Module

Hi Justin

Awesome plug-in - major life and time saver over the last 18 months!

During a new green-field DC roll-out - I grabbed a copy of the V2 code published Jan 8th 2014 as the new array is 2.x (and the others we have are 1.4) - and tested against an array running 2.2.3.0-167018-opt (latest as of this date) firmware.

There were several errors reported during login, Get-NSVolume and Snapping, so I dived into the code and made some minor changes to 3 of the PS1 files (login.ps1, Initiator.ps1 and Snap.ps1).

The changes have all been noted in a fork in your GitHub release.. ( gitHub labelled this as patch-1 )   - hopefully I did this right - first time I have used GitHub  - so you can review them and approve if you're happy with them     ( If you want a zipped copy to compare against cause I messed the GH update up - let me know)

So - basically, the module is now running again on the latest array firmware and the latest OS revision :

Test Environment:

     CS300 Array - running firmware 2.2.3.0-167018-opt

     2 x Windows 2012 R2 Server with Nimble WIT v2.2.3.432 installed (both physical and VM-direct assigned iscsi)

Tests Achieved / Working:

     Connect-NSServer

     Get-NSVolume

     Get-NSSnapshot

     Get-NSInitiatorGroup

     Get-NSPerfPolicy TestVol

     Get-NSVolume | GetNSPerfPolicy

     Add-NSInitiatorGroupToVolume "TestVol" "TestServ" "Both"

     Get-NSVolume -name "TestVol" | New-NSsnapshot -name "Testsnap"

     Get-NSVolume -name "TestVol" | get-nssnapshot | select -first 1 | New-NSClone -name "TestClonedVol"  ( Takes latest snap from a Prot Group and clones it to a volume for mounting on the backup server ! )

     Add-NSInitiatorGroupToVolume "TestVol" "TestServ" "Both"

     Add-NSInitiatorGroupToVolume "TestClonedVol" "BackupServ" "Both"

     $NewVol = New-NSVolume -Name $NewDiskName.ToString() -Size $NewDiskSize -Description "New Volume" -PerformancePolicy $NewDiskPerf

There are more tests to do : I'll update the GH if there are any other snags found.

Cheers dude.

Keith.

keithhp98
Occasional Advisor

Re: PowerShell Module

Hi Aldo,

Not sure if you have access to the "patch-1" area I just put up on GitHub - give it a try.   Seems that the v2.x nimble arrays are case sensitive..  and the login.ps1 code had a a poolname of "Default" and it fails.. changed it to "default" and it works... lol

I'm currently running those patched files (login, Initiator and snap) with the base V2 published by Justin on Jan 8th on firmware 2.2.3.0 - called from 2012 R2 with WIT 2.2.3.432 and PowerShell v4 - and all seems good at the moment...

Cheers dude.

Keith.

blunderdog45
Occasional Advisor

Re: PowerShell Module

We are running 2.2.5.0-197583-opt and I've setup the latest versions of the PowerShell script but I cannot get the New-NSVolume command to work. I'm trying something like this: New-NSVolume -Name TestDB -Size 200gb -PerformancePolicy "Exchange 2010 data store". I get this error below. This happens even if I enter default without quotes for the Performance Policy. If I enter New_NSVolume by itself and provide answers the prompts, I also get an error on the value 200gb. Is this due to an incompatibility with the new software or am I doing this wrong?

Thanks for any assistance.

New-NSVolume : Error Creating volume TestDB code: SMeinval

At line:1 char:1

+ New-NSVolume -Name TestDB -Size 200gb -PerformancePolicy "Exchange 2010 da ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSVolume

blunderdog45
Occasional Advisor

Re: PowerShell Module

I got this figured out. I kept inadvertently overwriting the newer version with the older. Once that was resolved I created a volume lickity-split!

Fantastic