This script will take a name of a specific datastore, a list of datastores, or if none is specified query vSphere for ALL datastores, and will return an object with some basic information.
(more…)
Category: PowerShell
Microsoft Cluster – Get group ownership information
Ok, there are probably several different ways you can get information about cluster group ownership, and I’ll try to post a “proper” script for doing this some other time. For now I just wanted to share with you the mother of all one-liners:
(more…)
Get-Uptime
This is a script that I use alot. It uses WMI to query a remote computer and return an object showing how long the computer have been running since last reboot.
(more…)
Ping x 3
Often when running WMI queries against a set of computers, the total script execution time can be quite long. Especially if there are computers that are unreachable, as the default WMI timeout is quite long. Therefore it’s always smart to do a ping check first, so that you only run the WMI query against a computer you have verified is reachable.
I’m going to show you three different ways of doing ping check using PowerShell. For this test I’m pinging google.com and I’m only after a true/false response whether the target is reachable or not.
(more…)
PowerShell wget
Ever wanted to download a file from the web using PowerShell? It’s quite easy actually.
(more…)