Author Archives: Alan

About Alan

Alan Renouf has a role of Automation Frameworks Product Manager at VMware responsible for providing the architects and operators of the cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter. Alan is a frequent blogger at http://blogs.vmware.com/vipowershell and has a personal blog at https://virtu-al.net. You can follow Alan on twitter as @alanrenouf.

Optimized PowerShell performance with Cisco UCS PowerTool

imageIn the last post I gave a quick overview of one of the many cool features of the Cisco UCS PowerTool PowerShell Module, I showed how they had made it easy for the admin to pick up their toolkit and use it, how navigation over 1000+ cmdlets could be made easier, if you didn’t read it then you can find the post here.

I quickly realized this was not going to be a one blog post affair as there are so many great features in this PowerShell module which impressed me, features I have not seen before in PowerShell (I may be wrong).

How fast is your code ?

One thing I have seen both developers and scripters fight with is the speed at which things can be done, most times when not using PowerShell to just manage the local machine there is an element of accessing an external system.  There are many ways you can access these external systems depending on the company and the way the cmdlets are written.  Its great that PowerShell often has a certain amount of caching, when objects are retrieved from the remote systems or machines they can be altered locally and then sent back to the original destination.

It’s the sending back and retrieving information which can often cause some PowerShell cmdlets to be slow when working on large systems or when working with multiple systems.  Developers of PowerShell Modules and snapins often do a great job of optimizing this to make things faster.

In Cisco UCS PowerTool I saw a method I had not seen before which I thought was both a very system admin friendly and also optimized way of doing this.

The following example code shows how to create a simple boot policy, for the purpose of this post it doesn’t really matter what the code looks like but keep in mind that after the end of each line, and during the line there will be calls to the Cisco UCS API retrieving and setting data, at the end of the below code we may have called the API around 10 times, add this up into a more complex piece of code and then ask it to work on multiple systems and our external calls soon mount up, each external call having an impact on the final speed of the script.

$BootPolicy = Get-UcsOrg -Level root  | Add-UcsBootPolicy -Descr "Test Boot Policy" -EnforceVnicName "no" -Name "Test-BootPol" -RebootOnUpdate "no"
$BootLan = $BootPolicy | Add-UcsLsbootLan -ModifyPresent -Order "2" -Prot "pxe"
$BootLan | Add-UcsLsbootLanImagePath -BootIpPolicyName "" -ISCSIVnicName "" -ImgPolicyName "" -ImgSecPolicyName "" -ProvSrvPolicyName "" -Type "primary" -VnicName "1"
$BootPolicy | Add-UcsLsbootVirtualMedia -Access "read-only" -Order "1"
$BootStorage = $BootPolicy | Add-UcsLsbootStorage -ModifyPresent -Order "3"
$BootSanImage = $BootStorage | Add-UcsLsbootSanImage -Type "primary" -VnicName "0"
$BootSanImage | Add-UcsLsbootSanImagePath -Lun 0 -Type "primary" -Wwn "20:00:00:00:00:00:C0:00"

How Cisco makes this faster

The Cisco UCS PowerTool team have put some thought into this and as well as the performance enhancements built into the cmdlets they have also introduced a couple of cmdlets to allow you to make a single optimized call to the API – this is a fantastic idea as you can basically build up your code in a nice block and then send it all, optimized for the API in one call to the Cisco UCS API.

Lets take a look at our second example of this code:

Start-UcsTransaction
	$BootPolicy = Get-UcsOrg -Level root  | Add-UcsBootPolicy -Descr "Test Boot Policy" -EnforceVnicName "no" -Name "Test-BootPol" -RebootOnUpdate "no"
	$BootLan = $BootPolicy | Add-UcsLsbootLan -ModifyPresent -Order "2" -Prot "pxe"
	$BootLan | Add-UcsLsbootLanImagePath -BootIpPolicyName "" -ISCSIVnicName "" -ImgPolicyName "" -ImgSecPolicyName "" -ProvSrvPolicyName "" -Type "primary" -VnicName "1"
	$BootPolicy | Add-UcsLsbootVirtualMedia -Access "read-only" -Order "1"
	$BootStorage = $BootPolicy | Add-UcsLsbootStorage -ModifyPresent -Order "3"
	$BootSanImage = $BootStorage | Add-UcsLsbootSanImage -Type "primary" -VnicName "0"
	$BootSanImage | Add-UcsLsbootSanImagePath -Lun 0 -Type "primary" -Wwn "20:00:00:00:00:00:C0:00"
