Wait for the host disconnects and then run a command

Hello world

I have a stop script for my virtual infrastructure, now I have to add code to stop an Equallogic AFTER the last host table is turned off.

I know the commands to do this, but I need help to write a loop that will test the ip address of the last host management and wait until this station responds to pings.

In my script I have to establish what host will be put off to the end so it's not a problem... How can I keep ping IP management host to die and then run the commands Equallogic?

I hope that I managed to explain to me... I was exploring the Test-Connection cmdlet but it seems that it displays che echo of the ping instead of State... I'm a bit lost around this, can someone help me please?

Something like that would do the trick?

$count = 0

$maxWait = 10

{}

$count += 1

Write-Output "$(get-date-f HH) $(get-date-f JJ/MM/AAAA)-host is offline."

sleep 5

} until (!) (Test-Connection 192.168.110.85 - BufferSize) count 16-1 - calm)- or ($count - gt $maxWait))

If {($count - gt $maxWait)

Write-Output "Host always online."

}

else {}

Write-Output "$(get-date-f HH) $(get-date-f JJ/MM/AAAA)-host is offline."

}

Tags: VMware

Similar Questions

  • Windows 7 poster waiting for the host window for spot on the restart or shutdown

    Every time I have shut down or restart my computer, I get a screen that says "Waiting for task host window" I tried to clean the registry, I did a chkdsk, I ran sfc/scannow several times now and this issue will not go away.  I am running Windows 7 64-bit with 4 GB of ram. I also tried to apply the patch, but I always get "this update is not applicable to your computer."

    Hello

    Thanks for posting your question on the forum of the Microsoft community.

    I would like to know some information about the problem so that we can help you better.

    1. have you done any hardware or software changes to your computer recently?
    2. What is the brand and model of your computer?

    'The Taskhost' is a generic process, which acts as a host for the processes that run "DLLs" rather than "Exe". Starts, it checks the registry services part to build a list of the DLL-based services it needs to load, then load them.

    I suggest you try using the steps in this Microsoft support article and check if it helps.
    Reference:
    Why my computer won't turn on or off quickly?
    http://Windows.Microsoft.com/en-us/Windows/computer-wont-turn-on-off-quickly#1TC=Windows-7

    In addition, you can view the details on the performance of the computer of the Task Manager.
    Reference:
    See details about your computer's performance using Task Manager
    http://Windows.Microsoft.com/en-us/Windows7/see-details-about-your-computers-performance-using-Task-Manager

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • A timeout occurred while waiting for the host controller EHCI interrupt on answer Async ahead Bell.

    Whenever I put my adapter wireless netgear n150 under heavy load (download of World of Warcraft for example), it will go down to connection and until I restart the computer the adapter usb port is useless.  I dug into the event viewer and found that a timeout occurred while waiting for the EHCI host controller interrupt on the asynchronous response advance doorbell, source usbehci.  This seems to have been a problem with windows 8 I found other threads referencing but I can say that they are pre-release and some actually work solutions have been validated.  I already assured that all drivers, firmware and chipsets are up-to-date and compatible.  ANYONE please help?

    Quick fix I found:

    -try falling back to WiFi G rather than use N
    In my case, it works... is no longer a fall. But not the same bandwidth...
  • JS CS4: Create the variable for the active layer, and then select the layer at the end of a script

    I'm come white with the verbiage and spin my wheels with OMV guide and script.

    var myOriginalLayer = app.activeDocument.layers.item (0);
    Alert (myOriginalLayer)

    Returns "layer object" and not the name of the layer.

    var myOriginalLayer = app.activeDocument.layers.lastItem () .name;

    Returns the name of the layer I want but not by choice.

    I am challenged on how to select the layer.

    Hi John,.

    The difference lies in that the [Object Layer] is the real object, and the 'name' is a property - like color.

    You can use one of these two approaches:

    var myOriginalLayer = app.activeDocument.layers.item (0);
    Alert (myOriginalLayer.Name);

    hosts the original layer object, and you can see the name if necessary :-)

    For re - select the layer, use

    app.activeDocument.activeLayer = myOriginalLayer;

    You can also select name goes like

    var myOriginalLayerNAME = app.activeDocument.layers.lastItem () .name;

    ...

    app.activeDocument.activeLayer = app.activeDocument.layers.item (myOriginalLayerNAME);

    I also noted the following:

    app.activeDocument.layers.item (0) points to the first layer of your document; not the 'active'. Similarly, app.activeDocument.layers.lastItem () points only to the very last. I don't know if the order of the activeDocument.layers array mimicks the order as shown in the tags palette, but I hope for it :-)

    To get/set the active layer, use app.activeDocument.activeLayer as shown above.

  • People with disabilities Add ons for the last pass and XMarks running Windows 10

    Last pass. E Web and XMarks modules disabled on my PC using windows 10. My Mac uses the last pass, XMarks E-Weband and it still works. Why are they add ons disabled on the PC, not Mac. I've used these all day and if Firefox will continue to turn off these three very important modules, I'll use another browser.

    You have posted here with Firefox 41, which is a Beta version.
    Is your Mac using Firefox 40 / 40.0.2 the current release version?

    Not all extensions are compatible with the preliminary versions, such as the Beta, depends on the particular extension and if the developer of the extension supports the beta versions of Firefox.

  • page apex_admin not display for the runtime environment and application deployment using command-line

    Hello

    I installed APEX 4.2.6 EPG on Windows 7 Professional (32 bit) with Intel Core i3 processor.  Oracle XE 11.2 Win-32 DB.

    All the installation steps followed according to the Installation guide for the Apex.  It is a fresh and new installation.

    img1.png

    Install the log shows below -.

    Thank you for the installation of Oracle Application Express.

    Oracle Application Express is installed in the APEX_040200 schema.

    SQL > SELECT DBMS_XDB. GETHTTPPORT FROM DUAL;

    GETHTTPPORT

    -----------

           8082

    I did only the installation of runtime using apxrtins.

    ' Step ' grant of privileges of connection "according to the document was smooth without any problems.

    SQL > ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 20 scope = both;

    Modified system.

    SQL > ALTER SYSTEM SET SHARED_SERVERS = 5 SCOPE = BOTH;

    Modified system.

       

    I played "Creating a workspace manually" and met above question.  For installation of runtime, is this unnecessary step?  Or any other step I'm missing?  Help, please.

    Thank you and best regards,

    -Anand

    Hi Anand,

    anand_gp wrote:

    All the steps I did in my development environment and no problem following the steps.  And there is no question of the problem of the EPG or a bad image of loading because the other workspaces and applications out there are working well.  My question was, when I tried to copy an application via command line in an another 'new space and work with some new application ID', wheather my steps were correct?  If so, then why does not using the URL of the application.  And since it is in full flight development environment, where other workspace / applications work fine, how to connect to the new workspace I created using the command line?  If you look at my steps, I did provide any user name and password associated with this workspace all in creation.  When all this is going very well, so I will try in my new machine that has only run-time environment.

    Thank you

    -Anand

    I think you missed the validation part. You're going to make after the installation of the application as well as the addition of workspace

    commit;

    Hope that solves your problem.

    Kind regards

    Jitendra

  • install new printer Epson WF-2530, will not install scanner drivers error message ' could not launchrequired program during installation, check the installation disc, and then run the installation again.

    having a problem installing drivers for a new Epson printer scanner all in a WF-2530 on my desktop using windows vista

    error message "could not launch the required program during installation, check the installation disc, then re-run the installer.

    I managed to install the software on my laptop using windows 7.

    spending some time with epson tech dept, after several attempts to solve the problem, they advised that it was a problem with the microsoft software.

    have tried to install it on the internet from the site of epson, but same error

    any help would be greatly appreciated

    < have="" tried="" installing="" over="" internet="" from="" epson="" website="" but="" same="">
    Do you mean that you have downloaded the Epson driver?

    http://www.Epson.com/cgi-bin/store/support/supDetail.jsp?BV_UseBVCookie=Yes&infoType=overview&OID=209709

    Try using the wizard adding printer in the Control Panel, printers. In the wizard, select EPSON under manufacturer. If you don't see your printer in the list, click the Windows Update button. It will take several minutes (about 20) be patient, Windows updates the list. You should see a hard drive activity during the update.

    If that wouldn't work, try to run the System File Checker:

    Use the System File Checker tool to troubleshoot missing or corrupted on Windows Vista or Windows 7 system files
    http://support.Microsoft.com/kb/929833?WA=wsignin1.0

  • the pop up Windows Defender when you are connected to the internet by dial-up readings; change of system in known application, type of change; running applications, cwindowssystem32mswsockdll, I am disconnected and then reconnected___

    the pop up Windows Defender when you are connected to the internet by dial-up readings; change of system in known application, type of change; running applications, cwindowssystem32mswsockdll, I disconnected and then reconnected.

    I just ran windows update on a large number of files all successful before this happened, it happens when I am connected to the internet, I use dial-up access

    added on 25/11/09 still have the problem mentioned above, even explore two windows are runnibg on the system, or two IE browsers running?

    Added 27/11/09 I ave followed all instructions up to and including thefix tool kb/93623, stiil I have this report of windows Defender quickly appearing twice in a row, then I'm disconnected from the internet. any more ideas thanks sam

    Visit this link:
    http://support.Microsoft.com/kb/936213

  • waiting for the task to the end host window.

    My computer startrd to show, when I restart or shutdown windows 7, I get a message saying that windows is waiting for the task host window to end what it means...?

    Hi Sanaaalsadouni,

    Thanks for posting your question in the Microsoft Community forums.

    The TASKHOST is a generic process, which acts as a host for the processes that are running DLL instead of exe files. Up TASKHOST checks the part Services of the registry to construct a list of services focused on the DLLS it needs to load, then load them.

    I suggest you try the procedure described in the article and see if it helps.

    Why my computer won't turn on or off quickly?
    http://Windows.Microsoft.com/en-us/Windows7/why-wont-my-computer-turn-on-or-off-quickly

    See the article for more information.

    See details about your computer's performance using Task Manager
    http://Windows.Microsoft.com/en-us/Windows7/see-details-about-your-computers-performance-using-Task-Manager

    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you.

  • Since the installation of Firefox 8, when I type anything in the address bar and then press "enter" or click on the arrow for "go to the address in the address bar", nothing happens!

    Since the installation of Firefox 8, when I type anything in the address bar and then press "enter" or click on the arrow for "go to the address in the address bar", nothing happens! Similarly if a place is indicated by the location bar AutoComplete feature. I hit "enter" or click the "go to" and nothing happens. " Keyboard shortcuts to "complete the .com, .net, etc. addresses" doesn't work or the other. The address bar has worked well for entering web addresses before Firefox 8. Help, please.

    Try Firefox SafeMode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the Firefox 4, 5, 6, 7 SafeMode pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    When find you what is causing that, please let us know. It might help others who have this problem.

  • When I turn on my emachine and try to check my e-mail, I get my homepage to google for about 1 second and then the screen turns white with bee.pl.

    HELP me get my E mail.

    When I turn on my emachine and try to check my e-mail, I get my homepage to google for about 1 second and then the screen turns white with bee.pl.

    http://INFOTEP.bee.pl/info.php?avted=;     I'm not that day on computers, and many of their functions and a few times I get a little lost in there so if anyone can help me I really appreciate it.    Thank you!!!

    Hello

    1. what operating system do you use?

    2. What mail client do you use?

    3. you have made any changes to your

    4. what site you're talking about?

    5. How do you access the webpage?

    6. you use Internet explorer or another browser to access the site?

    The link give http://infotep.bee.pl/info.php?avted takes me to a blank Web page

    Are you referring to http://www.bee.pl/index

    Refer to the following, who says that the sites host malware

    http://www.Google.com/SafeBrowsing/diagnostic?site=monidopo.bee.pl/

  • I've updated my explore since the MSN site and then restarted it said I was running a version of Windows.

    I've updated my explore since the MSN site and then restarted it said I was running a version of Windows. I then re installed Vista with my drive of origin as suggested and created that created an old file from windows to save older files and now it will not recognize the key of the product code.

    original title: reinstalling vista

    From you description of the problem you encounter, the scenario where this can happen.

    Windows vista was preinstalled by an OEM or by using a Volume license installation. The problem does not occur on retail versions of Windows Vista. For example, the problem will not occur if you bought Windows Vista and installed the operating system on a computer yourself. If this is the case with your system

    Solve this problem by referring to the article below.

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

    To activate windows vista manually, you can follow the steps described in the links below.

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

    I hope this helps.

  • Profile of user runs as an administrator for the daily work and this account is corrupt and switch every time on a portable temporary file is opened (created)

    User profile runs as an administrator for the daily work and this account is corrupted and switch every time on my laptop, just open a temp file (created), I downloaded a driver to run my cell phone as a modem while he is on vacation. and the problem started after downloading this software,

    Hi johnnyroque

    Thanks for posting on Microsoft Answers.

    Try to use the following steps to enable the built-in Administrator account and further, then the steps and links to fix a corrupted profile.

    Please start on the mode of the Windows recovery environment (WINRE).

    -To start the computer into WinRE mode, insert the Vista CD in the CD tray, restart the computer.
    -When you are prompted to "press any key to boot from the CD-ROM..." Press ENTER.
    -Select the language by default, click Next.
    -Select "repair your computer".
    http://www.Flickr.com/photos/freeed/363935713/in/set-72157594490796701/
    -Select command prompt, and then type the following commands:

    NET user administrator / Active: Yes
    NET user {user account name} {new user password}

    Note: Please enter the user name and the password without the braces of the flower.

    -Restart the computer normally.

    //////////////////////////////////////////////////////////////////////////////

    To fix a see corrupted profile link below:
    http://windowshelp.Microsoft.com/Windows/en-us/help/769495bf-035C-4764-A538-c9b05c22001e1033.mspx

    Please post back and let us know if it helped to solve the problem - thanks Ken
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows cannot find "c:/program files/.../programm.exe." "Make sure you typed the name correctly and then try again", I cannot run programms like Admin, what to do?

    I have a problem at the opening of the software as administrator, whenever I open a programm (programs that require admin privaleges) says "windows cannot find" C:/Program Files/.../program.exe". Make sure you typed the name correctly and then try again. "(THIS HAPPENS FOR EACH PROGRAM) I am the only user, also, I am the administrator, I also have another problem, when I run the control panel and try to change something it will not open the box (I wanted to know if the parameters are wrong), when I click, it is as I have not clicked at all, even in SafeMode im helpless There, I can't even change my account settings and run sys restore, but I can open the program (I scanned it are malwares and viruses, but nothing was found, my computer is clean), pls help me, any advice would be very appricieated. I defragmented, managed antivirus analysis I did everything. I've used software: advanced system care, safety 2012 AVG, Malwarebytes anti-malware trial. Sometimes, when I want to uninstall something safe mode (only there, I can do something) I get the message that im not allowed to uninstall the software.

    Still having the problem? Were you able to run SFC in Mode safe?

    You could try a repair of Windows 7 installation or if not a clean install.

  • "Sorry, your computer has encountered an error and needs to restart. We are only collecting the error information, and then we'll restart for you. "windows 8

    Hi so I recently bought a new computer and out of no where he worked in some really annoying errors. This has happened three times, I can't understand a reason yet, AFAIK, it occurs randomly. A few times I start up my computer and it starts just the windows icon, the loading circle is not displayed. If I let it run it will remain still frozen. After a few reboots, he says still 'preparation auto repair' is still frozen. This has happened 3 times.

    The first time I have not jumped into the recovery CD, no problem, used a system restore, it was all good.

    The second time, she actually had a cause, our power went out and my pc was used, then maybe he could have ruined a circuit. So I put the CD, it wouldn't recognize it and if he did, he would freeze just and nothing to do. I tried F8, F12 and F1: he didn't even recognize these keys or react at least based on them.
    After a few restarts I miraculously managed to do recognize the CD and this time I made a cooling system.
    This lead me to think it might be some of my files/programs, but I'm still working on acquiring them all back after the update so I think it is unlikely that. 3rd time: yet once, it happened when I turned it on after a normal closed. It would not recognize the cd or the keys. After maybe 15 attempts, but rather oddly, everything was OK? I also noticed that my Tablet Wacom Intuos 5 is connected it will not start, but if I unplug it, it starts very well. (Driver error?)

    All this is fine and dandy, I can deal with it, but not until recently that error in the title stood. I noticed, that it normally occurs when the computer is in "sleep" or the monitor turns off because it is inactive. If I move the mouse to bring on the monitor, it is just a bright blue solid then the following message: "sorry, your computer has encountered an error and needs to restart. We are only collecting the error information, and then we'll restart for you"appears and it stops. Whenever this happens, it starts up just fine, it is just annoying it encounters this error whenever I use it. I tried to do system recoveries, but it did not help. I can just do a reset or refreshment, but again once I do not want this effort and to lose files if the error is still going to happen. I'm not sure if this is a hardware error, heating, maybe? But I'm not all that experience in these things. As I said, this computer is fairly new, maybe 2 months, then maybe I could just put its warranty policy to use. But if you can think of anyway to help, it would be great thanks!

    My specs are:
    Avatar
    CPU: AMD FX Processor with Six cores (tm)-6100 3.30 GHz
    GPU: Geforce GT 640

    16.0 GB
    operating system 64-bit, x 64 processor
    Windows 8.1

    Hi Kaelie,

    This issue seems to be with the material. As you mentioned that your computer is under warranty. It would be better if you contact the manufacturer of your computer for help on this issue.

    Just reply to us if you are having problems with Windows in the future. We will be happy to help you.

