Create array of IP addresses that do not respond to ping

I am an intermediate Powershell user, but having a little trouble wrapping my head around how to do it.

I have a powerCLI script that creates a number of virtual machines based on a variable, and I need to take it to the next level of intelligence:

# Global Variables

$vCenterServer = "vCenter.domain.com".

$serverCluster = "cluster 02."

$primaryDNS = "10.11.10.11".

$secondaryDNS = "10.11.10.12".

# Environment variables

$jumpstartPool = get-resourcePool-name common - location $serverCluster

$jumpstartCustomization = "newAutoSpec".

$jumpstartCurrentTemplate = "template".

$jumpstartDatastore = "data store".

$jumpstartFolder = 'test '.

$jumpstartPrefix = 'server '.

$jumpstartSubnetMask = "255.255.255.0".

$jumpstartGateway = "10.11.150.1".

$jumpstartRange = "10.11.150".

# The Variables de Configuration automation

$vmCount = '2 '.

$ipArray = "need some help here.

# Startup script

# Connect to the server vCenter Server with local credentials

to connect-viServer-Server $vCenterServer

# Define technical mapping of NIC customization

Get-OSCustomizationSpec-name $jumsptartCustomization | Get-OSCustomizationNicMapping | Game-OSCustomizationNicMapping - IpMode UseStaticIP - IpAddress [$a] $IParray - $jumpstartSubnetMask - passerelle_par_defaut $jumpstartGateway - $primaryDNS, $secondaryDNS Dns subnet mask

# Create virtual machines

1.. $vmCount | {foreach}

$y = "{020:D3}" f $_

$vmName = $jumpstartPrefix + $y

$esxServer = get-Cluster $serverCluster | Get-VMHost-State connected. Get-Random

write-host "Creation of Machine virtual $vmName initiated"-green foreground

New-VM-name $vmName - model $jumpstartCurrentTemplate - ResourcePool $jumpstartPool - $jumpstartDatastore - $jumpstartFolder location data store - OSCustomizationSpec $jumpstartCustomization - RunAsync

Start-VM - $vmName VM - confirm: $false - RunAsync

}

but the last piece I am trying to understand is the IP address table.  Here's what I want to do with it, see if anyone can help with thoughts on that.

  • Ping (or connect remotely) a range of IP addresses, in this case 10.11.150.10 - 10.11.150.250 and released those who fail a connection to a range of IP.  The goal is to use this to fill in the information of IP address for servers that are being created.

As a little more description here, maybe this contributes to possible scripting, I'm creating servers with the 3 last even as long as the last octet of the IP address.  Thus, the script will run, find IPS that are open (not ping response) and deploy servers model based on IP addresses.  For example, if 10.11.150.55 is crazy, does not, the script will deploy the server of server055 with the IP address of 10.11.150.55.

Thanks in advance for the help

Something like this will provide a table with IP addresses that do not respond.

$array = 1.20 | % {'$192.168.1 _"}

$freeIP = $array | %{

If (!) () Test-Connection - ComputerName $_-count 1 - quiet - ErrorAction SilentlyContinue)) {}

$_

}

}

$freeIP

Tags: VMware