Complete-UcsTransaction

I feel the need, the need for speed**

** Anytime you can get a movie reference in a blog post its gotta be worth it Winking smile

As you can see from the above code, we have added a Start-UcsTransaction at the start and a End-UcsTransaction at the end, so what does this do ?

It allows all the code in between these statements to be gathered by the Cisco UCS PowerTool and optimized, then at the end one call is made to the API sending the complete data.

Performance boost or what ?!

I think the benefits of this are clear, more efficient, optimized and less frequent calls to the API can only mean faster code.

I think its great that Microsoft created PowerShell and third parties are continuing to pick it up as it becomes the default scripting language for the datacenter, in my eyes this is one area where a third party company has taken a fresh new look at the way things are performed and made a clear enhancement.  Very cool stuff, and there is more to come in further posts, I haven’t even got to the best feature yet !

Never miss an appointment again with PowerShell

If your anything like me then you spend most of your time in PowerShell and sometimes forget to check your appointments in Outlook, wouldn’t it be great if you could see your Outlook calendar straight in PowerShell ?

After doing a little searching and altering this post, I created a nice function for PowerShell which I called

Get-Outlookappointments

This function by default will show 7 days worth of items in your PowerShell window, you can pass it some parameters, NumDays will show that number of days appointments….

SNAGHTML4a7b217

Or you can specify a star date and end date using the parameters “Start” and “End”.

This makes a great addition to your PowerShell profile so every time you open PowerShell you are reminded of what you have coming up for the next week and you can call the function over and over in your PowerShell session when needed.

Script

Function Get-OutlookAppointments {
	param ( 
			[Int] $NumDays = 7,
			[DateTime] $Start = [DateTime]::Now ,
	      	[DateTime] $End   = [DateTime]::Now.AddDays($NumDays)
	)

	Process {
		$outlook = New-Object -ComObject Outlook.Application

		$session = $outlook.Session
		$session.Logon()

		$apptItems = $session.GetDefaultFolder(9).Items
		$apptItems.Sort("[Start]")
		$apptItems.IncludeRecurrences = $true
		$apptItems = $apptItems

		$restriction = "[End] >= '{0}' AND [Start] <= '{1}'" -f $Start.ToString("g"), $End.ToString("g")

		foreach($appt in $apptItems.Restrict($restriction))
		{
		    If (([DateTime]$Appt.Start -[DateTime]$appt.End).Days -eq "-1") {
				"All Day Event : {0} Organized by {1}" -f $appt.Subject, $appt.Organizer
			}
			Else {
				"{0:ddd hh:mmtt} - {1:hh:mmtt} : {2} Organized by {3}" -f [DateTime]$appt.Start, [DateTime]$appt.End, $appt.Subject, $appt.Organizer
			}
			
		}

		$outlook = $session = $null;
	}
}

Get-OutlookAppointments

Easily Creating PowerShell Quick References

I needed to provide some examples of PowerShell code recently for a quick reference poster and thought this might be useful for others looking for quick code examples.

All the examples you need can be found by using Get-Help with the –Examples parameter.  Did you know that as with everything else in PowerShell these items are returned as nice objects, we can easily pick the items we need to create a some text which can be copied into a quick reference document.  Of course I am assuming the PowerShell module has fully supported and correctly added help code Winking smile

Just replace the module name below and you are away !

The Code

Get-Command -Module VMware.ImageBuilder | Sort Name | Foreach {
	$Examples = Get-Help $_ -Examples
	Write-Host -ForegroundColor Blue $examples.Name

	$examples.examples.Example | Foreach {
		$Remarks = $_.Remarks | Select -ExpandProperty Text
		$Code = $_ | Select -ExpandProperty Code
		Write-Host -ForegroundColor DarkGreen "# $($Remarks)"
		Write-Host $Code
	}
	Write-Host
}

Example output

Add-EsxSoftwareDepot
# Connect to a depot.
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
# Connect to a depot, saving it to a variable.
$depot = Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

Add-EsxSoftwarePackage
# Add a package by name to an image profile:
Add-EsxSoftwarePackage -ImageProfile “My custom profile” -SoftwarePackage net-bnx2
# Add a package of a specific name and version:
Add-EsxSoftwarePackage -ImageProfile “My custom profile” -SoftwarePackage “net-bnx2 1.6.7-0.1OEM1”
# Clone an image profile, then add a package by name, in one line using pipelining:
New-EsxImageProfile -CloneProfile “ESX-5.0-234567-standard” -Name “My custom profile” | \
Add-EsxSoftwarePackage net-bnx2

