Ping utility function/module for PowerShell

After needing to ping large lists of servers I created a quick function to do exactly that. It will accept pipeline input or you can provide server names via an input parameter. It also has input parameters for buffer size and count as well as creation of a logfile for output. This is a function I probably use on more or less a daily basis. It’s incredibly useful due to it being pipeline enabled.

As per the examples in the comments, you can pipe the content of the textfile in and the function will go away and ping all machines in the list. I also use it to ping all machines on a VMware host quite frequently if the host’s management agents have died. If the -Count parameter is set to 1 then the ping results will come back incredibly quickly. Essentially you can ping 50+ servers in a couple of seconds. Feel free to suggest improvements.

CPU ready times for virtual machines made easy

When measuring virtual machine performance data there is one important metric that is often overlooked; CPU ready time of a virtual machine. The ready time is the amount of time the virtual machine waits for processor time. This means that the virtual machine has data to process but the processing core(s) are yet to be allocated to complete the task. This amounts to milliseconds at a time, but obviously, the more virtual machines you have the worse this figure gets.

The metric returned by vCenter is called the summation. This value is not straight forward to understand and it’s also changed based on the sample interval too, so you never get the same static figure for comparison, or easy comparison at least. A more meaningful way to look at CPU ready data is as a percentage. This allows you to look at a virtual machine and know for x percent of the given sample interval (day, week, month) it was waiting for CPU cycles. VMware give a formula on their website for calculating this, which is great, but it’s far more useful to have it as a handy PowerShell function sat in my modules file. This module will accept pipeline input so it’s really useful for using with Get-VM, amongst other things. Hopefully it will help you as much as it does me.