Restore default alarm / problem with 2 of them

Hello everyone!

I create a script to restore vCenter alarm on the default state.

In fact, it's almost over because it works for 35 of them,

but I am having problems with 2 of them who do not want to create.

you can find the current version of my script here: http://ghostus.free.fr/Projet/PowerCLI/default-alarm.ps1

(I commented the alarm two that do not work, then the rest of the code works)

the part of the code that do not work is:

Use of #Datastore to disk

New 'or' 'Use of data to drive store' 'default alarm to monitor the datastore disk usage"

7500 0 8500 metexpr 0 "Datastore" 147

$global: alarmMgr.CreateAlarm ($entity. MoRef, $global: alarm)

and:

#Host State of connection and power supply

New 'and' 'connection host and power status' "default alarm to monitor connection status and power.

statexpr «isEqual"«notResponding" «runtime.connectionState"«HostSystem ' «»

statexpr «isUnequal"«standBy" «runtime.powerState"«HostSystem ' «»

$global: alarmMgr.CreateAlarm ($entity. MoRef, $global: alarm)

but as it is the function of myself I'm not someone to see any error in there, except

However, I wonder if some of you guys still managed create specially one of these 2 alarm using a script?

And if yes, can you tell me, what type of event counter/expression/etc... have you used?

Any thoughts on that would be appreciated = D

I think I found the problem.

It's in the way that the system will wait for the red and yellow conditions to be specified.

If you don't want to test a specific condition, you must leave it as he got out of the constructor.

If you change your statexpr like that function, it works.