Compare-EsxImageProfile
# Compares Profile 1 with Profile 2.
Compare-EsxImageProfile “Profile 1” “Profile 2”

Export-EsxImageProfile
# Export an ISO image
Export-EsxImageProfile -ImageProfile “Evan’s Profile” -ExportToIso -FilePath c:\isos\evans-iso.iso
# Clone an image profile, add a software package, then export to offline bundle.
New-EsxImageProfile -CloneProfile “ESXi-5.0.0-234567-standard” -Name “Evan’s Profile”
Add-EsxSoftwarePackage -ImageProfile “Evan’s Profile” -SoftwarePackage cisco-vem-v140
Export-EsxImageProfile -ImageProfile “Evan’s Profile” -ExportToBundle -FilePath c:\isos\base-plus-vem.zip

Get-EsxImageProfile
# Display all image profiles from depots and all image profiles the user created during this PowerCLI session:
Get-EsxImageProfile
# Display all ESX 5.0 profiles:
Get-EsxImageProfile -Name “ESX-5.0*”
# Display all image profiles from vendors other than VMware:
Get-EsxImageProfile | ? {$_.Vendor -ne “VMware”}
# List all the VIB packages from a particular image profile:
(Get-EsxImageProfile -Name “Profile A”).VibList

Get-EsxSoftwareChannel
#

Get-EsxSoftwarePackage
# List all the VIBs from all depots in table form:
Get-EsxSoftwarePackage
# List all the VIBs, sorted by date:
Get-EsxSoftwarePackage | Sort-Object ReleaseDate | Format-Table -Property Name,Version,Vendor
# List all the VIBs from VMware and Cisco released after Jan 1, 2010:
Get-EsxSoftwarePackage -Vendor “VMware”,”Cisco” -ReleasedAfter 1/1/2010
# List all the VIBs from vendors other than VMware
Get-EsxSoftwarePackage | ? {$_.Vendor -ne “VMware”}
# List all the base VIBs for the 5.0.0 release:
Get-EsxSoftwarePackage -Name “esx-base” -Version “5.0.0-*”
# Save the results of a VIB query for later:
$vibs = Get-EsxSoftwarePackage -Name “esx-base” -Version “5.0.0-*”

New-EsxImageProfile
# Clone an image profile, give it a new name, and change the acceptance level. (NOTE: The ‘\’ is used to continue the second line of input; either press ENTER after \ or enter everything on one line without the ‘\’).
New-EsxImageProfile -CloneProfile “ESX-5.0-234567-standard” \
-Name “My custom profile” -AcceptanceLevel CommunitySupported
# Create an image profile from scratch, assigning the result to a variable.  Software packages are specified by name.
$ip = New-EsxImageProfile -NewProfile -Name “Built from scratch!” -Vendor “NotVmware” \
-SoftwarePackage esx-base,esx-tboot,misc-drivers
# Create an image profile from scratch, passing in software packages via pipeline
Get-EsxSoftwarePackage -Name esx-base,esx-tboot,misc-drivers |  \
New-EsxImageProfile -NewProfile -Name “Built from scratch!” -Vendor “NotVmware”

Remove-EsxSoftwareDepot
# Connect to a depot, then disconnect from it by URL.
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
[… do something …]
Remove-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
# Connect to a depot, saving it to a variable, then disconnect from it later.  Also an example of pipeline input.
$depot = Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
[… do something …]
$depot | Remove-EsxSoftwareDepot
# Disconnect from all software depots
Remove-EsxSoftwareDepot $DefaultSoftwareDepots

Remove-EsxSoftwarePackage
# Remove package foo from my custom profile:
Remove-EsxSoftwarePackage -ImageProfile “My custom profile” -SoftwarePackage foo

Set-EsxImageProfile
# Modify the VIB list of an existing image profile
Set-EsxImageProfile -ImageProfile “Profile of a Fool” -SoftwarePackage esx-base,scsi-ips,esx-tboot
# Change the acceptance level (maybe so that some VIB with a lower acceptance level can be added) of the third image profile from a list (index starts at 0):
$myprofiles = Get-EsxImageProfile
Set-EsxImageProfile -ImageProfile $myprofiles[2] -AcceptanceLevel PartnerSupported

