Category Archives: PowerShell

Introduction to PowerCLI

Whenever I visit VMUGs or talk about PowerCLI I am constantly surprised by people who have not yet heard of PowerCLI or are unaware of the basics of how it works, let alone the power it has and time it can save people.  I wanted to address this and give people a head start learning PowerCLI.

The below video gives you an idea of what PowerCLI is, how it works and how you can get started. It’s the first of what will hopefully be a series of videos on PowerCLI concepts, please add a comment here for the kind of videos you would like to see.

Remotely Managing VMware vSphere through your mobile device

Remember the VMware Community PowerPack for PowerGUI? With it we were able to manage our VMware environment through a MMC style GUI placed on top of PowerCLI Scripts, this gave us the benefit of custom task based actions with a nice and easy to use interface.

Now Imagine if you could have the same great customized management options for your vSphere environment on a mobile device or tablet device.  Imagine no longer!

Mobile IT

Mobile IT is a new application which is available on a number of different mobile devices and tablets that allows us to import Mobile Packs which are custom written packs that work with your applications and also Power Packs which were previously written for PowerGUI.

So What do I need?

The Server

The first thing you will need to do is setup the server which is going to run Mobile IT, this is where we have two options.  In a corporate environment you will probably want all connections to go straight to your systems and you will want to manage the traffic and every aspect of the environment, in this case you would have the Mobile IT Server in your DMZ and the Mobile IT Agent on your network as per the image below taken from the Mobile IT documentation.

TinyGrab Screen Shot 12-01-2014 17.55.30

The second option (which was perfect for my home lab) is where Dell hosts the gateway server for you, you can then install the Mobile IT Server and Agent on your network (I had them both on the same server) as per the below diagram taken from the Mobile IT documentation.

TinyGrab Screen Shot 12-01-2014 17.55.08

The Install was very easy and I had the system up and running in around 20 minutes, once setup it was easy to import the VMware Community Power Pack and add the same machine as a new instance in the web admin interface.  I also installed PowerCLI on this server which is needed by the Community PowerPack.

TinyGrab Screen Shot 12-01-2014 18.58.46

The Client

Now all you need to do is install the app on your phone or tablet, a client is available in the app store of each of the following devices and is currently free. Once downloaded and you have entered your company name and credentials it will communicate with your Mobile IT server where you can authorize the device for use on your network.

Download

Check out the Mobile IT Site here for downloads and documentation.

See it in action

See it in action with the VMware Power Pack below and remember, this is all based on PowerCLI so you can customize the scripts and allow access to your tasks from any mobile device.

PowerCLI Group Discussion

VMworld PowerCLI Group Discussion–Part 3–Launching and Using

image

Following on from the previous posts in this series, this post will take us through the group discussion held at VMworld this year and expand on the items noted during the session.

This post will focus on what people in the session used PowerCLI for and also the various ways people used to launch the scripts.

Continue reading

PowerCLI Group Discussion

VMworld PowerCLI Group Discussion–Part 2–Resources

ResourcesFollowing Part 1 of these posts where we discussed getting started in PowerCLI I now give you Part 2 of the note taking by Nigel Boulton at VMworld in the PowerCLI Group Discussion.

In this part of the session we discussed what resources were available to people using PowerCLI.

As with the previous post I will expand on the notes taken and give you the complete list below.

If you have more resources make sure you add a comment and share them with others.

Continue reading

NorCal PowerShell User Group–San Francisco

PowerShell user groups are a great way for people to talk about PowerShell with like minded people and share thoughts, tips and tricks and generally discuss their usage..

If you are in the San Francisco area then now is your chance to get involved, in fact if you are anywhere in the world you can join, they will be transmitting it live over Google hangouts.

How can I RSVP and find out more?

The first meeting in San Francisco has been scheduled for Friday Nov 01 at 6:30 PM on the site below so please go there and signup today!

http://www.meetup.com/Northern-California-Powershell-User-Group/events/143718672/

North California PowerShell User Group

Im a big fan of user groups, I have attended many VMware User Groups and also PowerShell User Groups, these are a great way for people to talk about a particular technology and share thoughts, tips and tricks and generally discuss their usage of the particular product.

Recently I was contacted by Eric Courville who told me he was starting a PowerShell User Group for the NorCal area, he will be starting a group in an area that doesn’t currently have one and is looking for support from the community to attend, talk about your experiences, maybe learn some tips and tricks and general chat about PowerShell.  Both the new and the old PowerShell users are invited!

If you are in the Sacramento area and would like to join this event please see below for details:

How can I RSVP and find out more?

The initial meetup has been scheduled for Wed Oct 02 at 7:00 PM on the site below so please go there and signup today!

http://www.meetup.com/Northern-California-Powershell-User-Group/

That’s a bit far for me

Working with Eric we are also thinking of starting one in the bay area if we get enough Interest, if this is something you would attend in or around Palo Alto then please do leave a comment on this blog post to show your interest.

Updating from ESXi 5.1 to ESXi 5.1 Update1 with PowerCLI

Recently I was asked by someone how they could do rolling automated updates from ESXi 5.1 to ESX 5.1 Update 1 in their environment using PowerCLI, obviously there are a number of ways to achieve this and William Lam did a great job of showing these in this blog including a piece of sample PowerCLI code.

I figured I would share the code I used to perform this so that others may gain from this experience…

Continue reading

Disabling Netflow with PowerCLI

Today I was asked if there was a script to disable Netflow on a VDPortgroup, the below was a couple of quick and dirty scripts to first of all list all VDPortgroups and if they have Netflow enabled, the second was to disable Netflow for a VDPortgroup or a number of VDPortgroups.

This may help with a known issue on ESXi 5.1 when Netflow is enabled: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2042370

Continue reading

Free day of PowerShell training

DetailsI am often asked how people can get started with PowerCLI, one of the main places to start is obviously with the underlying PowerShell and how better to learn than from the man who invented it!

Jeffrey Snover and Jason Helmick will be offering a free full day of training which you can attend virtually online, take advantage of this event to learn PowerShell v3 from two awesome guys.

Remember, PowerCLI is a snapin to PowerShell so learning the fundamentals of the language will help you in every aspect of PowerCLI.

Continue reading