need to get the time host was put in the annotation and maintenance mode

Hi - it is possible to get the time that a host has been in maintenance mode and also seize any annotation is attached to the ESX host in VC?

Thank you

~ Sai

Also, by using "get-vmhost" twice is redundant since you have channeled from get-vmhost: "E = { get-vmhost $_ |}". Get-vievent ".

However, your order will be to return the entire event object and look like:

Name                                    Event

----                                    -----

host {VMware.Vim.EnteredMaintenanceModeEv...

You can try below instead:

Get-VMHost |? {$_. ConnectionState-match 'Maintenance'} | Select Name, @{N = 'Time put in MaintMode'; E={($_ | Get-VIEvent |? {$_. FullFormattedMessage-like"* entered maintenance mode *"} (). " Createduserid}}

But it can still recover multiple events, so a way to get only the last event and time is below:

Get-VMHost |? {$_. ConnectionState-match 'Maintenance'} | Select Name, @{N = 'Time put in MaintMode'; E={($_ | Get-VIEvent |? {$_. {"FullFormattedMessage-like" * entered maintenance mode * "} | toplayer-last 1). Createduserid}}

Tags: VMware

Similar Questions

  • Script to get the disk and LUN informaiton

    Hi all

    I have the list of virtual machines on servers different vCente and I need to get the disk and LUN information for the list of virtual machines.

    Help me build the script?

    Kind regards

    Vijay

    $Information = @)

    $Vminfo = get - VM | Select-Object *, @{N = "Hard drives"; E={$_ | Get-HardDisk}}, @{N = "HDDcount"; E={($_ | (Get-harddisk).length}}

    $vmlist = $Vminfo | Sort-Object-down HDDcount

    {foreach ($vm to $vmlist)

    #$Harddiskinfo = $vm | Get-hard drive

    $props = new-Object PSObject

    $props | Add-member-name "Folder" - Membertype NoteProperty-value $vm.folder

    $props | Add-member-name "VMName" - Membertype NoteProperty-value $vm. Name

    $props | Add-Member-name "vCPUs" - Membertype NoteProperty-value $vm. NumCpu

    $props | Add-member-name "Memory (GB)" - Membertype NoteProperty-value $vm. MemoryGB

    $DiskNum = 0

    foreach ($hdd in $vm. Hard drives) {}

    $controllerinfo = $hdd. ExtensionData

    $datastoreName = $($hdd.) Filename.Substring (1) - split ("]" ")) [0]

    $datastoreinfo = get-$datastoreName data store

    $controllerkey = $controllerinfo.controllerkey.tostring)

    $keycount = ($controllerkey |)  measure-object-character | Select-Object - expandproperty Characters) m:System.NET.SocketAddress.ToString)

    $virtualID = "{0}: {1}: {2} ' f $controllerkey.substring (0,1), $controllerkey.substring ($keycount - 1), $hdd. ExtensionData.Unitnumber

    $props | Add-Member-name "Disk scsiID$ ($DiskNum) '-Membertype NoteProperty-value $virtualID

    $props | Add-member-name "$($DiskNum) hard disk drive"-Membertype NoteProperty-value $hdd. Name

    $props | Add-member-name "Disk$ ($DiskNum) Size (GB)"-Membertype NoteProperty-value $hdd. CapacityGB

    $props | Add-member-name "$($DiskNum) DatastoreName disc"-Membertype NoteProperty-value $datastoreName

    $props | Add-member-name "$($DiskNum) DatastoreSize disc"-Membertype NoteProperty-value $datastoreinfo. CapacityGB

    $props | Add-member-name "$($DiskNum) DatastoreFreeSpace disc"-Membertype NoteProperty-value $datastoreinfo. FreeSpaceGB

    $DiskNum ++

    }

    $Information += $props

    }

    $Information | Out-GridView

  • How to get the public and private keys to use recaptcha?

    I registered with google to get a recaptcha for my Web site. I've gotten has been the key to site and the secret key! If I need to get the public and private key for muse!

    Hello

    Please use the site as a 'public key'key key and Secret as "clΘ privΘe".

    Concerning

    Vivek

  • get the month and year of date type

    Hi all
    I need to get the month and year of type date.

    For example
    select to_date('2011-01-17', 'yyyy-mm-dd') from dual;
    Required result:
    01-2011
    Any ideas?

    Thanks in advance,
    Bahchevanov.
    select to_char(to_date('2011-01-17', 'yyyy-mm-dd'),'mm-yyyy') from dual;
    

    HTH

  • Need to get the report of last hour in ot txt CSV cluster

    Hi all

    Thanks in advance,

    I work for a script where I need to get the information from vms that was revived by HA during the restart of the host.

    or if we can get the report of last hour in csv or txt file cluster we can extract and find out how many virtual machines has been migirated to another host for host restarts.

    Please advice.

    SIV

    Try the following, this will give you all the VMS who have been restarted and the time when it happened.

    Connect-VIServer -Server yourserver
    
    $start = (Get-Date).AddDays(-5)
    Get-VIEvent -MaxSamples 1000000 -Start $start -Type warning | Where {$_.FullFormattedMessage -Match "vSphere HA restarted"} | Select ObjectName, CreatedTime, FullFormattedMessage
    
    Disconnect-VIServer -Confirm:$false
    
  • need to get the installation for vmware Tools packages

    Hello

    With the help of ESX 4. I need to get the installation packages for the vmware tools for each version of Windows Server 2008 R2, Windows Server 2008 (x 86 and x 64) and Windows Server 2003 (x 86 and x 64).

    1. where can I get them?

    2 support without monitoring/silent install? I need to add them to an existing deployment routine.

    Thanks in advance!

    All the tools on your ESX host .iso files can be found in

    /vmimages/tools-isoimages/
    

    There is a way to push tools, but part of the upgrade tools are NETWORK card drivers and you can lose some pings or experience of ping times raised the expectations of the customers.

    An example of a sudden of thumb through AD is http://itknowledgeexchange.techtarget.com/virtualization-pro/how-to-install-vmware-tools-through-windows-group-policy/

  • Need to reset the date and time

    My system has decided that it is Jan.4th 2004 and everytime I turn it on, I need to reset the date and time. How can I cure this?

    Packard Bell's Web site does not recognize the 'ALT' CO2 as a model.  Despite this, however, PB seems only to provide a 'generic user guide"which is not described the replacement of the motherboard or the battery at all.  In fact, the only thing he has to say about batteries is be careful how get rid you of them.

    Your computer is a laptop or Desktop/Tower computer?

    If you have a desktop/Tower computer, you can look here--> http://www.uktsupport.co.uk/pb/mb/pbmb.htm and see if you can identify the motherboard used in your computer.

    However, if you have a desktop/Tower computer, the best thing to do is to unplug your computer from the network and, taking the precautions perfectly static electricity, open the box and inspect the motherboard yourself.

    A newish mother on the above site, http://www.uktsupport.co.uk/pb/mb/cosmos.htm, shows the battery on the center line vertical and more to the left.  It's just below the 3 PCI slots.  If you have something like that, a Visual inspection should be enough to see how to remove it.  The type of battery will be engraved on the top of the battery.  In the photo, it looks like a model CR-2032, but there are several models of battery on this size.  Battery CR-2032 (or equivalent) is available in almost every pharmacy chain in the United States as well as online and stores like Radio Shack.

    The page for an old motherboard, http://www.uktsupport.co.uk/pb/mb/450.htm, indicates that the battery is a '3.0V DC Lithium soldered to the motherboard"and if that were the case, it would probably be something that you wouldn't do yourself.  However, this thread is to think that all you have to do for this particular mobo is actually finding the right type of support plug-and - battery.

    If you have a laptop, things can get quite a bit more difficult.  If you can find a different model for your computer name, you may be able to find the manual here--> http://tim.id.au/laptops/packardbell/ , but some of these manuals can not explain clearly how to get to the CMOS battery.

  • I need to get the factory setting

    Dear brothers,

    I need to learn how can I reset my DESIRE m6 dx1105 to the factory setting that include Win8 with all software and the original drivers.

    I faced a major problem which made me have to format the system and install the new Win8.1

    You know, I lost the hp logo when starting the laptop.

    There are a few problems with some software like software Cyberlink PhotoDirector, who refuses to be installed because my laptop is not allowed machine!

    I need to get the year ago as before factory setting, I bought the laptop!

    Thanks for your help.

    Hello

    According to this page specifications (http://support.hp.com/us-en/document/c03489385 , your laptop came with ' Standard/Core/Basic edition' of Windows 8 64-bit.)

    Only 4 editions exist for Windows 8-

    Standard-Basic-basic
    RT
    Enterprise
    Professional

    Related: http://en.m.wikipedia.org/wiki/Windows_8_editions

    There is no need to buy a new installation of Windows 8 for reinstallation disc
    It will cost you money & also it would contain a different set of product key that should be used in another system, also when you purchase the installation disk of retail sales that it may not work with your system, as it is not an OEM installation media & product key would be retail

    8 Windows laptop product key is encrypted in the BIOS of the laptop chip in the motherboard, would automatically activate the OEM of Windows 8 when installing.

    You can do your own installation of Windows 8 OEM media ordinary from another computer if you have access:

    Link to the 8 x 64 ISO of Windows file, download, save it to a known location on the system.

    https://docs.Google.com/file/d/0B0W9PBigPy94aVJWSndyTFNFMzg/edit?PLI=1

    After you download the file, use this tool to make the file on a flash USB 4 GB or DVD drive bootable.
    The tool works for Windows 8 too-

    http://www.microsoftstore.com/store/msusa/HTML/pbPage.Help_Win7_usbdvd_dwnTool

    Note:
    When you click on the link to the iso file, sometimes you may get this message:

    "Sorry, you can't view or download this file at this time.
    Too many users have seen or this file downloaded recently. Please try to access to the file again later. If the file you are trying to access is particularly important or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you can not access a file after 24 hours, contact your domain administrator. »

    As the message says you can try again later or tomorrow. Must try several times until you get to download it - has a daily download limit.

    After making the bootable install OEM Windows 8 x 64 support, simply start your system when booting from it & installing,

    Note:
    What you will do here is a new Installation & installation media will not contain the programs, software, provided drivers with your laptop when you bought it,

    You could download the drivers from your product download page & save on another Flash/USB drive and run the configuration file after you have installed Windows 8 successfully in your system.
    Drivers download site: http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4132&lc=en&cc=us&dlc=en&sw_lang=&product=5312254

    Kind regards

    Visruth

  • I need to get the bookmarks from a backup hard drive that the system failed on. were can I find the file/folder of bookmarks?

    I need to get the bookmarks from a backup hard drive that the system failed on. were can I find the file/folder of bookmarks?

    User Agent

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729 .NET CLR 3.0.30729; NET4.0C; Media Center PC 6.0)

    Bookmarks are stored in a file called places.sqlite in the profile folder.
    To find out where the profile folder, see http://kb.mozillazine.org/Profile_folder_-_Firefox

  • need to get the Service Pack 2 and 3 for XP home

    Recently installed new h-drive. Re-installed XP Home with services Pack 1 a. I need to get the Service Pack 2 and 3, but none of Microsoft download sites will work for me. What should I do to fix this?

    You don't need sp2 (which is a chance, l because the sp2 link no longer works).

    Download sp 3 here: http://www.microsoft.com/en-us/download/details-b.aspx?id=24

    First read this: HOW TO get WinXP SP1 or SP2 fully patched after a 'clean install': http://groups.google.com/group/microsoft.public.windowsxp.general/msg/a066ae41add7dd2b

  • HP try to send me to this day that she wouldn't, take, says I need to get the Version of the Net Frame work V 2.050727, said to communicate with my editor about Apporiate version of the Net frame work.

    You need to get the update, it must get The Net Frame work V 2.050727, where can I get coming up to date, for the calculation.

    Hello

    1. do you use the 64-bit or 32-bit operating system?

    2. update you are trying to install HP?

    I suggest you to perform Windows updates.

     
    If there is an update for .NET Framework, I suggest to install the update and try to install the update from HP.
     
     
    To run Windows update manually, follow the steps:
     
    a. go to the Windows Update site. Open Internet Explorer and go to tools, Windows Update.  You must use Internet Explorer; using other browsers will result in an error message.
    b. click 'Use Administrator Options' in the menu on the left. Once the Administrator Options screen, choose to search the Windows Update Catalog under "update multiple. operaing system."
    c. install the Active X control if requested. On the screen type catalog Microsoft Update in the operating system you want updates in the area of research (for example, Vista or XP).
    d. click 'Add' next to each update you want to install. Updates will be added to your shopping cart.
    e. click on "View cart" in the upper right corner of the screen when you are finished selecting your updates. Make sure everything you want is here, and then click 'download '. In the "Download Options" popup that appears, choose where you want to download the files. A progress bar indicates the status of the downloads.
    f. navigate to the location where you downloaded the files. Double-click the files to install. You will probably be asked to restart your computer after installation is complete.
    g. to download updates for use on another computer, which is not connected to the Internet, for example, save files on removable media such as a USB drive or a disk and load the media on the computer. Double-click the files and install as you would if you downloaded them.

    If there is no update for .NET Framework, try to download and install the update manually from the link below.
     
     
    Microsoft .NET Framework Version 2.0 Redistributable Package (x 86):

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=19

    I hope this helps.
  • need to get the part number for fan of cooling of the laptop dv6 of my desire

    s/n [number of Series edited by Moderator]

    p/n C2L44UA #ABL

    less than two years old fan cooling makes rattling noises now, check the dust, cleaned air jet led, the still small makes fan noise rattling sound, need to get the part number and get a very convenient where the fan dies every day.

    Please help. the hp site "to find the part number" does not work, only list other pieces, but no cooling fan.

    DV6 - 7250CA

    nVidia GT630M graphics i-7 mobile quad-processor

    To be used on the computer models equipped with an Intel processor and a graphics subsystem with discrete memory 682061-001

    HP $51

    eBay $37

    eBay uses $28

    Your manual

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

  • In windows movie maker, failed to get the narration and music to play at the same time

    Hello
    I have followed the instructions to the T, but cannot get the narration and music to play at the same time.

    Hi Anataia,

    You are unable to play the music and narration at the same time, you can adjust the audio levels to determine which audio will play louder than the other in your movie.

    The audio settings by default in Windows Movie Maker is for the audio portion of imported video and any narration or music that you add to play at an equal level, but you can change that setting if it does not give you the balance that you want. To adjust the audio levels, follow these steps:

    1. Click on Tools, then the Audio levels.
    2. Do one of the following:
      • To increase the level of audio on the Audio track that is part of a video clip, drag the slider toward Audio from video.
      • To increase the level of audio that is located on the audio / music, drag the slider to Audio / Music.
    3. Click close.

    http://Windows.Microsoft.com/en-us/Windows-Vista/adjusting-audio-in-Windows-Movie-Maker-frequently-asked-questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/add-narration-to-your-movie

    Hope this has been helpful.

    Bindu S - Microsoft Support
    Visit our Microsoft answers feedback Forum and let us know what you think

  • How can I get the date and time function to appear as a tile

    How can I get the date and time function to appear as a tile

    How can I get the date and time function to appear as a tile

    WIN8 are delivered with this tile/app.  The only way to display the time is to launch the charm bar (Win - key + C) or mouse over to the right up/down.  That said go to the Windows store... There are several free applications that display the time / date as a live tile.  Good luck.

  • Need to get the result of the required format

    Hi all

    I'll have the data in a table below:

    IDNUM1num2
    1555555
    2123345
    3456567
    4666666

    IDNUM1num2
    1555555
    2123345
    3456567
    4666666

    and they need to get the result as below:. Help, please...

    IDNUM
    1555
    2123
    2345
    3456
    3567
    4666

    Thanks in advance...

    Hello

    So, instead of having 2 columns on 1 row, you want to have 1 column on 2 rows.  It's just that UNPIVOT:

    SELECT DISTINCT

    ID, num

    D

    UNPIVOT (num

    FOR the label IN (num1, num2)

    )

    ORDER BY id, num

    ;

    It is more effective than the UNION, because it requires only 1 pass through the table.

Maybe you are looking for

  • How do you make an average of only ONE channel in the analysis?

    How do you carry the 'average' function in the analysis using a single channel? Currently I have to for this by hand in the .csv file I import to tiara. I prefer not to do so because of scripting.

  • Game that worked before no longer works.

    I recently installed the monopoly by Parker Brothers (2008) FULL VERSION RETAIL PAY for my pc and everything worked perfect until the next day, when I booted up my pc and decided to run a monopoly even once, it didn't work. No error whatsoever. I dou

  • Warhammer and Windows 7

    My game crashes regularly and crashes without him seems all commonplace.  Promotes it is impossible to send a crash report to the game manufactures. Of course, he ran very well in vista"

  • The wireless on my Aspire 5535 is all the TIME

    The wireless on my Aspire5535 is all the TIME, it goes out not when the wireless button is pressed, instead, I get a message on the screen "No. Wireless Device" even if there is a card physically installed. Press the bluetooth button, and the message

  • Dell Precision T3500 speaker internal

    Hello I just installed an internal speaker in my Dell Precision T3500.  How to configure a Windows 10 system use this speaker?  The internal speaker made reference to the T3500 product documentation, but I have found no documentation on how to make i