Although I spend quite some time in the Powershell Command Line Interface, the main tool for managing the Virtual Infrastructure remains the VI Client. So wouldn’t it be great if we could somehow show the results of our Powershell VI Toolkit scripts inside the VI Client?
Well, we [...]
Using VMware seriously requires a lot of (shared) storage. This kind of storage (on a SAN for instance) is quite expensive. So you might want to check if you are wasting a lot of this space. When you look at the storage in VMware, it consists of multiple abstraction layers. A [...]
UPDATE: Fixed the script to also recurse through arrays. It only gets the first item in the array. That’s for a good reason. Else you’ll get millions of items!
Wow! This was quite a challenge. But I did it!
Inspired by my scripts Create a Directory Tree with Powershell and Listing AD [...]
If you have been trying out the VMware VI Toolkit for Windows Powershell, you have probably noticed. You have to disconnect (disconnect-viserver) each session you set up to the VI Server (connect-viserver), or it will linger for eternity (or until the next reboot at least). That’s why I always [...]
I was playing around with PSDrives when I decided to write this script. It recurses through (part of) a PSDrive and shows the items it finds in a simple tree view.
The fun part is that it works on any PSDrive!
Show-Tree D:\scripts will show subdirectories and files in a tree; Show-Tree HKCU:\ will [...]
Of all the vSwitch properties, the Offload Policy settings are the most obscure. You can’t even view them through the GUI. You can see them in the /etc/vmware/esx.conf file, or using the Powershell VI Toolkit, if you know how to use this command:
((Get-VMHostNetwork ESXSERVER | Get-View).NetworkConfig.vSwitch | Where [...]
It’s about time I follow up on the post Getting Video Hardware Acceleration Level.
I have created a simple, fire-and-forget script that sets the Hardware Video Acceleration Level for all your (Windows Server 2003 and Powered On) VM’s to Full. This way you can always enjoy smooth mouse movements when working in the console!
It’s a bit tricky to find, but the API reference showed me where to look. And now I’m posting it here, so you don’t have to search any further.
First, connect to the Option Manager:
$SI = Get-View $ServiceInstance
$OM = Get-View $SI.Content.Setting
Query current values of advanced options:
$OM.QueryOptions(‘ADV_OPTION_NAME’)
To change [...]
I’ve got a great new script for you today!
We all love VMware for consolidating our servers. And we all know that virtualization requires lot’s of SAN space. But how do you keep track of the amount of space left on all your datastores? It’s pretty easy to create a report using the [...]
Today’s oneliner is a nifty little function that reports the average CPU and Memory usage for one or more of your VMs, calculated over the last x hours:
function Get-VMStat
{
param( $VM,[Int32]$Hours = 1 )
$VM | Sort Name |
Select Name, @{N=”CPU”;E={[Math]::Round((($_ |
Get-Stat -Stat cpu.usage.average -Start (Get-Date).AddHours(-$Hours) [...]
Tags
Active Directory API bind order cleanup cluster CPU Custom Fields datastores description device management directory tree errors Event Log file name filter Fun function HA IT known issues License Server LUN multipath NIC objects Oneliner portgroups PowerCLI PowerShell profile recursive Registry Scripts security session share snapshots SQL Stat VI Toolkit VMware vSphere WMI WSUS ZenArchives
- July 2012
- July 2011
- February 2011
- January 2011
- December 2010
- May 2010
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
