New-Vm will work not with - Datastore

I'm a noob to this, just to test the PowerShell CLI to see if we can automate some basic tasks.  Present a problem when you deploy a virtual machine using New - VM.  If the target data store is available in more than one cluster, the parameter - data store fails, saying its getting more of a parameter, even when explicitly by entering the name of DS.  For example:

new-vm - VMhost hostname-name vmname-model templatename - datastore DSname

Returns:

New - VM: 2010-02-10 13:38:12 new-VM of the specified parameter "Datastore" expects a single value, but your name criteria "DSname.

corresponds to multiple values.

If I change the DS to point to a local storage on a server, it works fine.

Issue a "Get-Datastore DSName" gives this:

Name FreeSpaceMB CapacityMB

-


-


-


DSname 154411 511744

DSname 511744 162610

It is a laboratory facility, with two groups sharing the same lun.

If I target a LUN to a cluster that is not shared, it works fine as well. Get-Datastore returns only the DSname once

Is anyway to circumvent this?

Thanks in advance.

See this good you have 2 data warehouses in these 2 groups with the same name?

As far as I know, is not a good practice.

And you have 2 groups sharing the same LUN.

I'm not sure it's a good practice either.

In any case, to get to a data store specific you can select explicitly.

Something like this for example

$esx = Get-VmHost hostname
$ds = $esx | Get-Datastore DSname
new-vm -VMhost $esx -Name vmname -template templatename -datastore $ds

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • Command + click to open the link to the new tab will work not (Sierra)

    I don't know if I did something to the definition mousepad, command key + left mouse will not work to open the link to a new tab someone knows how to fix this? Not sure if it's related problem Sierra but it worked until I updated to Sierra.

    It works fine here running Sierra and Safari. You have activated your tab bar? Check the menu display of Safari.

  • Help: New pencil will work on screen for touch/scroll, but it does not write, draw or scribble...

    Help: New pencil will work on screen for touch/scroll, but it does not write, draw or scribble...

    While you do not, you use the iPad Pro, correct?

  • I would like to know if the new operating system Mac El Capitan will work ok with LR and PS CC 2015.  Download no problem?

    I would like to know if the new operating system Mac El Capitan will work ok with LR and PS CC 2015.  Download no problem?

    Yes, it is compatible. For more information, please see the system requirements | Cloud Creative

    Concerning

    Hervé Khare

  • What storage Fusion drive or Flash storage solution will work best with Adobe CC software on iMac 5 K retina?

    Hello

    I use Adobe CC per day, mainly Premiere Pro but also After Effects, Illustrator, and Photoshop.

    I'm buying a new iMac 27-inch 5K retina and I was wondering what is the best soltuion storage Fusion or Flash storage drive?

    Which drive will work best with Adobe products and graphics software and similar movies?

    Thank you

    Hmm, if you're looking for performance Combo: speed + storage memory , you can go by car merger.

    However, you can find test for Fusion V/S Flash Player storage on popular Tech sites. You can check the speed of DataAccess speed, storage performance... Speed of reading data, writing speed of data.  so that you can decide, also for the best recommendation, post a thread on the Mac community, so that you can get real answer to multiple users who use drive merger or tried the two Fusion as well the Flash storage.

  • MacBook Pro (retina, early 2013) will work well with Dell P2715Q monitor?

    MacBook Pro (retina, early 2013) will work well with Dell P2715Q monitor?

    Doesn't look like 4K is a good option.

    /macbook-pro-retina-display-how-to-manually-switch-http://www.EveryMac.com/systems/Apple/Macbook_pro/MacBook-Pro-retina-display-FAQ

    Graphics.html #extdisplays

    Built-in display: 15.4 "Widescreen Native resolution: 2880 x 1800
    Details: This model has a screen 15,4 "color widescreen LED backlit with IPS technology with a 2880 in native resolution from 1800 to 220 DPI (178 degrees viewing angle). It also supports of the resolutions on the scale of 1920 by 1200, 1680 by 1050, 1280 by 800 and 1024 by 640.

    See also: how can you 'strength' or 'hack' the Retina Display MacBook Pro models running at the native resolution or otherwise more on screen that adapt default?

    2 screen support: Double/mirror *. 2nd Max Resolution: 2560 x 1600 (x 2 *)
    Details: * This model supports a simultaneous maximum resolution up to 2560 x 1600 on two external displays via Thunderbolt. Alternatively, it can support a single screen up to 2560 x 1600 per Thunderbolt and one display up to 1920 x 1200 through HDMI. Although it can theoretically supply all the three external displays, such as confirmed by a useful player, it runs too hot with three connected screens.

    http://www.EveryMac.com/systems/Apple/Macbook_pro/specs/MacBook-Pro-core-I7-2.7-15-early-2013-retina-display-specs.html

    Although I think I read some hacks to make 4 K @ 30 fps.

  • Russell Brown's Image Processor will work not in 2015 PS

    Russell Brown's Image Processor will work not in 2015 PS

    a quick search revealed the update:

    Image Processor Pro 3.2b1 beta released

  • My laptop with Windows 7 64-bit and 64-bit Internet Explorer 9 will work not MSN or MSNBC videos

    I can't get my laptop to run MSN or MSNBC video if I uninstall Internet Explorer 9 and back to IE8.  It seems that IE9 64-bit is not compatible with windows 7?

    Paul,

    I want to thank you for me filled in on why my system did not work in the 64-bit version of IE9.  As a result of your answer I also discovered that I have both IE8 32 and 64 bit versions loaded on my laptop and the 64-bit version will also not play video.  My Flash player is 32 bit and I don't know that this is my problem.  I think I'll wait for Silverlight 64 bit version is released and then update Flash Player and Silverlight.  Thanks again for your help.  Nice day.

    leehart

  • Bookmarks toolbar & bookmarks button drop will work not together how we can solve this problem?

    It seems that if you have toolbar bookmarks running the button drop down bookmarks will work or not present with the other buttons even if its there when you customize, but if you turn off your Favorites bar then the bookmarks drop-down button appears, how that we have the bookmarks toolbar and button drop-down bookmarks menu appear at the same time?
    I have all my favorite sites on the bookmarks toolbar, but would like to have access to the rest of my favorites through the menu key drop-down for the moment I have to use the upper button left to go to my favorite firefox.

    You should see the button Menu bookmarks at the far right of the bookmarks toolbar if the toolbar is visible. You can drag the bookmarks menu button with the marker of fall to the left of the Bookmarks Toolbar items in the bookmarks toolbar if you prefer to see this button on the left side. This BMB button should be on the bookmarks toolbar if the toolbar is visible. Otherwise it will be hidden.

  • Current applications will work ok with the iPad Pro?

    I use a number of applications for the conduct of instruction - which are designed to move objects... will be they work well with the new iPad Pro... ?

    They should be. Other that a processor more the biggest difference between an older iPad and the pro is screen size.  and I imagine the apps dimensionnera upward for the pro.

  • 27 inch Cinema Display will work ok with end of 2013 imac

    Hello

    I have the chance to get a Cinema Display 27 inches for a good price. Will it work ok with my iMac 27 inch end of 2013? If so, is there a difference between this model and the current model of PQ crush?

    Thank you

    Hi, Richard.

    Please visit Apple support communities.

    I understand that you want to use a movie with your iMac screen compatibility.  Without knowing the technical data of the movie screen and looking at your specifications, this view should work with your end of 2013 27-inch iMac.  Your iMac has two Thunderbolt ports that can support the Thunderbolt screens and output Mini DisplayPort.  Below, you will find more information on the specifications of your system and the use of several screens with your iMac.

    iMac (27 inch, end 2013) - technical specifications

    OS X El Capitan: connect multiple monitors to your Mac

    See you soon

  • Z510 touchpad not working not with select lists or menus

    I have a windows Z510 10.

    When I try to use any application wit just the touchpad and open a list item or a menu select and try to scroll down, as I scroll tht disappears. If I want to scroll a list I have to use the scroll keys or connect a mouse. This happens with thunderbird, chrome and firefox. He arrived not with windows 8.1.

    Thank you for anysgestions.

    Neal

    .

    I think that this has been resolved. I updated the driver toouchpad to the version of windows 10 and it seems to work.

  • RAM 2 gb 10600 s will work well with 2 GB 8500 s ram in computer hp laptop g62, please answer? can I install both

    I have hp g62 laptop with 2 gb 10600 s ram installed, I have an another 2 gb ram 8500 s, I can install them both in the laptop? they will work very well or they will conflict because of the difference between s and 8500 10600 s?

    Hello:

    They should work fine, but the memory will operate at slow speed of 8500.

    Paul

  • Has made a new installation, now Dell 962 printer will work not (Win7)

    So all of the facts are:

    I got a virus on my computer of who knows where. Whatever she is, she decided to remove part of my hard drive. So I had a few antivirus and anti-malware programs, and they did too good a job - I damaged my registry.

    If I had no other choice, but do a re-install. I didn't do a new installation; This is the option where all he moved to Windows.old. If the computer is good again, except that my printer is not working correctly.

    First, I tried the drivers from the Web site. I tried R151565, which should have done the job. This configuration is behaving oddly, however. It is scheduled to end after he installed the All in One Center, and it is supposed to leave me with a printer that works. This isn't.

    Then, since it was a re - install, I had to install updates. An update of the driver from dell was one of them. So I thought that this would solve things. The update was successful, but my printer is not installed.

    It never happened to me. The printer is not compatible, or it works. This feels like the printer is in limbo. So, I tried to think about what might be wrong. I looked in devices and printers, and there that caveat to sign on my printer. Then I looked in the devices, and I noticed this strange thing

    Why do I have two entries for a printer? This must be an allusion to the problem, but I do not know the answer. I imagine that there must be at least one person who has encountered this kind of problems. Please, help me. Research has brought me here many times, but I could not find a solution that matches my problem

    Hi KenLJ,

    Thanks for writing on the Dell Community Forum.

    We recommend doing a clean install of the operating system. Asking you to back up data from the Windows.old folder. Please use this link http://dell.to/1sU6QJ3 to restore your Windows 7 computer to factory settings. If this option does not work, then you can manually reinstall Windows 7 using this link http://dell.to/1mN6P6v. If you want the printer don't work, please uninstall the printer driver. Unplug the printer from the computer. Download the printer driver from this link http://dell.to/1IXOCus and install it. Connect the cable from the printer to the system only when the system prompts you to connect the cable. Continue with the installation, and it would print the test page once it is installed. There are two entries in the Device Manager, one for the scanner and the other is for the printer.

    Answer please if you have any other questions.

  • My old Airport Extreme 802.11n will work well with my new Time Capsule 802.11ac airport?

    I got a new 802.11ac 3 TB time capsule and I would use my Airport Extreme 802.11n as an Extender but I fear that 802.11n is too old technology.

    No, it will be fine. I have the same setup on my network. Whenever I update my AirPort Extreme, I use the 'old' to expand the network throughout the House.

    I hope that answers your question.

    Best regards

    Austin

Maybe you are looking for