powershell

PowerCLI workshop at London VMUG 24th November

I have been lucky enough to be invited to run a PowerCLI pre-show workshop before the main event of the next London VMUG on 24th November. A couple of VMUG’s back Alan Renouf ran a similar session on how to get started with PowerCLI. I thought this time I would move things one step on so the kind of topics I am likely to cover are reporting scripts and how you can make practical use of them, oneliners to get you great information and take a look at the VESI.

Guest Co-Host Appearance on the PowerScripting Podcast

When I got into PowerShell a couple of years back one of the first resources I discovered was the PowerScripting podcast, at the time just featuring Jonathan Walz (later to be joined by Hal Rottenberg). It was great to find some other people just as enthusiastic about this new technology as I was and also a really good learning tool with loads of resources for getting started. I think I caught up with about the first 20 episodes during a single month and my wife was forever asking me why I was always listening to “those two American guys again….

Active Directory PowerShell Quick Reference Guide

I regularly recommend and often refer to this document my good friend Alan Renouf put together Quick Reference Guide for PowerCLI. It is really handy guide to pin up by your desk when you need to remind yourself of a cmdlet and maybe one of the most common usages for it. I’ve been spending a lot of time recently checking out the PowerShell cmdlets for Active Directory in Windows Server 2008 R2 and they have also AD PowerShell Quick Reference Guide together.

New Simple-Talk.com Article: The Active Directory Recycle Bin in Windows Server 2008 R2

Back in March this year I saw a presentation by James O’Neill and Richard Siddaway about some of the new PowerShell features in Windows Server 2008 R2, in particular Active Directory. I was fascinated by the new ‘Recycle Bin’ feature, which is enabled via PowerShell, and could instantly see that this would be a great and long overdue new feature. I am not alone in this; when Mark Minasi recently appeared on the Run As Radio podcast he said the AD Recycle Bin was the standout feature of the whole Server 2008 R2 release, not just the Active Directory part.

Find the BIOS Version of an ESX Host

A while back I needed to confirm what level of BIOS firmware a bunch of ESX hosts were at. Unfortunately I ran out of time to look properly, but today I discovered how to do it whilst looking through the VMware SDK for something else. Turns out it is very simple: $VMHost = Get-VMHost ‘Server01’ | Get-View $VMHost.Hardware.BiosInfo This will give you results along the lines: BiosVersion ReleaseDate DynamicType DynamicProperty ———– ———– ———– ————— 2.

Average CPU and Memory Use Per ESX Cluster

More stats for my capacity report, this time I want to know on a typical day in the month what is the average CPU and memory use like across my hosts and clusters. Note: this post is not aimed at troubleshooting performance issues, rather at a high level gives me a reasonable idea of the CPU and memory use in each cluster during peak and non-peak hours. By running this each month I can look at possible trends and where extra resource may be required.

How many hosts and VM's in Virtual Center

More stats for my capacity report, this time numbers of VM’s in total in Virtual Center and average per host in each cluster. Obviously performance is not based on the numbers of VM’s per host, but its an interesting figure to keep track of. Connect-VIServer virtualcenter | Out-Null Total number of hosts $TotalVMHosts = Get-VMHost $TotalVMHostsCount = $TotalVMHosts.count Write-Host “There are $TotalVMHostsCount Hosts in $DefaultVIServer” # Total number of guests $TotalVMs = Get-VM $TotalVMsCount = $TotalVMs.

How much SAN storage are my ESX hosts using?

As part of some monthly stats I need to collate, I had to find out how much SAN storage was being used by my ESX hosts. Luckily we have a pretty good naming convention for our datastores so it’s pretty easy to filter out local storage figures. We simply query Virtual Centre for datastores, filter out any local ones, total up their capacity and then convert the figure into Terabytes.

Get-Scripting Podcast Number 12

So we recently published the latest episode of the Get-Scripting podcast and had a lot of fun talking with Carter Shanklin, the product manager over at VMware for PowerCLI - which for the uninitiated is the PowerShell toolkit for managing your ESX environment. Possibly the most interesting output from the interview was the upcoming Project Onyx. By sounds of things it a graphical tool which generates the PowerShell script for the action you just carried out in the VI client - similar to how Exchange 2007 provides the script at the end of most of the GUI wizards.

Simple-Talk Article Published about Twitter and PowerShell

I wrote an article a little while back for Simple-Talk.com about how you can get information out of Twitter using James O’Neill’s PowerShell Twitter functions and the Twitter PowerPack for PowerGUI - they’ve published it now so you can check it out on their site.