Getting started with Cisco UCS PowerTool

imageToday I was lucky enough to grab some time with Eric Williams and colleagues over at Cisco, they held a one day training course on their UCS PowerTool which is a PowerShell module for managing UCS Systems, if you haven’t seen the Cisco UCS systems I suggest you get out from under that rock and check them out, they are fantastic implementation of a PowerShell module, currently they are available as a beta under the Cisco Developer network here.

Eric and the PowerTool Developers have done a fantastic job on PowerTool, at the moment they have 1498 cmdlets, I wont list them all here as that would be a post unto itself.  A huge amount of cmdlets and that means a huge amount of coverage, they have around 99.1% coverage.

There were many areas in this module that impressed me, most of all was the fact that only 35 of these cmdlets were written manually, the other cmdlets were generated automatically using the UCS Manager XML API and the schema, and I’m not talking about cmdlets which are just basic cmdlets either, these are fully pipeline enabled cmdlets !

In this post I will just mention one of their features which impressed me but I have a list of more to add so make sure you keep an eye out for further posts on this.

Getting Started

The Module comes with a getting started guide which can be found here, this is well worth a read and is full of examples.  At the time of writing this these are the only examples available as the cmdlets do not yet have help so the normal Get-Help cmdletname –Examples will not work.

How do you navigate 1498 cmdlets ?

One of the first things I wondered when I saw they had so many cmdlets was how do you find the one you need, obviously PowerShell has built in methods for this like using Get-Command with wildcards etc but with 1498 cmdlets this would only get you so far.

I was then shown Get-UCSCmdletMeta, this cmdlet is a fantastic way of finding not only cmdlets but also what cmdlets are used in conjunction with that cmdlet and also other cmdlets which you are likely to need, lets start with an example, say I wanted to get the VLANs I had setup in Cisco UCS, I would use the cmdlet as follows:

SNAGHTML13588856

As you can see it shows the verbs we can use with this and also the Noun so we know instantly what cmdlets are available for use with VLAN’s, it doesn’t end their either, it also gives us a PipelineClassId, these are basically the type of classes which can be piped into this cmdlet, that’s pretty cool.. but wait…

The even cooler thing about this is we can also see the cmdlets which this cmdlet can pipe into, to do this we can add a –tree parameter like so:

SNAGHTML135d6b55

Its great to see people putting thought into how to make things easier for users to use their cmdlets, this is a great way of showing the cmdlets and helping find your way around.

Carolina VMUG–15th May 2012

image

Next week I will be presenting at the Carolina VMUG, im looking forward to this one as I get the chance to view a part of America I have never visited before and also catch up with some friends and people I have never met face to face.

I will be presenting twice at the VMUG, once on PowerCLI for vCloud Director and another time presenting with Josh Atwell, Josh is a such a great and enthusiastic guy who has some fantastic ideas and the humor to make our session a fun time for all. If you have never visited Josh’s blog I suggest you head over to http://www.vtesseract.com/ – Who knows where he gets some of the images for his posts ?!

I will be presenting the following sessions , if you are at the VMUG make sure you attend or at least come by and say Hi!

PowerCLI 201

Presenting with Josh Atwell we will take you through the basics of PowerCLI and then progress to some more advanced topics showing you how to use Community code and make the most of the wealth that is provided by the PowerShell and PowerCLI Community.

This session is sure to be great fun and will include some tips and tricks which any vSphere admin will not want to miss.

vCloud Director PowerCLI

This session will show you the basics and also some advanced parts of PowerCLI 5.0.1 and specifically how to use these to not only report on your cloud infrastructure but also how to create one from scratch, save time and make your life easier as a cloud admin.

This is the perfect addition to Chris Colotti’s session earlier that day (a must attend).

Event Details

Tuesday, May 15, 2012

8:00 a.m. – 5:00 p.m.

Charlotte Convention Center
501 South College Street
Charlotte, NC 28202
Click here for directions.

Make sure you register here before attending.

Agenda

A copy of the full agenda and other sessions taking place can be found here: http://www.vmug.com/d/do/1280

Identifying and fixing VMs Affected By SvMotion / VDS Issue

Duncan Epping recently described an issue with virtual machines (VMs) which have moved via Storage vMotion (SvMotion) and are connected to a vNetwork Distributed Switch (VDS), if you are using a configuration where VMs are connected to a VDS and could potentially move via SvMotion then please make sure you read his article here.