function statexpr([string]$operator,[string]$red,[string]$path,[string]$type,[string]$yellow){
#Ajout d'un moniteur(expression) d'état(state) à une alarme
     $global:expr = New-Object VMware.Vim.StateAlarmExpression
     $global:expr.Operator = $operator
     if($red -ne ""){
          $global:expr.Red = $red
     }
     $global:expr.StatePath = $path
     $global:expr.Type = $type
     if($yellow -ne ""){
          $global:expr.Yellow = $yellow
     }
     $global:alarm.expression.expression += $global:expr
}

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • You try to run the system on my desktop restore encounters a problem with the program looping.

    Original title: System Restore loops

    Hi, I am trying to run restoring the system on my desk is a problem with the program in a loop.  He directs the system restore and then comes back just to start the system again Restore page.  How to solve this?  I started having problems when I have updated the BIOS on my motherboard.  When I installed the motherboard at the start, I think I used the incorrect installation disc (my son has same brand motherboard but the sound is more advanced).

    Recovery of your computer (Windows) using "Recovery Partition" of the Manufacture or
    contact PC manufacturing (see support links below) and order the recovery media.

    Note: Activation is not required when you use the recovery partition or recovery media, but you will need to reinstall all your applications.

    Also to save your documents on external support (if possible) before starting the recovery process.

    Once completed, your PC will be actually in the State when you first purchased it and turned on for the 1st time.

    To access the recovery Partition, start your computer, and then by pressing the appropriate function key. It can be either F1, F2, F9, F10, F11, F12, DEL or tab key. Check the list below or your user manual for your brand and model.

    If your hard drive has failed, do not have a recovery partition or the recovery partition is not accessible,
    Then, you must contact the manufacturer support team and ask for a "recovery disc" which allows to reinstall Windows 7.

    How access/start the process of recovery of the manufactures listed below.

    Acer: Press and hold ALT + F10, as soon as you see the logo
    http://Acer.custhelp.com/app/answers/detail/A_ID/2631
    Acer support: http://www.acer.com/worldwide/support/
    Acer recovery support: http://store.acer.com/store/aceramer/en_US/eRecovery

    Advent: restart your computer, then the immediate start by pressing the [F8] key or the F10 key.
    The fastest way to restore your computer is to use the hard disk recovery tools. You can access them by restarting your computer and then pressing the [F8] key or the F10 key until the Advanced Boot Menu appears. Use the arrows to select "Repair your computer", then press [Enter]. Read all of the instructions on the website of advent and made your choice as to the action you want to perform: http://www.adventcomputers.co.uk/restore-or-reinstall-windows-your-computer
    Support: http://www.adventcomputers.co.uk/product-support/support-services

    ASUS: Press or press the F9 key as soon as you see the Asus logo.
    http://support.ASUS.com/troubleshooting/detail.aspx?SLanguage=en&m=X53E&OS=&no=1775
    ASUS support: http://support.asus.com/contactus.aspx?SLanguage=en

    Dell: Press F8 directly after switching on / to start the computer
    Recovering detail instructions:
    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?docid=DSN_362066
    http://www.Dell.com/support/troubleshooting/us/en/19/KCS/KcsArticles/ArticleView?docid=52182
    Dell support: http://www.dell.com/support/home/us/en/19?c=&l=&s=
    Or: http://www.dell.com/

    EMachines: hold the Alt key and hold press and release the key F10
    http://Techchannel.RadioShack.com/eMachines-system-recovery-1747.html
    Support: http://www.emachines.com/ec/en/US/content/support

    Fujitsu: Press F8 several times directly after switching on
    https://answers.Yahoo.com/question/index?QID=20110406074143AAcx1Zw
    Support: http://www.fujitsu.com/global/support/

    Gateway:
    http://www.ehow.com/how_6297937_restore-gateway-laptop-factory-settings.html
    https://support.gateway.com/s/software/Microsof/Vista/7515418/7515418su531.shtml
    Support: http://www.gateway.com/worldwide/support/

    HP Notebook: Usually to begin recovery process press the F10 key, power on the computer
    HP Mini: Press F11 directly after switching on / to start the computer
    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c01867418&cc=us&destPage=document&LC=en&tmp_docname=c01867418
    Support: http://www8.hp.com/us/en/contact-hp/ww-contact-us.html

    Lenovo uses the F11 key to launch the restore process:
    http://support.Lenovo.com/en_US/detail.page?LegacyDocID=MIGR-4UFUYK
    Directions for Lenovo OneKey Recovery, hidden partition and recovery DVDs:
    https://support.Lenovo.com/us/en/documents/ht077384
    and: http://support.lenovo.com/en_US/detail.page?DocID=HT077144
    Support: http://support.lenovo.com/en/supportphonelist

    How to run Lenovo Onekey Recovery
    http://support.Lenovo.com/en_US/downloads/detail.page?docid=HT062552
    Detailed as follows: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&LegacyDocID=127597018499211

    You can also find parts of this article from Lenovo worth reading:
    http://support.Lenovo.com/en_US/detail.page?LegacyDocID=MIGR-4VFUDU

    LG: Press F11 directly after switching on / to start the computer
    Support: http://www.lg.com/

    Packard Bell: Turn on your computer. When Packard Bell logo is displayed, press in and hold the ALT key while pressing the F10 key several times. Release the keys when a message that Windows is loading files.
    After the system recovery program has loaded follow the instructions to reinstall the operating system.
    Support: http://www.packardbell.com/index.html

    Samsung: Press the F4 key to the Samsung logo when you turn on first of all of the computer.
    Support: http://www.samsung.com/

    Sony VAIO Windows 7: restart and press "F10".
    https://CA.en.KB.Sony.com/app/answers/detail/A_ID/35585/p/48903, 49902,71663,71664/c/65,67/kw/recovery%20using%20f10
    Sony VAIO Vista: Restart and press "F8" repeatedly until the screen "Advanced Boot Options".
    https://us.en.kb.sony.com/app/answers/detail/a_id/41931/~/how-to-perform-a-system-recovery-using-the-vaio-recovery-center.
    https://us.en.KB.Sony.com/app/answers/detail/A_ID/41949/session/L2F2LzEvdGltZS8xNDA4MjI2NTAzL3NpZC8qWVBPbCpfbA%3D%3D
    Support: http://www.sony.net/SonyInfo/Support/

    Toshiba: Press on F12 or the value 0 (zero) key on the top of the keyboard (not the zero on the numeric keypad key)
    and at the same time, press the button power once to turn on your laptop.
    When the Toshiba screen appears; release the 0 key.
    References: http://www.mytoshiba.com.au/support/items/faq/71
    http://forums.Toshiba.com/T5/system-recovery-and-recovery/how-to-perform-system-recovery-Windows-7/Ta-p/279643
    Support: http://www.toshiba.co.jp/worldwide/

    Windows 7 - location of the Partition Recovery and information.
    "Configurations of drive partitions using the BIOS has recommended.
    Note: Check the diagrams of this article
    http://TechNet.Microsoft.com/en-us/library/dd744364%28WS.10%29.aspx

    J W Stuart: http://www.pagestart.com

  • problem with order 40470 themes from adobe for muse

    Hi, I have a problem with a template I received topic of adobe, nr.40470. the problem is that when I preview the page in the browser, the text is on the right side of the chassis. I deleted and reinstalled the model several times but still the same error

    Hi A and C,

    Try to increase the size of the TextBox for a better analysis and share a link to your site.

    Kind regards

    Akshay

  • Satellite M645 - problem with files from Ipod

    I recently had two other notebooks die on me so why I got a brand new Toshiba Satellite M645.
    I have two ipods with music on them from one of the computers.
    When we follow the ways to transfer music on my new computer that I will meet different problems with each of them.

    The first problem is on my video Ipod.
    After clicking on the hidden folders and etc when I find the music file, it shows the files for everything except music.
    Here is the list of files, it gives me

    Calendards
    contacts
    garbage
    NISAM
    Notes
    recycler
    ground
    USB 2.0 driver
    zurim

    If someone could help me with this, or maybe send me to another forum or page that might help me.

    My other is an ipod touch.

    And when going to the devices, it rises driver device USB mobile apple instead of an ipod just like my other.
    When you click on it instead of display the files it just go to the properties and has two tabs, general and material.

    Once more if anyone knows how I might be able to get these on my new computer, I would be very grateful

    That has nothing to do with Toshiba but with your Ipod.

    On the other hand; I have an iPhone and the management of the files it s similar iPod.
    All files need iTunes and using iTunes, you can control files and move between computer and ipod

    However, I recommend you to visit the forum for ipod problems

  • Problem with the function keys

    Hi a few days ago my computer did an automatic update of windows.  This combination of time keyboard shortcuts in my Microsoft Flight Simulator 2004 have changed.  For example, ctrl + any Fkey and shift-several different keys do not work.  Some commands are not options in games keyboard assignments.

    Is there a way to restore my original keyboard settings?

    Thank you...

    Are you sure that Windows Update caused this?

    Restore your computer (by using the system restore) to a previous state - before you install the updates and see if it restores the 'fn' and other features with FS 2004.

    See http://support.microsoft.com/kb/306084 (assuming you are using Windows XP, because the game is compatible with XP and legacy OS)

    If restore fixed the problem with the keys on the keyboard and FS2004, manually install the updates one: after the installation of each update, restart the computer, try to play the game and check if the problem reappears at all.

    This, until you have installed all Windows updates.

    MRI!

  • problem with reading Fuze & clip [resolved]

    I used some Fuze ver2 & clip ver1 & ver 2 and I have this problem with all of them in rockbox and original firmware, none of these players that I used the simple ability to play between folders when all the songs in a specific folder are played well stop playing so I have to manually browse to the next can folder (album) someone help me with this problem. all sansa players work like that or I don't know how to use them.

    peaceful1 wrote:

    Yes, no way to sovle inside original firmware or Rockbox? & It means for other players from sansa as clip clip ver.2 ver.1

    http://download.Rockbox.org/daily/manual/Rockbox-sansafuzev2/Rockbox-buildch7.html#X10-1280007.10

  • iOS 9.3.2 problem with alarms (Bug?)

    Hello community members

    I m new here and must start with a problem that occure on my iPhone since iOS 9.3.2.

    Alex I´m, 17 and I come from Germany. I apologize for any errors I could do

    If the problem is that since the iOS 9.3.2 my sensors in the clock app no longer works.

    When I set up an alarm, the iPhone automatically disable when I quit the app.

    This problem I've had since my iPhone 6. Then I bought for me the iPhone 6s and boot from a backup of the iPhone 6.

    Nothing helps me. I often reset the iPhone and turn it on but nothing really works.

     Care cannot help me too. Is that a person having the same problem?

    I don't really know what I can do to solve it. Now I use the watch for messages, but I want my iPhone to wake me up

    I hope someone can help me.

    Best regards

    Alex

    Hi AlexRis,

    Thanks for checking out the Apple Support and communities for details on what is happening with your alarms. I understand that you are experiencing problems with your alarms do not stay on your iPhone. I use a alarm every morning on my iPhone and my Apple Watch so I can understand how it is important to make sure that it works.

    I just want to be safe, make sure you follow the steps in the user guide to set up an alarm.

    Alarms and timers - iPhone

    Since you already mentioned reboot, the next step that I recommend is to reset all the settings on your iPhone. This does not erase any of your data (like photos, applications, or contacts), but you need to set some default settings save as wallpaper, ringtones, sounds system, restrictions, Touch ID & password and iMessage. You'll also need to reconnect to your Wi - Fi networks then make sure that you have your Wi - Fi in the information available. To reset the settings of your iPhone, go to settings > general > reset > reset all settings. The iPhone will reboot, then you can test.

    If it is not the thing to reset all settings, the next step would be to backup your iPhone and restore it via iTunes. Once restore you, you'll want to set up as a new device (temporarily) and test without your backup data. If it works, you can restore your backup and test again. You will find articles that will help you with the steps below.

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod settings - Apple Support

    Restore your iPhone, iPad or iPod touch from a backup - Apple Support

    Best regards.

  • Problems with the 64-bit on Pavilion a6620f Vista Factory restore

    I had a hard drive failure and restoration on a new hard drive. The original HD is a 500 GB Seagate Barracuda 7200.11 model ST 3500620AS. The new HD is a 500 GB Seagate Barracuda 7200 model ST 3500641AS - RK. I bought a set of restore for this HP computer disks.

    First problem was that disk 1 does not start from the internal CD/DVD drive. My Seagate drive boots fine on the same drive! I used an external USB CD/DVD drive and restore disks worked well on that. I went through the process of factory restore and in the end, I get an error message "installing Windows could not configure Windows to run on this computer hardware." I tried to change the BIOS setting from ACHI and IDE to SATA RAID with no luck. I tried to unplug the USB CD drive before the first reboot. That no longer works.  I unplugged the internal CD drive and tried different combinations with no luck. Need help I have run out of things to try! Does anyone have any ideas/thoughts?

    Hello:

    I don't know how you can get your recovery discs to work.

    Looks like you have tried everything.

    I had problems with mine too and got the same error on a HP Elite 8200 desktop computer business

    It was the first time I've ever had a problem with recovery disks.  It's very frustrating.

    I have a workaround if all goes well, you can use to get Vista on your PC...

    If you can read your 25-character product key MS, you can make your own Windows Vista installation disc. You just download the 3 files you need on the link below and read all the instructions to create a Setup bootable DVD disk using imageburn.

    It was not so hard to do. I burned both the disk of 64-bit and 32-bit disk in case I ever need them.

    I tested both of them (just before going forward with the actual facility) and they seem to work perfectly.

    Apparently, when you enter the product key, he knows which version of Vista you have.

    http://en.community.Dell.com/support-forums/software-OS/w/microsoft_os/3317.2-3-Microsoft-Windows-VI...

    After you have successfully installed vista, you can download the drivers you need your PC support and driver page.

    Paul

  • Problems with fractional alarm levels

    Hello

    We use LV8.6 with module DSC under XP Pro.

    I am building an application that needs to configure/monitor alarms on deployed locally variable shared double digital.

    I don't seem to be able to define levels of fractional alarm through in Distributed System Manager or Project Explorer. For example, I'm trying to set the alarm HI_HI to 1.50 level. What I see, is that the values change when I get it, but it gets rounded up to the nearest whole number if I open properties for this variable shared once more (or property node allows you to read).

    If I use the node property to set the levels I am able to get fractional values. There is a problem with automatic receipt of the alarm in this case, although (the alarm do not auto-reconnu when the value of the variable returned to non-alarme interval).

    I would appreciate comments on the issues that I am experiencing.

    Thank you in advance!

    Far below the level of the alarm you have tried going?  In LabVIEW 2009 at least, there is a dead zone which can be defined for each alarm.  By default, the dead zone is 1, which means that you must pass at least one point below the alarm so that it auto-reconnaître.  Herea good help file that explains exactly how it works.  In short, if you want to auto-reconnaître when the value is less exactly the alarm level, then you have a dead zone of 0.  I hope this helps.

  • I have a problem with a Gamehouse game. Talked to them and they say that it is a problem of compatiablity with Vista.

    I have a problem with a Gamehouse game

    Talked to them and they say that it is a problem of compatiablity with Vista. It's Super Jigsaw Puzzle and I the hours worked in several puzzles and now when I try to go inside he closes Super Puzzle. This is frustinating because I've uninstalled and reinstalled the program 3 times, it does not help. Is that what I can do to fix this problem in Vista? I have all the updates except IE 8.  We like IE7, but all the other updates sent we have.

    If it is a program downloaded and installed, read this:

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/default.aspx

    Windows Vista Compatibility Center

    First thing to do is to check its Vista compatibility at the link above, and if not to see what patches/solutions are available from its manufacturer...

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-compatibility-mode/

    If this is not Vista compatible, read the info on the link above.
    It works for some programs, but not all.

    This applies to software programs, NOT hardware drivers.

    If it's Vista compatible > uninstall it > Re-download/save to your desktop > right click on setup.exe O run as admin.

    See you soon.

    Mick Murphy - Microsoft partner

  • Strange problem with the default location of Documents

    I have recently reinstalled Windows after a hard disk failure. Fortunately, I had previously moved the library of 'My Documents' to a secondary drive, so I don't lose anything. Merge all records (i.e. move the new default library to merge with the library on my secondary drive) seemed to cause some problems with some file search programs, then my new primary drive being much bigger than my old one that I decided just to move the library of My Documents from my drive C (the OS partition).

    Here's the weird part: under start > Documents (right click) > properties, I have the save location set to C:\Users\MyName, which (I think) is normally by default when you install Windows. But if I click on "restore defaults", it switches to the root of one of my secondary drives (drive E).

    This is problematic because some of my games can't seem to find my old safe. Backups are in Documents > my games, but instead to find there as it should the games create a new folder 'My games' in the root directory of drive E, although I still have My Documents to save the location defined in its usual location on my primary C drive.

    So I think the problems are linked, and I can't understand why by clicking on "restore default settings" on the start menu > properties of Documents it would lead to the use of the root of my E drive as the location for all the files and folders "My Documents".

    I carefully edit the registry to make sure that this value is set correctly. Be sure to include the name of the final folder ('Documents') in the path. If you simply specify your user folder, all your documents will be dump it instead of inside the real documents folder.

  • Problem with bingaerialeurope theme, I wonder not «subscribe to RSS»

    I recently had a problem with the theme of Europe bingaerial.

    It has been installed, but the flow has stopped updating

    I tried to remove and reinstall but I am not asked "subscribe to RSS", and no images are uploaded.

    I can download versions of bingaerial

    Hello

    I suggest to follow the steps provided and check if it helps.

    a. run Internet Explorer and then press ALT + C or Open Favorites Center & switch to the Feeds tab and remove the following feed

    http://themeserver.microsoft.com/default.aspx?p=Bing&c=Desktop&m=en-US
    

    b. open personalization (right click on desktop and choose personalize) and shuffle or re - select the Bing Dynamic theme.

    c. He invite you to subscribe flow RSS of Bing and to download attachments to automatically rotate wallpapers or download unique wallpaper for your desktop. Click download attachments

    • Now theme will begin downloading wallpapers automatically.

    Hope this information is helpful

  • I work in InDesign CS5 and have a problem with the panels on the right. Some of them are empty. Ideas?

    I work in InDesign CS5 and have a problem with the panels on the right. the panels color chart, paragraph styles, and totally blank menus link. I pulled upward from publications that I already worked on and they are still virgins. I tried to load styles from other pubs, ID, and that does not work either. I can see them when I go to create a new style and use BASED on function.

    Any ideas?

    Try to restore your InDesign preferences. Here's how:

    FAQ: How to reset or 'trash' preferences?

  • problems with the restore image on dreamweaver cs3

    I'm a GoLiver trying to learn Dreamweaver. I'm having a problem with the image of restoration on the bearing.  Here's the url

    http://www.allthegills.com/meadowcroftweb

    Not sure where I was wrong.

    Thanks for any help.

    The onmouse above and on the need to go in your href tag. You have them in your img tag. Should look like this

    whatever

  • the site theme is problem with firefox, but not any problem of chrome with!

    the site theme is problem with firefox, but not any problem of chrome with!
    for ex: http://haftegy.ir
    How to fix?

    Wow sorry! IM update firefox to the latest version and my problem is solved.
    Thank you very much.

Maybe you are looking for

  • NTLDR is missing - windows xp professional

    recceving error "NTLDR is missing". I searched through the various articles on the support site and I can't seem to understand even where to start. I can't go to the command line to run executable files and I don't have a boot disk. I copied a bootdi

  • How can I turn off the change of languages when I hit 'ctrl-space "?

    I would like to know if the following problem solved? http://social.answers.Microsoft.com/forums/en-us/vistaappearance/thread/d8df1edc-2c9a-4f53-A492-df3165da46fa It's really embarrassing that my netbeans code completion works does not :(((

  • window upgrade Windows 10

    I can't leave the ANNOYING windows 10 upgrade window, who jumped on my screen, WITH OUTPUT NO choice; only choice is to update now, or reschedule - I don't WANT WINDOWS screen 10, but it will NOT let me xit. even after shooting computer power off, th

  • Logitech unifying device is not recognized

    Windows 7 does not recognize the unifying device for logitech M510 wireless mouse. any ideas? all my usb ports work.

  • USB easy transfer cable question

    bought this after the visit of this forum, but I'm still lost, not really computer savy with regard to this kind of procedure. I have an old computer that I want to transfer photos/media on my new computer, the Member of the forum said it would be th