Array Setup and Networking
1827870 Members
1169 Online
109969 Solutions
New Discussion

PowerShell Module

 
marktheblue45
Valued Contributor

Re: PowerShell Module

If someone does find the script to replicate pass it on to Commvault. Still waiting for the replication piece.


Regards,

              Mark.


jrich52352
Trusted Contributor

Re: PowerShell Module

Looks like I should be getting access to a couple of units, not sure what the ETA is, but i will be able to resume work on this.

marktheblue45
Valued Contributor

Re: PowerShell Module

Excellent news Justin. Look forward to seeing the outcome. 

mikeelam57
Occasional Advisor

Re: PowerShell Module

Justin,

Where you able to update the module to work with Nimble 2.x firmware?

Mike

jrich52352
Trusted Contributor

Re: PowerShell Module

I was able to update some of it, the basics, like add/remove volume and the such, but I still dont have access to a unit.

mikeelam57
Occasional Advisor

Re: PowerShell Module

Bummer.. I built some scripts for customer and they are wanting to move to 2.x firmware. So I need to have them hold off for now? Is there any other options? If I could get you access to an array, what is the timeframe to get the rest of features upgraded?

Thanks,

Mike

jrich52352
Trusted Contributor

Re: PowerShell Module

depends on what features you need, but the stuff i had completed wasnt too bad

ben was trying to get me access to a unit but i havent gotten access yet

mikeelam57
Occasional Advisor

Re: PowerShell Module

The script I created utilizes the following:

Get-NSVolume

New-NSSnapshot

New-NSClone

Add-NSInitiatorGroupToVolume

Remove-NSVolume

Remove-NSSnapShot

Basically it creates a snapshot and clone and then adds Initiator group. The volume is re-signatured and added to vSphere. At the end of the day it then deletes the volume from vSphere and deletes the snapshot/clone from Nimble. The process starts over the next day.

Can you tell me if any of this won't work if they upgrade their controllers to 2.x?

Thanks,

Mike

jrich52352
Trusted Contributor

Re: PowerShell Module

nope, hadnt gotten all of those.

mikeelam57
Occasional Advisor

Re: PowerShell Module

Checking back to see if you have had any luck with getting access to an array so you can update the module? Have a customer using this module and they really want to upgrade to 2.x.

Mike

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

blunderdog45
Occasional Advisor

Re: PowerShell Module

Would you or anyone else have one or more script samples you could share? I'm looking for a way to script the creation of an initiator group, volume collections with verification and new volumes for the collection. My initial intent is to simplify building multiple new Exchange Servers with over 50 volumes each. I've been able to create a new volume but am struggling with the other issues.

jrich52352
Trusted Contributor

Re: PowerShell Module

If you run

Get-Command -module nimble

you'll get a list of commands, you'll see there is a New-NSInitiatorGroup and Add-NSInitiatorToGroup etc

Most of these have some basic documentation.

As far as the volume collection stuff thats what im working on now (Have run in to some issues with the API)

If you want to test/verify these you're best option is to run the Get-NS* commands to see if the object you created exists, however I will say i've never come across a time in which the cmd was successful but it didnt do what it was suppose to.

If something doesnt work as you'd expect, or you'd like a new feature please submit it on the github site

jrich52352
Trusted Contributor

Re: PowerShell Module

Kelley Underwood start a new thread and tag my name in it (use the @ and start to type my name) that way it will notify me and we can address it there.

brfried105
New Member

Re: PowerShell Module

What version are you using that works? I having the same issue. TIA

I am using ModuleVersion                  1.1.20140407.1024

blunderdog45
Occasional Advisor

Re: PowerShell Module

I got the V2 PowerShell Module from jrich523/NimblePowerShell at V2 · GitHub. I downloaded the zip and extracted the files to My Documents/WindowsPowershell/Modules/Nimble. Then in PowerShell I entered  Import-Module Nimble. I was then able to connect with connect-NSarray IP -password PASS. My Nimble Arrays are on Version 2.2.5.0-197583.