Adding an additional drive

So I currently have a script that has the followning variables

$HDD1 = "20".
$HDD2 = '0 '.

Here's a snipit of my script code.  $HDD1 and $HDD2 add the VMDK based on the model that I use.  There may be a time when I need an additional drive, once again, that I may have need for two additional discs.

If I didn't need $HDD2, I prefer to scratch as a way to define what is not in use.

Now, if I run my script and put $HDD2 = 0 as shown above.  The successful full script and only adds $HDD1 as I hoped, but powercli it does not display errors related to 'invalid value passed to SizeGB' he doesn't like '0' for $HDD2

I wonder if I should just add this to the line below pertianing to $HDD2?   -ErrorAction SilentlyContinue

Or is there a better way to deal with this?

Thank you!!!

$vm | NumCpu ($cpu) - set-VM - confirm: $false
$vm | New-harddisk - CapacityGB $HDD1
$vm | New-harddisk - CapacityGB $HDD2
$vm | Set-VM-Notes $Note - confirm: $false
Start-VM - VM $vmname

Nothing of a Where clause can not correct

Get-Variable -Name HDD[2-6] | where {$_.Value -ne 0} | %{
  $vm | New-HardDisk -CapacityGB $_.Value}

Tags: VMware

Similar Questions

  • PE T610 - Perc 6i - strange state after adding additional drives

    Hello

    We have a PE T610 with a PERC 6i controller.

    X SATA 1: 2 250 GB virtual disk in a RAID-1

    X SATA 2: 3 500 GB of disk virtual in a RAID-5

    We have added 3 additional 2 TB drives to the server.  A drive has been designated as a Global Hot Spare.  Two other readers have been added to the Bay RAID-5.

    I predicted, using 500 GB each among the readers added two for Virtual Disk 2.  Then, I had planned to use the other 1.5 to among the readers as Virtual Disk 3 in a RAID-1 array.  I did it with other servers in PE in the past.

    But after that the 500 GB is used from each of the discs, I can't used the remaining unused space.  It shows the 'available RAID disk space' as 0.00 GB.

    Why the remaining space on these disks is not available for me to use?

    Thanks for any help on this.

    Bryan Hunt

    «I've waited with 500 GB each among the readers added two for Virtual Disk 2.»  Then, I had planned to use the other 1.5 to among the readers as Virtual Disk 3 in a RAID-1 array.  I did it with other servers in PE in the past. »

    This was allowed on a VERY small number of controllers found in Dell servers.  Anyway, you can do that on 6 PERC.  You can replace your existing 3 drives with 2 TB drives, then create a second table (6 to) on the disks (all disks in a disk group must have the amount of space available and impossible to replace the drives with the greatest and to increase the existing RAID array size).

  • Ran memory hard drive, added a hard drive and hopeing I can combine somehow.

    I have added a second hard drive with XP on it. I have the second disk set to CSEL. I have a gateway pc. It appears in Device Manager. I was hopeing to combine them, a bit like you can do with vista. I put in wrong place

    If the primary transmission is set to Cable Select, you have set the jumperr on the extra disc correctly.

    If the primary transmission is set to master, you must assign additional drive SLAVE jumpers

    Assuming that both show in BIOS, Device Manager and Windows Explorer, you cannot combine the two discs.

    What you can do is freshly format additional drive and then move all files data yourr on him... Mike Hall MVP - Windows Desktop Experience http://msmvps.com/blogs/mikehall/

  • DV7-6c95dx: ADDING 2nd HARD DRIVE WE DV7

    ADDING 2ND HARD DRIVE - IT DOES NOT APPEAR UNDER MY COMPUTER - I DON'T KNOW IF SA FORMATTING OR NOT - CAN GET SOME DIRECTIONS - THANK YOU

    How did you add it? Where's the hardware mounting hard disk? In any State of cause, assuming that you have installed a hard drive was bought, it would be empty and needs be initialized (mounted) and formatted. To find computer or this PC in the right click menu... Choose manage, disk management and you will see a Visual representation of the hard drives. It can automatically prompts you to initialize the disk. Once do you that and format it in ntfs and assign a drive letter and the name of the volume, it will appear in the computer as a lettered drive.

    http://www.computerhope.com/issues/ch000588.htm

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • My Windows Live Hotmail account has been hacked and they have added an additional email address to recover passwords for security.

    How can I delete an email without sending a confirmation to this account?  My hotmail account has been hacked and they have added an additional email address to recover passwords for security.  To remove the address, the only apparent is to send a confirmation email to the address I want to delete.  It is counterproductive.  I have a password, but if they can obtain the information via another email address, my account is never going to be safe.   I got this address for a long time and do not want to lose.  However, he begins to feel that my only option is to go with another provider.

    Thank you

    original title: remove email address

    After all the Hotmail issues in the appropriate forum found here:
    http://windowslivehelp.com/

  • I have an idea on the program application Adobe InDesign to increase the power of sale of Adobe InDesign, by adding an additional menu, with an additional menu that I hear more important for the future of printing.  How can I report directly to the

    I have an idea on the program application Adobe InDesign to increase the power of sale of Adobe InDesign, by adding an additional menu, with an additional menu that I hear more important for the future of printing.

    How can I report directly to the developer indesingn adobe...!

    You can create a feature here request:

    Feature requests/bug reports

  • Hello. I installed the trial versions of 2014 CC Photoshop and Lightroom 5.6 (ie the plan of photography) on a desktop computer that I've added a new drive in Windows 7. Everything works well, BUT it's an old computer, and I think he could pack up unexpe

    Hello. I installed the trial versions of 2014 CC Photoshop and Lightroom 5.6 (ie the plan of photography) on a desktop computer that I've added a new drive in Windows 7. Everything works fine BUT it's an old computer and I think he could pack up unexpectedly. These things are happening. I want to sign up for the plan of photography but I also a Windows Vista laptop, and it's old too so I can put apps on a new office and a new laptop computer, after you have already installed on my desktop. That is why three activations. Am I allowed to do? See you soon. Paul

    You can't have three activations. It is simply not possible technically. If and when the time comes, just disable you / disconnect is on one of the old systems and install it on the new. If the system goes belly up, you contact support to reset your account. No need to make it more complicated than that and resist it.

    Mylenium

  • Adding a 3 TB internal WD Green as an additional drive in a dc7900 CMT

    Hi all, I just bought and installed a WD 3 TB (WD30EZRX) in my office to back up, but he can't see more of 746 GB disk space.

    I'm on Win7-64 bit SP1, it is connected to the SATA 3, latest version of the BIOS, my boot drive is a 128 GB SSD (SATA 0), additional data disk 500 GB (SATA 2) and a DVD on SATA 1.

    Did some research on Google, of course but I think why not turn to the pro

    I don't know what I did wrong, but I hope someone has a solution to this.

    Fr. Pär

    You are the very welcome.

    Unfortunately, I do not know what you need to do...

    Is there an option in disk management to format the disk to the GPT no matter what windows sees?

    There must be a way because the good news is that the PC knows we have a 3 TB HARD drive installed.

    Google it.

    I found this... looks promising.

    http://en.community.Dell.com/support-forums/disk-drives/f/3534/p/19405597/19946108.aspx

    You can get the program of RST to your PC on the link below:

    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=12454&prodSeriesId=4065889&prodNameId=4065890&swEnvOID=4059&swLang=13&mode=2&taskId=135&swItem=vc-92347-1

  • Adding an additional hard drive

    Have an emachine with windows vista upgrade, I put an extra GI on my PC to make 1.5 G. I want to add an additional hard drive. I now have a120GB hard drive. I have an another emachine with a 160 GB hard drive, but my problem is the 120 GB is 32 bit and the 160 GB is 64-bit. My question is that I can use the disk 160GB of hard drive without any problem, most 120 GB hard drive?

    The drive works perfectly.  Any hard drive can operate in 32-bit and 64-bit systems. Boulder computer Maven
    Most Microsoft Valuable Professional

  • Adding an additional HARD drive to Dell Dimension 4600

    HARD drive how much can this system take, I ask because I want to add an additional hunting with taken all readers currently in PC (2). Any help would be appreciated. Regards.Johno65

    Hi John,.

    Thank you for your response.

    Dimension 4600 system board connectors are as follows:

    • Connector 40 pin primary IDE channel
    • Connector 40 pin IDE secondary channel
    • Floppy drive 34 pin
    • 7-pin Serial ATA connector (2)

    The Dimension 4600 supports up to 4 ATA/100 devices on 2 IDE channels. However, it has flanges/casing for two drives internally accessible only. If you do not connect a third drive internally, there is no place to fix in the system chassis (such as the hard drive bays can contain only 2 hard drives) so it could be hung out of the system. Alternatively, you can connect external USB hard drives as needed on the system.

    Answer please if you have other queries.

    Thank you and best regards.

    Babita S
    #iworkfordell
    Learn more about Dell Product Support, drivers & downloads, Order & Dispatch status -> Choose your region U.S. customers; Clients of the United Kingdom; Visitors to the India. For technical support Dell video clicking here.

  • Adding additional drives to the content server

    I intend to order the model of the device of the TCS (TCS-C220- PROBUN-K9).  But the condition is to have more than 2 TB of Hard drive in this server.  Model of the device comes with 600 GB of hard drive capacity (2 x 600 GB in RAID 1).  I would add 6 slots to over 600 GB hard drives that there are 6 free on the server.  Is this possible.  If so, may I know the part number for the HARD drive.  Thanks in advance.

    Although you are able to do this, it is not a supported Cisco configuration.

    The way to achieve additional storage available for a content server is to store the data on the external NAS.

    Refer to the section Setting Up Media external storage of Executive Guide.

    Wayne
    --
    Remember the frequency responses and mark your question as answered as appropriate.

  • Adding an additional hard drive in a small factor dc7900

    I try many ways to install an additional hard drive but no luck, was installing 2 Sata and Sata 3 decision-making, but did not work, just like to know if it is possible to add an additional Sata hard drive to the PC, one of the factory (Original) is too small, I thank you in advance...

    Always learning, is never too late

    Not sure if you have the ultra thin or small form factor (if)... but I don't see why you shouldn't be able to add an additional hard drive. In fact, HP has even some videos of support on how to do...

    http://h20464.www2.HP.com/resultsCSR.htm?prodSeriesId=3785403&MEID=15DB20AC-BA4B-4E1A-A5FE-6CBED2052DF0

    If you have the data and power cable attached, the reader should appear under the general tab of the BIOS. You shouldn't have to do something with jumpers on the drive and it does not matter what sata connector you put it in.

    Is that the new bad drive? Install in another PC to see if it works...

  • adding additional drives in the application process

    Hi, how it is possible to add additional disks in the application process? Now, go in the settings of the virtual machine in vCenter client to add disks after the virtual machine has been created in LCM. We take for the applicant specify how many additional disks and what size (just not RDM VMDK)

    Thank you

    It can get quite complicated because this is certainly not the standard features of LCM and would not be supported by VMware if this customization is not performed by the team of the Orchestration Services of our Professional Services organization... However, that being said, a general approach would be as follows:

    • Duplicate the workflow application for Virtual Machine to the category of workflow custom under user and give a custom name like ask VM

    • Add new entries to the custom workflow that are something like: additionalDiskCount (number) and additionalDiskSize (number) (which implies that all the additional disks would be the same size)

    • Update the workflow to store these values by using a standard LCM Action such as:

    System.getModule("com.vmware.lcm").addDataToTokenKeyAsString (provisioningToken, additionalDiskCount, "additionalDiskCount");

    System.getModule("com.vmware.lcm").addDataToTokenKeyAsString (provisioningToken, additionalDiskSize, "additionalDiskSize");

    The two lines above will store the specified user to other values that the token of data in the database of LCM and you will be able to get it back later because it is related to this particular request token.

    • Hide the initial request button of the tab requests and create a new button that points to your custom workflow

    • Create a new workflow that takes an object of lcm:ProvisioningToken as an entry called "token".

    • Inside of this workflow (let's call it 'Add disks to ask'), you will need to retrieve the additionalDiskCount and additionalDiskSize values that have been stored with the token:

    additionalDiskCount = System.getModule("com.vmware.lcm").getDataFromTokenKeyAsString (token, "additionalDiskCount");

    additionalDiskSize = System.getModule("com.vmware.lcm").getDataFromTokenKeyAsString (token, "additionalDiskSize");

    • You then get the object of VMware3:VirtualMachine of your token:

    VM = System.getModule("com.vmware.lcm.vim3").getVmFromToken (token);

    • Then, using those extracted values and the virtual computer object, use a loop to pass these parameters and some other default values you want in the workflow 'Add drive' (it's in the category library/VIM 3/Virtual Machine management/Device Management workflow.)

    • Once you have confirmed that this new workflow 'Add disks to ask' is working properly by passing only an object token with these entries of additional data stored with them, you can add this workflow for the reminder 'onCreate '.

    The above process is a general approach that could be taken. The specifics of real workflows that you create are up to you and the support of this customization

    Good luck!

    Visit me on http://www.vcoteam.info for vCenter Orchestrator tips and tutorials

  • Adding an additional hard drive to a p2-1334 HP

    Never thought I would hear myself say that 500 GB was insufficient, but it is.

    Can I add an extra terabyte as a slave to this PC?

    Thanks in advance for any help

    -Greg

    Your desktop HP p2-1334 has only two SATA ports and no physical space in the case of 2nd hard drive. Short answer is a resounding no you can, however, replace the current 500 GB drive with a greater capacity. 1 TB to 2 TB

    Please send BRAVO

  • HP ENVY Phoenix 810-135qe CTO Desktop PC adding 2nd hard drive

    I have added a second hard drive to my system (3 TB Seagate) that is the same (brand / model) on the main drive.  Device Manager sees the drive, but Win 7 Pro does not see the drive.

    Thank you

    Hello

    Look in to the new hard drive disk management.  To use the full capacity of the drive, you'll need to be initialized and he the GPT format.  Don't forget to assign a drive letter and a volume name.  In addition, make sure that the drive appears as online and not in offline mode.

Maybe you are looking for

  • How can I keep my text messages to appear on the iPhone to my daughter

    I added the new iPhone of my daughter to my Apple ID and now she sees all my text messages.  How can I fix it?

  • Defy death while improving

    Thus,. I did the upgrade long-awaited to 2.2 through the MSU program to two phones Defy. The fine w/o blur to update retail_EN. Time for a version retail_DE with the blur. (from a friend on another PC) At some point, he says to disconnect the USB key

  • 18/09/2012 is no sign yet of ics bug fix, I wonder

    Well, we are in the middle of September, and still no bug don't fix for ics I wonder if the bike is jump a quite bug fix for jelly bean guess is it possible other thoughts on this

  • Wireless internet p2-1334 - updated

    No matter what USB wireless dongle to connect my computer to OFFICE HP p2-1334 to HotSpot Wi - Fi? There is no wireless inside No. PCi Card & no way to put an in. Update... I travel in an RV with a roof mounted TV antenna that receives usually abt 50

  • How to install drivers lost after complete cleaning and installation of xp?

    I was given a ze5170 Pavilion older to use as support for a system to work.  He has problems.  It has been completely wiped clean (HD) and had Windows XP Pro installed.  None of the quick work keys, volume up / down / mute are not displayed on the sc