UNSOLVED

DELL-Bill Gr

updated

15 years ago

0

6082

November 21st, 2011 12:00

Powershell - Powershell users

This post has been copied from the former Compellent User Forum and placed here for your reference.  This code is made available AS IS, without warranty of any kind.  The entire risk of the use or the results from the use of this code remains with the user.

Powershell users – Originally posted By Robertb, 09 Apr 2009

Robertb - Any Powershell people out there?

I've just started scripting a few things and just wondered if anyone else is using it?

CMonfet - I am using it for my Disaster Recovery system.  We have approximately 100 volumes that are replicated from our HQ that need to have views created from their latest replays, and then mapped across our DR ESX farm or to their DR Physical Server counterpart.  Creating 100 Views, then mapping them across the ESX farm took several hours to create all of those mappings.  I now do this all in PowerShell and have gotten this down to about 10-15 minutes.  It works great! 

Robertb - Spooky, that is just what I've managed to do, albeit only about 50 views to create. I've also managed to script VMWare to go and find the .VMX files, import them and amend the settings. This has cut the recovery time down massively and has been really useful.

CMonfet - I have also done some PowerShell scripting on the VMWare side to attach all the RDMs that we are using for our VMs to the each VM.  I saw some people doing the VMX import etc.. but thats what Site Recovery Manager is for :)  hopefully they will buy that for me.

Robertb - Have you managed to attach any VMFS volumes? They come through as snap-00000x and I want to rename them to allow me to run the VMX import on particular volumes. Oh and to make them stand out as they are being used for a DR test.

Chances of us getting Site Recovery Manager are zero at the moment. It is not cheap!

CMonfet - I have attached several VMFS volumes and so far I have manually renamed them (DR-original name).  There is a powershell cmdlet to rename VMFS but I have not played with it.  We only have a dozen or so VMFS volumes and the rest are RDMs, when I have more time I will look into it but I am hoping for SRM first...

Robertb - We only have about a dozen as well, but it would be far easier to rename them with a script. The problem is I don't think the naming of the recovered volume in VMWare is consistent. If I could get the get-vmhoststorage to output the the new volume names it would help!

jfragoso - Someone have play with powershell and the SAN. I am trying to do some backup tapes and i am having some problems. I found a really good script, but it is not working when i am mounting the volume (with the latest snapshot) in my server windows 2003. The volume with the snapshot is good, the mapping is good, but for some reason windows is not giving a drive letter to the volume. The new drive is healthy and online, but windows 2003 is not recognizing the new drive.

Someone have experience something like this?

thanks

smithsprpa - Do I need to install an add-in for the Compellent scripting to work under PowerShell?

~Steve

jbraun - Hi Steve,

Yes, you will need to download the Comepellent Storage Center Command Set for PowerShell.  This is the installation package that will install the PowerShell cmdlets for the Storage Center on your server.

You can download the Command Set from Knowledge Center.

Best,

Justin