Similar Questions

  • update the apps created from an old email address that is not in use most

    created from an old email address that is not in use most

    I am currently updating the purchased applications that were created when I got an e-mail and password. I have more access to this email address, nor I remember the old password. Any ideas? Thank you. Penny

    Then you will not be able to update this app.

    Either don't update or delete the app and install it with your existing apple ID.  Data may be lost in doing so.

  • How to map an address that is not in the address book

    Is it possible that I can map an address that is not in the address book?

    All the methods that I can find the card application to Invoke either take latitude and longitude, or they take an object of Contacts in the address book.

    I have just an address I'd like to see for me.

    I guess I can use google maps instead, but would rather not.

    Thank you

    You can create a contact with your address object and pass it to BlackBerry Maps.  The contact didn't need to be stored in the address book.

  • The Apple showing in the page settings of ICloud ID does not go and watch my old email address that does not exist as an Apple ID.

    ID showing in the page settings of ICloud Apple won't and watch my old email address that does not exist in the Apple continues to him I identification code is required to sign in this old apple ID, but when I try to reset the password of the site Web of Apple tells me that this 'old' email address is not a piece of identification If that makes sense. I tried to disconnect from ICloud, but always keep asking the password sign to find my Ipad.

    I know my good Apple ID and password and have checked the details on Apple's site that shows the Ipad on the list of devices.

    The Ipad will connect has WiFi and I took it at John Lewis today where I bought it and they think that the problem is being caused by this problem of ID.

    Another that take it to the Apple store, anyone have any suggestions please?

    Welcome to the Apple community.

    If you are unable to remember your password, security issues, do not have access to your address of rescue or are unable to reset your password for any reason, your only option is to contact the Support of Apple ID, to speak to an operator you should explain that your problem is related to your Apple ID This way you can be attributed to the assistance, even if you do not have an AppleCare plan.

    You will need to be patient with the process and to be ready to prove without doubt that the account belongs to you. Do not expect access to be restored immediately and if you are not the owner of the Apple ID saved to the device the account will not be reset.

  • Hotmail account: I can't receive e-mail from addresses that are not already in my contacts list

    I can't receive e-mail from addresses that are not already in my contacts list, for example the library.  My account has been hacked recently, and I have informed Windows CE.  I then installed Avast security.  Since only known e-mail senders spend their emails.  Help, please.

    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    It seems that Avast is blocking messages from anyone not in your contacts list (much too tight fixed).  Disable the function of checking email and see if that solves the problem.  If so, run it without the option of e-mail enabled - it does not really help as long as you take normal precautions (as not to open attachments from people you don't know / trust and things like that).  If you don't know how to disable this feature, contact technical support Avast (I do not use the product so I don't know how, but it's probably under Options or something like that).  If this does not work, try to go to Microsoft Security Essentialshttp://www.softpedia.com/progDownload/Microsoft-Security-Essentials-Download-131683.html where I know that this problem is not happen and see if that solved the problem.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Is there a download from Microsoft which will create a bootable usb media that does not have the drivers?

    Original title: A bootable Windows 7 media

    I work on a Lenovo 2-in-1 with Windows 7 (for games) and 10 (for a normal use) Windows to dual-boot. I created a USB stick with Windows 7 Pro (64 bit) of a legitimate Windows 7 Pro disc. The computer starts on the usb device and plays normally, however, one of the steps asks a driver for cd/dvd and this 2-in-1 (Lenovo Flex 3) doesn't have a built-in CD/DVD. All other drivers are located in a folder system. My question is, given my key Windows 7 can I create a new bootable media that does not demand drivers? Is there a download from Microsoft which will create a bootable usb media that does not have the drivers? I know that I can reinstall the drivers manually after the installation.

    Thank you

    Matt Armshaw

    Windows 7 or Windows 10 come preinstalled?

    If you install Windows 7 on a system that is preinstalled with Windows 10, you must do the following before:

    -Disable the secure boot UEFI

    -Disable the quick start

    -L' install created media can be corrupted.

    How to: Dual Boot Windows 7 or Windows 8 with Windows installed 10 first

    I suggest that you try to create another bootable copy.

  • Can I create a web database search that does not use Javascript?

    Can I create a web database search that does not use Javascript?

    While it would be possible to do it through custom coding, this type of web database search would not supported by Eloqua.

  • address bar does not respond by typing the URL and press on enter

    Address bar does not respond by typing the URL and press to enter. All the other links work well. I used version 7 and version 8 upgrade did not fix the problem

    I had the same problem. I just uninstalled digsby ask toolbar, and now it works.

  • When I place the cursor over a link means that there not respond.for ex when I opened my email yahoo, I can't signout in that.when I hover over signout what it na no respond.but in another browser it answer.

    When I place the cursor over a link means that there not respond.for ex when I opened my email yahoo, I can't signout in that.when I hover over signout what it na no respond.but in another browser it answer.

    This problem may be caused by the Yahoo! toolbar as scopes as well down and covers the top of the browser window, allowing links in this part of the screen not clickable.

    You can keep an eye on this thread:

  • How to end a task that is not responding

    How to eliminate a process that is not responding without restarting the computer

    Hello

    Method 1:
    Press Ctrl + Alt + Del and the Task Manager window appears, in the list, click the process you want to end, and then click the end task button at the bottom.
    Method 2:
    You can also right click on the taskbar at the bottom of the screen and choose Task Manager. Follow the steps as described in method 1.
  • Bit locker encryption unlock Wizard does not, how can I open a partioned encrypted hard disk drive that is not responding?

    Original title: How can I open a partioned encrypted hard disk drive that is not responding?

    I was copying somtin in my partition of my hard drive... then my pc froze... then after I rebooted the system and tried puttin my password to unlock my encrypted partition on the hard drive, it keeps hangin' and saying "bit locker encryption unlock Wizard is not responding..."pls I need help on how to access the partition encrypted without formatting as soon as possible... Thank you

    Hi codjovi,

     

     

    Method 1: If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

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

    Method 2: Follow the steps described in the article below

     

    How to use the BitLocker Repair tool to help recover data from a volume encrypted in Windows Vista or in Windows Server 2008

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

     

     

  • Scam? Send an email to an address that is not connected to my Apple ID

    I was sent an email on Apple Store, allegedly showing that I'm subscribed to Netflix via an iPhone, and I want the company £35.99. I him did not, or have even an iPhone that allows to make this purchase. The e-mail was also sent to an address that I do not have related to one ID with Apple. Is this just a phishing scam? (I've reported as such) or someone has hacked my emails and to set up a fake account to force me to pay? (there is no credit card or payment on this mail details means that he has been paid - this means I have to)

    It's a phishing e-mail (Netflix seems a current/recent favorite for them), if you always give to Apple: [email protected] and then delete him.

    Phishing and similar e-mail: Phishing and other suspicious emails

    The phishing emails: identifying fraudulent "phishing" email - Apple Support

    ITunes real e-mails: identification of legitimate on the iTunes Store - Apple Support emails

  • Cannot delete apps that is not responding

    Hello community,

    There are 2 applications - Google Map & ebay that has stopped responding during the update. Now I'm unable to remove or uninstall. kindly Guide. Thank you

    Try this way. Go to settings > general > use iCloud & storage > storage > storage management. Let the list of applications to load and then tap on one of them. Delete on the next screen.

  • The e-mail addresses that do not work, but I cannot save it as my alias.

    I've added 2 additional e-mail addresses to my hotmail e-mail account, but the mail could not be sent to them. They do not seem to work, but when I tried to add these addresses as an alias, I was told that they were already taken. How can I get them working?  Tell me without all the technical jargon. What happened to them?

    I must say, that Microsoft should be the worst airline I've ever had to deal with. I spent HOURS trying to get the answer to this simple question, and he does not appear in the playlist of responses!

    Hello

    The question you have posted is related to Windows Live, and would be better suited in the Windows Live forum. Please visit the link below to find a community that will provide the support you want. http://windowslivehelp.com/

  • "A computer at 192-168-1-1 has attempted to access one of the ports on your system (PTC port 2869) the source IP is an IP address that is not routable"

    This has happened on an incredible pace.  It worries me due to the fact that I had a procedure of detail with suppliers in Hong Kong.  Access attempts are extreme, as well, noted that it is access to Blackhole.  I need to know if my computer is in danger and if so how to avoid this problem.  Of note is that I use Facebook and you have Hotmail.

    The IP 192.168.1.1 is usually a router. What network equipment do you use? What program are you getting this error? Look at this thread:

    http://www.wilderssecurity.com/showthread.php?t=59493

    Try to disable the PnP features of the router and see if that solves the problem.

    I doubt that this has nothing to do with sellers in Hong Kong but if you want to make sure that your computer is clean, being proactive and scan.

    http://www.elephantboycomputers.com/page2.html#Removing_Malware

    MS - MVP - Elephant Boy computers - don't panic!

Maybe you are looking for

  • Renewal of the guarantee

    I just renewed my warranty for HP Pavilion all in one for 3 years, I received an e-mail telling me it would be actvated for me. But on the HP support assistant, he says I left 3 months of my original warranty?  will this updated to show my new warran

  • Some games in full screen have black bars on the side.

    Some games I play full screen have black bars on the sides of the screen (it does not use the full screen, so it is square) I don't really know how to solve this problem. Can anyone help? (Perhaps because the game is 1024 * 768?)

  • Need to update my AMD Radeon 7770 graphics card to be able to connect to 4 monitors

    Hello I got the desktop HP HPE h91195d for two years now, very satisfied. I need to use this machine with 4 monitors to multi task my job... financial markets having 4 screens of trading. What graphics card would you recommend that would be easy to c

  • E4200 v2 hardware specification

    My company has made media streaming & gateway solutions in telco sector. and we use linksys products to test. But the E4200 v2 performance is worse than expected. So I want to know the details of the hardware. For example, chip supplier & product num

  • Incompatible print cartridge error message

    Below you can find a video on setting a cartridge print Incompatible error message in an Officejet J4680 printer. The steps it will show you how to do the following procedures. 1. Remove and inspect the cartridges 2. how to clean cartridges and what