Maybe you are looking for

  • ApplicationManager stopped enexpected

    Hello got this after macOS sierra update, my option are ignored or report. If I choose to ignore, he appears once again? iMac 5 k 2016 Thank you Harald

  • NB200-12N - who to upgrade to 2 GB of RAM?

    Hello I have a NB200-12N and want to upgrade to 2 GB. The manual and the data sheet are conflicting:-On a single page, we read DDR2 800 MHz-an other PC2-4200-and then this bus 667 MHz. All three correspond to different types of RAM. What is the good?

  • Map satellite A100 - 163 ATI x 1400 - 128 or 256 MB?

    It is said in the specifications of its 128 MB more than 128 MB. How to do the extra 128 MB? Is it automatic or is it in the BIOS? Thank you

  • Wallpaper installation Atrix

    I have a desktop wallpaper 1920 x 1080. I changed 1080 x 960 jpg image using the photo shop adobe, copied to the phone via the usb port. On the phone, I click on wallpapers-> Media Gallery (the number of photos in my Gallery count is updated)-> I can

  • Cluster of Boolean controls does not expect update

    Hello I'm confused about the following question: in the joint Test Cluster of Boolean controls Functionality.vi, I have a Boolean controls group, some disabled and grayed out, other permits. If I click on one of two Boolean controls permits, and then