William recently showed how we could check for this issue using Perl, on this post you will see a similar script which uses PowerCLI to look for the issue and also resolve the issue fixing the VMs which could potentially have an issue.

In this script I use the VMware VDS Fling which adds VDS cmdlets to PowerCLI, more information and lots of examples on this fling can be found here.  Please make sure you have it installed before using this script and are using a 32 bit PowerShell or PowerCLI console.

Using the script

To check the VMs we can easily pipe a list of VMs into our function which can be seen below.  This can be all VMs in a Cluster, all VMs on a particular host or any other list of VMs you can think of, for my examples below I have shown all VMs attached to a vCenter

image

As you can see from the above screenshot, all VMs are fine apart from VM12 which currently has the problem described in Duncan’s article,  now to fix the issue.

We can use the same script with a –Fix parameter which allows us to fix the issue, when fixing the issue the script will move each of the VMs network connections to a new port on the same portgroup and then move it back again to its original port.   If no free ports are available the script will expand your portgroup temporarily and then decrease the ports when finished.

image

As you can see from the above screenshot, the issue has now been resolved for this VM by using the function with the –Fix parameter and further running of the script in test mode will show all are now fine.

UPDATE: The script has now been updated to support remediation for VMs connected to both a VMware VDS as well as Cisco N1KV. The solution, thanks to one of our internal engineers was to “move” the VM’s dvport from one to another, all while staying within the existing dvPortgroup which will also force the creation of the .dvsdb port file. Once the dvport move has successfully completed, we will move it back to it’s original dvport that it initially resided on. We no longer have to rely on creating a temporally dvPortgroup and best of all, we can now remediate both VDS and N1KV.

Disclaimer: This script is not officially supported by VMware, please test this in a development environment before using on production systems.

The Script

If (-Not (Get-PSSnapin VMware.VimAutomation.VdsComponent -WarningAction SilentlyContinue) ) {
	Add-PSSnapin VMware.VimAutomation.VdsComponent
}

