Category Archives: PowerShell

PowerCLI Quick Reference Guide

Way back in the days of the “Virtual Infrastructure Toolkit” I released a quick guide for people to keep on their desk or in their pocket, the idea was it would give you enough information about the VITK whilst still being on a single (double sided) page.

Well things have moved on and the days of the VITK are no more, now we have PowerCLI and aren’t we pleased !

So to keep us up to date and so that we still have a quick reference, I have updated the single sheet to include all the new cmdlets and I also threw in a few other resources too.

Please download, print off and fold, keep it with you to help with your day to day usage of  PowerCLI (or is that just me ?!?). Continue reading →

Exploring the PowerCLI cmdlets – Get-NicTeamingPolicy Part 2

In my previous post “Exploring the PowerCLI cmdlets – Get-NicTeamingpolicy” I showed you how to output some great looking information for vSwitches which detailed all the information we may ever need to know, so whilst on the same cmdlet lets look at PortGroups, these have the same type of settings and the same cmdlet also works against a PortGroup object, as before we can display this information with a single one liner… Continue reading →

Exploring the PowerCLI cmdlets – Get-NicTeamingPolicy

One of the new cmdlets from PowerCLU 4.0 Update 1 is Get-NicTeamingPolicy, so what does this do ?

It retrieves the Nic teaming policies of the specified virtual switches and virtual port groups, obviously !

So how can we use this cmdlet ?

Well, as it details the teaming policies of either a virtual switch or a portgroup then we will need to give it a…virtual switch or a portgroup, so how do we do this, lets try a one-liner:

Get-VMHost | Get-VirtualSwitch | Get-NicTeamingPolicy

This will do as it says on the tin, get a list of the hosts, for each of these it will get a list of virtual switches attached to the hosts and then list their nic teaming policies, the output is as so:

Continue reading →

Jump Start Virtualization EcoShell

I have talked about the Virtualisation EcoShell (VESI) enough on this blog for people to know what its all about but how do you get started ?

One option is to join the FREE live meeting tomorrow (1/12/2009) at 17:00 GMT (11:00 am Central Standard Time)  presented by Scott Herold by registering or joining here.  Anyone who has seen Scott present before will know how great the presentation will be and you are bound to pick up some expert tips from the man himself. Continue reading →

vSphere 4.0 Quick Start Guide is here

image

Its here, I’m an author, watch out JK Rowling !

Its been a while coming but the vSphere 4.0 Quick Start Guide is now available to buy on Amazon (US), we are working at getting it on the UK site but I’m just pleased to see it out there and available to buy.

This book is a co-authored publication bought to you from some of the leading names in VMware bloggers and admins, and they also asked me to contribute too 🙂

The book is designed for you to carry around with you, its not a heavy duty full novel but more of a VMware admins help book which can be referred to when you are in the damp dark datacenter at 4am in the morning with no internet connection !

Having said that there is definitely something in there for everyone, whether you are new to VMware or a seasoned Pro.

Throughout the book you will find great tips, real life situations and numerous PowerCLI examples.

If you haven’t yet heard of this book then please read these wonderful comments already left on the Amazon post.

If you have read it then please, leave your comments along with the others.

Buy your copy now ! in fact buy two !

PowerCLI to SQL Databases

One of the things I love about PowerShell is how versatile it is, its a wonderful framework which can slot pieces of a puzzle together to create a masterpiece, Now I know it exists I can see every day uses and needs for PowerShell, it fits into every nuck and cranny.

Take for example my SnapReminder script, the fact that you can pull VMware Information from your vCenter, then run the results by Active Directory and finally push it through an SMTP server to complete the final piece of the puzzle astounds me, the only limit to PowerShell is your imagination.

The other day I was watching Twitter when someone asked how to do a particular task, they wanted to pull information from the VMware Infrastructure and update some existing data in an  SQL database, I watched as multiple answers were given to this person…. do a database synchronisation…..buy this  third party tool…..you cant do that…..extract it as a csv, convert it to xml, import it into here, spin around three times and say alacasam !

My instant answer was of course PowerShell (that seams to be my instant answer for most things of late).  The reply was, can you access SQL with PowerShell then ?  YES

I don’t think I personally have come across anything you couldn’t do in PowerShell given enough time and resources !  Lets talk through this scenario.

Continue reading →

PowerCLI: Bring on the next version

In the previous version of PowerCLI we had 165 great cmdlets to play with and didn’t we have fun, now in the new version (Download Here) we have a whopping…..

image

That’s right, an extra 68 cmdlets (4 of the old cmdlets were renamed from the previous version), bring on the fun !

So as well as the increased performance, what do we now have to play with ? here is a quick summary of the new cmdlets and what they do…. Continue reading →

PowerShell Gotcha – Export-CSV, Out-GridView and others

I came across this one a little while back and was hoping it would be fixed in V2, I haven’t seen anyone else mention it so I thought I would add it to my blog as a warning to other PowerShell freaks like me….

I have changed the example to be more universal so you get the point:

I was creating a list of my servers and how big the disks were, to do this I decided to create a collection of custom PS objects so I could add further details to the object later as below:

Continue reading →

Onyx – Why Learn PowerCLI ?

The PowerCLI Team yesterday published with the Onyx Project a great tool with lots of potential. The blogging community received Carter’s announcement enthousiastically (see my previous post The Onyx has landed).

As a casual PowerCLI user you might think, the product has a strange name but it is the answer to all my scripting and automation needs. Why should I bother learning all these PowerCLI cmdlets while this tools produces working code. But think again !

A word of warning by the Surgeon General, or Alan and Luc in this case 😉

Continue reading →

The Onyx has landed

A couple of months ago Carter Shanklin (Product Manager of Automating the World) teased us all with a wonderful application which creates PowerCLI scripts for you by tracing your actions in the vCenter Client.

The scripts it produces are not PowerCLI perfect but they do produce a raw format of a script which can be used to find the awkward bits of the API that are hidden in the back of the API documentation.  The true power in PowerCLI will still be the manipulation of the cmdlets.

Continue reading →