Failure of power CLI remove Datastore

The Installation of ESXi generates a "datastore1".

It is possible to generate an additional data store named 'Datastore1' via PowerCLI.

The name is keysensitive, because it is not possible to generate an additional "datastore1".

I have the following problem:

With CLI power, it is not possible to remove the Datastore1 or datastore1.

the command remove-data store with the parameter of the data store name cannot remove the data store,

with error: there is more than one object with the name 'datastore1 '.

In this command, the name is not supported keysensitive.

It is not possible to use the ID of the store of data as a parameter for the deletion.

Anyone have an idea how I could handle this problem with Power CLI?

Thanks for the help!

Chris

What you can do to remove a specific data store, is to use the operator - ceq PowerShell which performs a case-sensitive comparison. Something like:

Get-Datastore | Where-Object { $_.Name -ceq "Datastore1" } | Remove-Datastore

If you want to remove both you can do:

Get-Datastore | Where-Object { $_.Name -eq "Datastore1" } | Remove-Datastore

Robert

Tags: VMware

Similar Questions

  • Creation of computer virtual using Power CLI

    Hello

    I'm attaching to deploy virtual computer using power CLI but I get the error like below below:

    I use the script below to deploy the VM model exisitin

    New-vm-name testvm005 - VMhost home - model TMPL_W2K3_STD_SP2_R2_x86 - datstorename - OSCustomizationspec-W2K3-ENT-R2-SP2 data store - 32 bit

    New - VM: 25/05/2011 10:37:09 New-VM parameter specified ' Templa
    you ' expect a single value, but your name criteria "TMPL_W2K3_STD_SP2_R2_x86" c
    orresponds to multiple values.

    Can somone help out me on this...

    It seems that if you have more than 1 model with that name in your vCenter.

    Make one

    Get-model

    to check it out.

    If you want to use a specific template, you will need to find a distinctive feature.

    Suppose for example that the model that you want to use is located in a folder named MyTemplates, then you can do

    $template = get-Template-name TMPL_W2K3_STD_SP2_R2_x86-location (Get - file - name MyTemplates)

    New-vm-name testvm005 - VMhost home - model $template Datastore - datstorename - OSCustomizationspec W2K3-ENT-R2-SP2 - 32-bit

  • Satellite Pro S300L-105 - whistle when power is removed

    I recently bought a Satellite Pro S300L-105, it works normally, except that it produces a hissing light, sharp, witch can be heard when the power is removed. After less than 10 minutes to help, I feel pain in my ears and brain and it becomes unusable.

    I don't have any problem hearing or so. and I've never had such a problem when using any other computer.

    That was it for, and the manufacturer how can for me?

    Hey,.

    Which is really strange. I have never heard of this issue, and this happens only with the disconnected AC adapter?

    Have you installed another 3rd pilot who is not on the page of Toshiba? In particular, I mean the display driver.
    In addition, you should try to reinstall Windows using the Toshiba recovery disc.

    But I think that in this case, you need professional assistance from an authorized service provider. Technicians can looking for laptop and fix because this should not happen. Moreover, on the Toshiba site, you can search for the nearest authorized service provider.

  • Acer aspire V5 571 P - stop with power cable removed

    Acer aspire V5 571 P - when cell phone fully charged and power cable removed from the laptop shuts... Help?  Thank you.

    Looks like there may be a problem with the internal battery. Battery reset press and hold the button for 4 seconds. Then, charge the battery and see if it works when unplug you the unit. If it is not the case, contact technical support to set up the repair.

  • VMware power cli version

    Hi experts,

    I'm new to vmware power cli, so please excuse stupid request. -

    I have vcenter 6.0 and I want to know what power cli version should I download to connect to vcenter, is limited with the VC version or I can download any version of vmware cli power.

    I need windows electric cli to run vmware cli power.

    Thank you very much in advance.

    Concerning

    KP

    You can find this info in the VMware product interoperability Matrices

    You must PowerCLI 6.x

  • Impossible to install Power CLI 4.0 or 5.1, although Powershell 2.0 SDK is installed?

    Hi all

    I was faced with difficulties to install Power CLI 4.0 or 5.1, even though the application of Powershell 2.0 SDK is installed, I get an error saying that Powershell is not installed, even if its installed, do not know why this problem occurs, can anyone provide some solution for me in this regard? Also please let me know if its CLI or Shell Power problem power problem, please see the image as an attachment for more details. Thanks in advance.

    Hello

    You have installed powershell 2.0 SDK not powershell 2.0. Here is the link to download powershell.

    http://support.Microsoft.com/kb/968930

    Kind regards

    Julien

  • Remove datastore error hosts NFS

    All, I am running this command but on each of the hosts I get the 1 first error and then it works.  No idea why?

    PowerCLI C:\Program Files\VMware\Infrastructure\vSphere PowerCLI > hostname Get-VMHost | Remove-datastore - Datastore (get-datastore-name ' Templates_I
    SOs")

    Perform the operation?
    Operation "Remove datastore." data store "Templates_ISOs".
    [Y] yes [A] Yes to all [N] no [L] no to all [S] Suspend [?] Help
    (default is "Y"): y
    Remove Datastore: 10/01/2013-11:43:09 remove Datastore has specified
    parameter was not correct.

    On line: 1 char: 50
    + Get-VMHost hostname | Remove datastore < < < <-Datastore (get - datas
    «"" Torus - name "Templates_ISOs")»»»
    + CategoryInfo: NotSpecified: (:)) [delete-Datastore], InvalidArg)
    MSP
    + FullyQualifiedErrorId: Client20_VmHostServiceImpl_RemoveDatastoreOfViOb
    ject_InvalidArgument, VMware.VimAutomation.ViCore.cmdlets.Commands.RemoveDa
    tastore


    Perform the operation?
    Operation "Remove datastore." data store "Templates_ISOs".
    [Y] yes [A] Yes to all [N] no [L] no to all [S] Suspend [?] Help
    (default is "Y"): y

    Do

    Get-VMHost hostname

    or

    Get-Datastore-Name 'Templates_ISOs '.

    may return more than 1 object?

    Or you run in mode "multiple" and have more than 1 connection?

    Make one

    Get-PowerCLIConfiguration

    and

    $defaultviservers

  • Want to list Status "Unknown" VM power CLI

    Hello

    In CR we have VM with 'Status' as 'Unknown' (not ' State' field)

    Want to list 'Status' VM 'Unknown' power CLI - example view of VC is less to...

    2112412.png

    Greetings - Purna

    Try this

    Get - VM | Select Name,@{N="Status; E={$_. ExtensionData.OverallStatus}}

    Note that you can see green, yellow, red or grey. In the vCenter client, this translates to normal...

    The unknown should appear as gray

  • vsphere5.5 + Rs 5.5 = recovery remove datastore error

    Good afternoon.

    Recently updated structure to update to vsphere 5.5 and 5.5 SRM.

    Planned migration works well. There was a problem with the emergency recovery.

    Simulate the situation:

    (1) we have two VM protected, turn off the power to the host, I go to the Dr site and perform disaster recovery.

    The following errors appear during the recovery process. This is normal, because the guests of inactivity.

    Here are the errors:

    Protected shutdown VMs on the Site - error - unable to communicate with the remote host, because it is disconnected. Cannot communicate with the remote host, because it is disconnected.

    Prepare the VMs of Site protected for Migration - Error - the operation is not allowed in the current state of the connection to the host. The operation is not allowed in the current state of the connection to the host. Impossible to cancel the registration of protected virtual machines.

    Change read-only storage - error - Impossible to cancel the protected registration. VMs cannot unsubscribe VMs protected.

    (2) go to the site recovery, everything seems fine. SRM offers redo recovery, because there were errors. Host power, perform a recovery and that's where the problems begin. Begin to pour into the error about unable to disassemble the data store, namely:

    Error - Impossible of datastore "DS1" from host 'host1. The "DS1" resource is in use.

    DS1 - the data store in the site protected, host1 - host in a protected site, where VM under tension before the recovery process

    Remarkably, manually remove the data store that it does not work too. That allows you to reboot the host again, but that's not important.

    Who can tell what is wrong or who have experienced when working with MRS? Ko is suitable for my case is not found.

    5.1 and it works very well.

    Thanks in advance for your help

    Correction of a problem.

    By default for each host - / var/log/vsantraces-> simlink to the data store.

    esxcli vsan defined trace Pei/var/log/vsan

  • Equium A60-692 - no power and removing the HARD drive

    The power has gone on my A60-692, the adapter is ok but there is just no no LED on the laptop. I had to get replaced a few years ago so maybe it is related to that of the power connector.

    I took to a local repair place, he said, it would cost more to fix this, so I should really find it useful laptop only think about recover my data.

    Is it really so hard to fix these things?
    How hard is it to make the hard drive out, & how would then access down my data?

    Thank you
    Dave

    Hello

    > I took to a local repair place, he said, it would cost more to fix this, so I should really find it useful laptop only think about recover my data.
    I agree with the authorized service provider. My personal opinion is that it s a malfunction of the motherboard and it is a very expensive part. Besides, Equium A60 is pretty old model so it would be better buy you a new laptop and recover your data.

    > How difficult is it to make the hard drive out, & how would then access down my data?
    It of not difficult, but I m really wondering why you need access to these data. You don t have a backup? In my opinion the backup is the most important thing you need to do on a computer.
    Anyway, normally on the underside of your laptop there is a HARD drive cover which is guaranteed by one or two screws. You must remove this cover and then you can see the HARD drive and you're able to remove it.
    Also buy an external HARD drive enclosure where you can install the HARD drive. Then you can connect it to another computer to back up your data. ;)

  • Satellite Pro L500 - stops when the power cord removed

    Toshiba Satellite Pro L500 stops when the power cord is removed even with the battery to 100%. I removed the battery and all the indications associated with battery answer correctly. For example turns off, Toshiba Health Monitor also indicates when the battery is removed. If installed Health monitor indicates that the battery is at 100%.

    Someone please help. I have not installed anything new.

    Hey,.

    For me, the matter is clear: the battery can't hold a charge so the laptop will be shut down because it has no power.

    I think you need to replace the battery with a new one and you can get a provider of service authorized in your country. Simply contact the guy and ask that they can tell you how much it would cost.

    You can find a list of all FSA here:
    http://EU.computers.Toshiba-Europe.com > support & downloads > find an authorized service provider

    Good luck! :)

  • Internet connection lost when power is removed Probook s 4330

    HP probook 4330 s

    Windows 7 Ultimate + service pack 1 64-bit

    Driver: Microsoft 3.0.0.41 RALINK driver (up to date when I do a search)

    When I remove its internet external power is lost.  The wireless connection always seems to be in place, but there is no traffic.  I can't ping anything in this case.

    The only way to get this up and running again is to

    1. Insert the AC power

    2. restart the service dhcp client (sometimes required to conduct more than once).  The service has not stopped, but for some reason, it becomes it running.

    I also tried to disable the 'allow the computer to turn off this device to save power ".  But that did not help.

    Have spent a long period of problems, have almost tried everything and am at the point where I am considering the purchase of a new laptop computer.

    Kind regards

    Paul

    fixed by updating with the latest wifi driver

  • Pavilion 15 p 146: HP Pavilion notebook - failure of power supply or a laptop?

    My Pavilion laptop is 4 weeks old. This morning, it worked, but I noticed that it doesn't seem to be load - the remaining battery indicator was stuck at 11 percent and there was no indication that he was in charge. Finally the laptop has stopped working.

    Now I am unable to return to power.

    I tried to remove the battery completely and using alternating current only, but it will not turn on. When the AC is attached no lights don't appear next to the power socket. However if I press and hold the power button, the LED next to the power jack on the laptop flashes 3 times. Release the power button then hold again produced the same results - the LED flashes 3 times.

    Note that if I turn off the AC altogether the does not blink at all, which suggest that some powers gets through.

    How can I determine if the problem is with the AC adapter and not an internal problem with the laptop?

    Thank you

    When an AC adapter is plugged in and OK it will be a weirdo directed. If the power led does not illuminate, then this is a diagnosis that lets you know that it doesn't have the power adapter.

    The power adapter is a unit that can be replaced under warranty without charge to you.

    Contact HP for warranty repair.

  • Power failure/loose Power Bar power cord

    I want to run a few questions in front of the members of the forum:

    Last week, my power bar power cord became loose and off the bar, which stops the computer and the monitor. The monitor has a power button function.

    Before that other devices in the power bar are turned off and unplugged, until the power bar is turned off, until the power is reconnected, until the power bar is turned off, before other devices are plugged in, and before that the devices are suppressed:

    1. in the event that the computer and the monitor will turn off (as they were in the position 'On' when they stop unexpectedly) "or" there is no 'Off' option either on the computer, the monitor, or both devices so that they can be disconnected and reconnected since they will be in the position "Off"?

    2. If the computer and the monitor are 'On' when they turn off automatically during a power failure, can they be left alone without the risk of a wave when the power is restored, OR is there a risk of a surge?

    b. is there "is" a risk of a surge because they are still in position "On", should they be disabled (or they are already in the "Off" position?) unplugged and should bar be off and unplugged then until the power is restored?

    3. in fact, during a blackout, should all appliances be turned off and disconnected, so there is no risk of a circuit breaker of the circuit limit, causing a power surge, or if all appliances can remain plugged in and left in their respective "On / Off" position since before the failure?

    Hello

    Sorry for the late reply.

    It is advisable to have the power with a surge protector bar in areas where the power failure and the cutting power is often or generally just to ensure the security of your system and in particular data. If in your region, power failure, power failure is rare, so you can avoid surge protector.

    Hope, I could answer your query. Feel free to post on the forum if you have any concerns more associated with Windows. We will be happy to help you.

    Kind regards

  • Enable 3D with power cli support

    Hello everyone

    How can I can activate the 3D support with cli for all virtual machines power?

    respect of

    Hamid Reza Danehchin

    Try like this

    $vmName = "MyVM.

    $vm = get-View - ViewType VirtualMachine-filter @{' Name'= "^ $($vmName) ' $ '"}

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $dc = new-Object VMware.Vim.VirtualDeviceConfigSpec

    $dc. Operation = "Edit."

    $dev = $vm. Config.Hardware.Device | where {$_-is [VMware.Vim.VirtualMachineVideoCard]}

    $dev.enable3DSupport = $true

    $dc. Device += $dev

    $spec. DeviceChange += $dc

    $vm. ReconfigVM ($spec)

Maybe you are looking for