Archive

Archive for the ‘PowerShell’ Category

Variations on a port

January 29th, 2012 No comments

I got an interesting question from one of my co-authors of the PowerCLI Reference book. He was looking for a method to find the port used by a VM when connected to a portgroup on a dvSwitch.

Finding the answer to that question is not too difficult, once you know which property holds the value. But while writing and testing the script, I thought that this question would be a good opportunity to show several ways and methods that you have at your disposal in PowerCLI and PowerShell, to come to a solution.

Here it goes.

Read more…

Get complete vCenter session info

January 17th, 2012 2 comments

There was an interesting thread in the PowerCLI Community today. It raised the question how one could report on the current vCenter sessions, including the IP address or hostname from where the session was started.

Unfortunately the SessionManager doesn’t hold any information from where the session was started.

But there are other ways of finding that information. The UserLoginSessionEvent object has a property, called ipAddress, that has the information we’re after.

Btw if you are only interested in looking for idle sessions, independent from which host they were started, there is a great post, called List and Disconnect vCenter Sessions on the PowerCLI blog.
Read more…

Proxy cmdlet revisited: Connect-VIServer and Disconnect-VIServer

January 16th, 2012 No comments

In PowerCLI 5.0.1 a handy feature that showed the connected vSphere Servers in the title bar of the PowerCLI window was apparently removed.
In a PowerCLI Community thread some users found this a useful feature that they would like to have back.
I’m sure the PowerCLI Team will listen to their users and fix this problem in the coming PowerCLI version.

But while we are waiting for a new PowerCLI build that brings back the title bar text, you can fix this for yourself thanks to the proxy cmdlet feature.

Read more…

Change the root password in hosts and Host Profiles

January 15th, 2012 2 comments

For good security measures you should change the password of your root account on your ESX(i) servers on a regular basis. Instead of logging on to each and everyone of your ESX(I) servers, you can easily automate this process.

But what about the new ESX(i) hosts you will roll out in between root password changes and where you use a Host Profile to configure these new ESX(i) hosts ? Will you need to run a script after the deployment to change the root password ?

Turns out that you can easily update  the root password in your Host Profile with the help of an SDK method.

Read more…

PowerCLI 5.0.1 goes Cloud

January 10th, 2012 8 comments

As a belated Christmas present the new PowerCLI version 5.0.1 is available. This new build brings us the Cloud snapin. The availability of vCD cmdlets was already announced during VMworld 2011 and now the vCD cmdlets make their public appearance.

The first release of the Cloud snapin brings us primarily Get type cmdlets. But there is more, just as the Get-View cmdlet opened up access to the vSphere API, the new Get-CIView cmdlet, and the ExtensionData property, opens up access  to all the vCD APIs.

Read more…

Categories: PowerShell, vCD Tags: ,

Will Invoke-VMScript work ?

January 1st, 2012 5 comments

The Invoke-VMScript cmdlet can be a very useful cmdlet, but sometimes it will fail against one or more of your VMs. And it is not always immediately clear why the Invoke-VMScript cmdlet will not work against that specific VM.
The cmdlet help contains a number of prerequisites, but how do you verify if all the prerequisites are fulfilled?
I decided to create a function that would verify the prerequisites, and that would, if requested, which of the prerequisites was missing.

Read more…

vSphere 5 Top 10 – VMFS5

December 19th, 2011 No comments

Continuing my Dutch VMUG Event 2011 presentation series with a post on the VMFS5 feature. This feature clocked in at position 8 in the Top 10.

With VMFS5 comes a bunch of new features. Just to name a few:

  • 64TB VMFS Volumes in 1 extent
  • 64TB physical RDM
  • Unified block size of 1MB
  • Support for more files (> 100000)

For a complete list of the features that VMFS5 introduces, have a look at Cormac‘s post, called vSphere 5.0 Storage Features Part 1 – VMFS-5.

Read more…

vSphere 5 Top 10 – NetIOC

December 15th, 2011 No comments

Another post from our Dutch VMUG Event 2011 presentation. This time it’s about number 5 in the Top-10, Network I/O Control. This feature allows user-defined network resource pools and end-to-end QoS.

Note that this feature requires distributed Switches (dvSwitch). In fact I could have also written this post in my dvSwitch series with the title dvSwitch scripting – Part 10 – NetIOC.

Read more…

vSphere 5 Top 10 – vMotion

December 15th, 2011 No comments

Another post coming from our Dutch VMUG Event 2011 presentation. On position number 10, we find the vMotion Enhancements that were introduced with vSphere 5.

A single vMotion can now scale over multiple NICs. This feature can use a regular vSwitch or distributed vSwitch.On YouTube there are 2 videos, uploaded by VMwareKB, that show how to configure such a vMotion enabled multi-NIC vSwitch, regular and distributed.

Very useful videos, but as you can imagine, I wanted to automate this. No GUI clicking for me  ;-)

Read more…

vSphere 5 Top 10 – HA

December 13th, 2011 2 comments

The second post originating from our presentation at the Dutch VMUG Event 2011 is about HA. vSphere High Availability appeared in the 2nd place of the vSphere 5 features Top 10. For the HA feature we showed how you could find out the FDM master and slaves in your cluster, and how to find the heartbeat datastore.

Read more…