Function Test-VDSVMIssue {
	Param (
		[parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
        [PSObject[]]$VM,
		[switch]$Fix
	)
	Process {
		Foreach ($VMachine in $VM){
			Foreach ($NA in ($VMachine | Get-NetworkAdapter)) {
				$VMName = $VMachine.Name
				If (($NA.ExtensionData.Backing.GetType()).Name -eq "VirtualEthernetCardDistributedVirtualPortBackingInfo") {
					$PortKey = $NA.ExtensionData.Backing.Port.PortKey
					$vSwitchID = $NA.ExtensionData.Backing.Port.SwitchUUID
					$Datastore = (($VMachine.ExtensionData.Config.Files.VmPathName).split("]")[0]).Replace("[","")
					$filename = "$($datastore):\.dvsData\$vSwitchID\$PortKey"
					if (-not (Get-PSDrive $datastore -ErrorAction SilentlyContinue)) {
						$NewDrive = New-PSDrive -Name $Datastore -Location (Get-Datastore $Datastore) -PSProvider VimDatastore -Root '\'
					}
					$filecheck = Get-ChildItem -Path $filename -ErrorAction SilentlyContinue
					if ($filecheck) {
						Write-Host -ForegroundColor Green "$VMName $($NA.Name) is OK"
					} Else {
						Write-Host -ForegroundColor Red "Problem found with $VMName $($NA.Name)"
						If ($Fix) {
							Write-Host -ForegroundColor Yellow "Fixing issue..."
							$VDSPG = Get-VdsDistributedPortgroup $NA.NetworkName
							$DVPort = $null
							Write-Host -ForegroundColor Yellow "..Finding free port on $($NA.NetworkName)"
							$DVPort = Get-VdsDVPort -DVPortgroup $VDSPG -Active:$false | Select -last 1
							$Move = $True
							if (-not $DVPort) {
								Write-Host -ForegroundColor Yellow "..No free ports found on $($VDSPG.Name), adding an additional port"
								If (($VDSPG.PortBinding -eq "Ephemeral") -or ($VDSPG.PortBinding -eq "Dynamic")) {
									Write "Unable to add a port to $($NA.NetworkName) since dvportgroup is configured as $($VDSPG.PortBinding)"
									Write-Host -ForegroundColor Red "Problem still exists with $VMName please resolve manually"
									$Move = $false
								} Else {
									$CurrentPorts = $VDSPG.NumPorts 
									$NewTotalPorts = $VDSPG.NumPorts + 1
									Set-VdsDistributedPortgroup -NumPorts $NewTotalPorts -DVPortgroup $VDSPG | Out-Null
									$PGAdded = $true
									$DVPort = Get-VdsDVPort -DVPortgroup $VDSPG -Active:$false | Select -last 1
								}
							}
							If ($Move){
								Write-Host -ForegroundColor Yellow "..Moving $($NA.Name) to another free port on $($VDSPG.Name)"
								$NA | Set-NetworkAdapter -PortKey $DVPort.Key -DistributedSwitch $VDSPG.VirtualSwitch -Confirm:$false | Out-Null
								Write-Host -ForegroundColor Yellow "..Moving $($NA.Name) back to port $PortKey"
								$NA | Set-NetworkAdapter -PortKey $PortKey -DistributedSwitch $VDSPG.VirtualSwitch -Confirm:$false | Out-Null
								Write-Host -ForegroundColor Yellow "..Checking changes were completed"
								$filecheck = Get-ChildItem -Path $filename -ErrorAction SilentlyContinue
								if ($filecheck) {
									Write-Host -ForegroundColor Green "$VMName $($NA.Name) is now fixed and OK"
								} Else {
									Write-Host -ForegroundColor Red "Problem still exists with $VMName please resolve manually"
								}
								If ($PGAdded) {
									Write-Host -ForegroundColor Yellow "..Removing the added port on $($VDSPG.Name)"
									Set-VdsDistributedPortgroup -NumPorts $CurrentPorts -DVPortgroup $VDSPG | Out-Null
									$PGAdded = $false
								}
							}
						}
					}	
				} Else {
					Write-Host -ForegroundColor Green "$VMName is not connected to a dvSwitch so this issue is not relevant."
				}
			}
		}
		Get-PSDrive | Where { ($_.Provider -like "*VimDatastore") -and ( $_.Name -notlike "*vmstore*")} | Foreach {
			Remove-PSDrive $_ | Out-Null
		}
	}
}

Silicon Valley VMUG – April 11th

imageMy family and I are relocating ourselves to California, with the start of our new lives there will be a new VMUG, I have to say the London VMUG has set the standards pretty high so I can not wait to see what my new local VMUG will be like.

My new local VMUG will be of course the Silicon Valley VMUG (SVVMUG), and I have to say with the below Agenda its looking pretty darn good so far !

The SVVMUG is on April 11th and details are below, I have of course put myself down to present, this time I will be presenting with a well known VMware Community member, fellow member of VMware Technical Marketing and all round fantastic guy, Mr. William Lam, make sure you check out his blog (I’m sure you do already).

Together we will be presenting a vSphere CLI Overview.

vSphere CLI Overview

In this presentation William and I will give a good overview with where we are in vSphere 5, if your getting your ESXCLI’s mixed up with your PowerCLI’s or if you are bored of doing the same manual tasks each day then make sure you attend our presentation to get a good overview of what is available to help you automate your life!

We will also be sticking around for the rest of the VMUG (and hopefully SVVMUG has a vBeers ?) so make sure you come up and say Hi and have a chat to us. Being a local for only a week at that time I would love to meet as many people as possible !

Register

Wednesday, April 11, 2012

8:00 a.m. – 5:00 p.m.

Santa Clara Marriott
2700 Mission College Blvd.
Santa Clara, CA 95054
Click here for directions.

Make sure you register here before attending.

Agenda

Meeting Agenda
TIME EVENT LOCATION
8:00 – 8:30 am Registration | Breakfast | Mingle with Vendors California Ballroom Foyer
8:30 – 8:45 am VMUG Welcome California Ballroom 4-6
8:45 – 9:45 am Keynote Presentation with Mike Laverick California Ballroom 4-6
9:45 – 10:00 am Break | Mingle with Vendors California Ballroom 4-6/Foyer
10:00 – 10:45 am Breakout Block #1 | Education Sessions  
Dell Incorporated – Accelerate VDI success with Dell EqualLogic unified virtualized storage and VMware View California Ballroom 1-2
Symantec – High availability and business continuity for applications in VMware environments. California Ballroom 3
Veeam Software Corp – Why Legacy Backup Tools Don’t Work in Virtual Environments California Ballroom 7
EMC Corp – Maximizing Performance And Efficiency For Enterprise Applications With EMC and Isilon California Ballroom 8-9
VMware Labs Seattle, Portland, Santa Barbara
10:45 – 11:00 am Break | Mingle with Vendors California Ballroom 4-6/Foyer
11:00 – 11:45 pm Breakout Block #2 | Education Sessions  
VMware – Why Virtualize Business Critical Applications (Oracle, SAP, Exchange, SQL, Java)? California Ballroom 1-2
VMware – Troubleshooting Storage Performance (Is it the Hardware or the Software?) California Ballroom 3
VMware – Redefining the Standard for Operations Management with vCenter Operations California Ballroom 7
VMware – vSphere CLI Overview California Ballroom 8-9
VMware Labs Seattle, Portland, Santa Barbara
11:45 – 12:30 pm Lunch California Ballroom 4-6/Foyer
12:30-1:30 pm VMware Update | Steve Herrod – Senior Vice President of Research & Development California Ballroom 4-6
1:30 – 1:45 pm Break | Mingle with Vendors California Ballroom 4-6/Foyer
1:45 – 2:30 pm Breakout Block #3 | Education Sessions  
Zerto – Disaster Recovery-as-a-Service from The iFish Group Leveraging Zerto Virtual Replication California Ballroom 1-2
Nimble Storage – Stress-Free Data Protection for VMware and VDI California Ballroom 3
Xsigo Systems – Evolution of Data Center Fabrics California Ballroom 7
Hewlett-Packard – Understanding and Optimizing Storage Performance in vSphere California Ballroom 8-9
VMware Labs Seattle, Portland, Santa Barbara
2:30 – 2:45 pm Break | Mingle with Vendors California Ballroom 4-6/Foyer
2:45 – 3:30 pm Breakout Block #4 | Education Sessions  
VMware – Architecting and Building a Secure Virtual Infrastructure and Private Cloud California Ballroom 1-2
VMware – Performance Best Practices for vSphere California Ballroom 3
VMware – Virtualized Performance Monitoring Counters (vPMC) California Ballroom 7
VMware – A Guide to vSphere Distributed Switch (VDS) Deployments California Ballroom 8-9
VMware Labs Seattle, Portland, Santa Barbara
3:30 – 3:45 pm Break | Mingle with Vendors California Ballroom 4-6/Foyer
3:45 – 4:30 pm Breakout Block #5 | Education Sessions  
Cisco – Evolving the Data Center to Private Cloud California Ballroom 1-2
Trend Micro Inc. – Security at Every Stage: Trend Micro, VMware and Your Journey to the Cloud California Ballroom 3
Carrillo Business Technologies – Enterprise Consolidation California Ballroom 7
Coraid- Server Virtualization Demands a New Storage Architecture California Ballroom 8-9
VMware Labs Seattle, Portland, Santa Barbara
4:30 – 5:00 pm Closing California Ballroom 4-6

vCheck Exchange Updated

imagePhil has been doing some fantastic work with the Exchange 2010 version of vCheck, his latest version now even supports Exchange 2007 !

He has also updated most of the plugins with new and exciting data, if you have Exchange and you have not yet tried it make sure you give it a whirl, if you have already been using the previous version make sure you update to this great new version.

Download

To download this version of vCheck you can download the following file which includes the base script and all exchange plugins:

https://virtu-al.net/vcheck-pluginsheaders/vcheck/

For more information on the base vCheck script and its framework including a demo of how to use it visit this page.

Plugins

All Exchange Plugins are accessible via the Exchange plugins page located here.

Example Page

An example of the Exchange 2010 report can be viewed by clicking here.

Update Log

New in Exchange Plugins v2.0:

Exchange 2007 support

Report on drives with <= x% free space

MAPI Latency report where latency is above user specified threshold

Active DB not mounted on preferred server report

Various bug fixes and code cleanups

All the plugins have been renumbered into a more logical order

Plus, a bonus plugin to select (via vCheck.ps1 -config) the report header image

Added plugin “20 Exchange 20xx Largest Mailboxes by Total Size”, like 18 and 19,
but sorted by the sum of mailbox and dumpster sizes

————————————————————————————-

00 1st Plugin – Select Report Header Image
Sets report header image
For example, download the Exchange header from
https://virtu-al.net/featured-scripts/vcheck/vcheck-headers/
and save as vCheck\Headers\Exchange.png, and this will work out of the box
Falls back to vCheck\Header.jpg if specified header can’t be found

10 Exchange 20xx Load Snapin.ps1
Loads Exchange 2007 / Exchange 2010 powershel snapin

11 Exchange 20xx Basic Server Information.ps1
Basic Exchange server info: OS & Service pack, Exchange version, hotfix rollups,
Exchange Edition and Roles

12 Exchange 20xx Drive Details.ps1
Drive details for each of the Exchange servers.  Can be configured to report only
on drives with less than a specified percentage free space

13 Exchange 2010 Database Availability Groups.ps1
Basic info about your DAG groups – Exchange 2010 only

14 Exchange 20xx DB Statistics.ps1
Database statistics – number of mailboxes, sizes, circular logging, and last
backup dates

15 Exchange 2010 DB Status.ps1
Database status info

16 16 Exchange 2010 Active DB not on Preferred Server .ps1
Reports on databases not mounted on their preferred servers

17 Exchange 20xx MAPI Connectivity.ps1
List MAPI connectivity latencies – can be configured to only report on latencies
above a specified level

18 Exchange 20xx PF Statistics.ps1
Public Folder stats

20 Exchange 20xx Largest Mailboxes.ps1
Report on largest mailboxes by Mailbox size

21 Exchange 20xx Largest Dumpster.ps1
Report on largest mailboxes by Dumpster (deleted items) size

22 Exchange 20xx Largest Total Size.ps1
Report on largest mailboxes by Total size (Mailbox + Dumpster)

For each of the above three reports, you can report on the top n mailboxes by size
either across organisation or per DB, and you can also specify a threshold size to
report on.  For obvious reasons, I wouldn’t advise reporting on all mailboxes without
a non-zero threshold

Plugins for Exchange not up to date or installed.ps1
Report on out of date / missing plugins

Report on Plugins.ps1
Report on which plugins were invoked in current run

vCDAudit for vCloud Director

imageSometimes its hard to retrieve a report or data that you want to see in one place from a pre-built GUI, I often see this as a use case with PowerShell, being able to grab the data that you want to see and export it or report on it in a unified and simple way.  With the release of vCheck 6 and the easy to adapt HTML framework I have a very easy way to do just this, with a few simple changes to the plugins we can easily add any product into the reporting framework.

Currently this has been the case for vSphere and Exchange 2010.

A college of mine Tom Stephens who works for VMware Technical Marketing contacted me last week with a request which fits into the vCheck Framework quite nicely.  He was working with a customer who needed to be able to report on their vCD infrastructure, they had a need to be able to audit their vCD infrastructure and return certain data back in a centralized easy to read fashion.  He sent me a few headings of things the customer would like to see, after just a short period of time I was able to send him a working report with what the customer needed (and a little more I think).

This brings me on to what I call “vCDAudit”, unlike the vSphere health check script this is an audit script which retrieves and presents key vCD Data which is otherwise hard to find in a centralized place.

Example Page

An example of the vCDAudit report can be viewed by clicking here.

Download

To download this version of vCheck you can download the following file which includes the base script and all VCDAudit plugins:

https://virtu-al.net/vcheck-pluginsheaders/vcheck/

For more information on the base vCheck script and its framework including a demo of how to use it visit this page.

 

vCheck for Exchange 2010

imageOne of the main areas I redesigned in vCheck 6 was the new plugin concept, In my mind this was a nice HTML output which could be used for more than just vSphere checks, the plugins could potentially be any product which has a PowerShell snap-in or module, and even some which don’t 🙂

Shortly after the release I was contacted by Phil Randal who had done just this, he has taken the vCheck framework and written some Exchange 2010 plugins, this now turns the vCheck report into a Exchange monitoring report too.  Awesome stuff !

Now you can have a daily email with your Exchange 2010 details and issues.

Phil has added 6 initial Exchange 2010 plugins which add some great details, these include:

  • Basic Server Information
  • Database Statistics
  • Database Status
  • Public Folder Statistics
  • Mailboxes larger than x amount of MB
  • Mailboxes with deleted items above x amount of MB

So if you have Exchange 2010 then be sure to download this version of vCheck and give it a go, after all it doesn’t cost you a thing and could save you work in the future. Make sure you thank Phil for his hard work on Twitter, his account is @philrandal

Example Page

An example of the Exchange 2010 report can be viewed by clicking here.

Download

To download this version of vCheck you can download it here which includes the base script and all exchange plugins.

For more information on the base vCheck script and its framework including a demo of how to use it visit this page.

Plugins

All Exchange Plugins are accessible via the Exchange 2010 plugins page located here.