Posts Tagged ‘powershell’

NetApp PowerShell Toolkit, DataONTAP 1.5 released

August 4th, 2011 No comments

NetApp has updated it’s Powershell Toolkit which it calls DataONTAP to version 1.5 (I think PowerONTAP would be a much better name!).

You will need a Netapp NOW account which is available to customers and partners to download the toolkit.

There are 27 new cmdlets taking the total up to a massive 528 cmdlets with nearly all possible API’s now covered.

Read more…

Thinking, Building and Scripting Globally – a London VMUG presentation.

July 14th, 2011 2 comments

I have the privilege today of presenting at the London VMware User Group.

My presentation is split into two parts, first of all looking at why setting standards, creating processes and adding automation is now more important than ever as we work towards building an infrastructure for cloud computing.

I go through how “cloud thinking” is not just about the cloud being used to solve an IT problem but rather the cloud being a busines transformation to increase your business flexibility.

Your ESX(i) host build is the foundation of that cloud.

Then I head into the technical details of how to create a single PowerCLI script to build ESX or ESXi anywhere in your organisation. Using PowerCLI removes the dependency on any Service Console scripting so you can move towards an ESXi only infrastructure as that is the only hypervisor option for vSphere 5.

Having a single global script allows you to set standards and gives you way to reduce complexity & errors.

Read more…

Want to see HP Flex-10 and ESX(i) at VMWorld? Vote for session 3005!

May 10th, 2011 4 comments

VMworld 2011 is coming up and one of the great things about the conference is independent community members can also offer to present on any topic of interest.

I’ve put forward a presentation proposal Designing and Building a Simple and Scalable Virtual Infrastructure with HP Flex-10 and ESX(i) which is the ONLY HP Flex-10 related presentation proposal.

As there are many more presentation proposals than available slots, the options are put to a public vote so YOU get to decide what you want to see at VMWorld.

If HP Flex-10 and ESX(i) is of interest to you, please vote for my session. You will need a VMworld logon and click on the thumbs up icon against any sessions that interest you, hopefully mine!

Title: Designing and Building a Simple and Scalable Virtual Infrastructure with HP Flex-10 and ESX(i)

Technical Level: Technical

Abstract: No one is downsizing their virtual infrastructure. Your virtual hosting environment is the one place in your IT department where you are not looking at making anything smaller. The benefits of virtualisation in managing costs by making better use of resources, improving availability by increased uptime and simplifying and standardising on your IT processes means you need to virtualise more and more. Using HP blades is a great foundation to build and expand your virtual infrastructure enabling you to create your own private or public cloud. HP Flex-10 delivers 10GbE to each blade and using VMware’s advanced converged networking capabilities allows you to provide IP Storage, VM Traffic, vMotion and FT to your infrastructure in a simple yet scalable way. Understanding and designing your infrastructure for HP Flex-10 can seem daunting, frustrating and confusing with too many options along with ever changing firmware and Nic driver version requirements. “Designing and building a simple and scalable virtual infrastructure with HP Flex-10 and ESX(i)” will show you how to configure your blade environment, what firmware versions you require and how to build your ESX(i) hosts with PowerCLI to take advantage of 10GbE converged networking.

Installing HP Agents on ESX with PowerCLI and Putty/Plink

March 7th, 2011 2 comments

Anyone who needs to build multiple ESX(i) hosts naturally looks to scripting to automate the process. Scripting allows for faster deployment once you have developed the script but equally important reduces human error. It’s far to easy to mistype a port group name, vlan number or IP address. Scripting removes this element of humen error and allows you to build ESX(i) hosts preditably and quickly.

Unfortunately there are just some things that PowerCLI cannot natively automate such as installing HP agents on ESX as this requires console / SSH access to the ESX host and running the install “locally”.

Hopefully hardware vendors will see the benefits of integration with VMware Update Manager and allow hardware monitoring agents to be installed and updated with Update Manager but until then we have to make another plan.

It is always painful to have developed a fantastic PowerCLI script to automate your build and at the end still have to manually SSH into your ESX host to install a hardware agent.

Read more…

Scripting Flex-10 ESX design with PowerCLI

February 18th, 2011 No comments

My Flex-10 ESX design with simplicity and scalability posts detail the configuration steps required to deploy ESX with Flex-10. There’s a lot of clicking around in the vSphere client that can be automated with PowerCLI.

The steps below will set up the ESX networking component as described in the design posts so can be incorporated into the rest of your PowerCLI build process.

Read more…

NetApp DataONTAP 1.3 released

February 8th, 2011 No comments

NetApp’s Powershell Toolkit has been updated to 1.3.

Highlights are:

  • Create a PSDrive and access the ONTAP file system as if it was a local disk
  • Using a Credential Cache
  • Being able to invoke SSH directly from within DataOntap so you can run any CLI command as the API doesn’t cover everything
  • More -WhatIf parameter usage

You can get more information from Making The Most Of Data ONTAP PowerShell Toolkit 1.3

Microsoft has created a fantastic administration environment with Powershell, the more companies that create PowerShell modules the better so good work NetApp, looking forward to some more!

Categories: NetApp, Powershell Tags: ,

Getting Nic firmware versions with PowerCLI

January 27th, 2011 3 comments

Sometimes you need to delve into the innards of ESX to get information out that just isn’t available through the VMware SDK and so not directly available to PowerCLI.

If you’ve been doing any work recently with HP Flex-10 and its firmware requirements, you may need to find out the network card firmware version which is only available from within the ESX console by typing ethtool -i vmnic0

So, PowerCLI to the rescue, but actually using PowerCLI to call Plink.exe which is Putty’s command-line connection tool. You can use this same process to pull anything that you can get from the ESX console as long as you can parse the results of the command and find the information you need.

Read more…

Updating Broadcom bnx2x Nic Drivers with PowerCLI

November 15th, 2010 3 comments

Now that a new bnx2x driver has been released as detailed in my previous post you will obviously need to deploy it and add it as part of your hopefully scripted build.

I wish VMware Update Manager would be able to apply these driver updates so we can have a single depoyment mechanism but this doesn’t seem to be the case yet.  We live in hope!

So, without Update Manager, I always prefer PowerCLI rather than esxupdate for these kinds of deployments as it fits nicely into a PowerCLI scripted build, you don’t have to have SSH access to install and you can also roll it out easily to multiple ESX hosts.

Read more…

Output Powershell console to a file using Transcript

September 22nd, 2010 1 comment

Sometimes it’s the simple things that really make a difference.

Often when writing any script you have to decide whether to output stuff to the screen or to a file.

What if you need to do both?

Normally you create additional scripting lines or a function to output the response from a cmdlet to a log file which you can review later.

Well I stumbled by accident across a very simple way to avoid this…just use the cmdlets Start-Transcript and Stop-Transcript which will output anything written to the screen into a text file.

$TranscriptFile = "c:\myoutput.log"
Start-Transcript -Path $TranscriptFile

Write-Host "I'm Transcripting!"

Connect-VIServer myvcserver


Invoke-Item $TranscriptFile
Categories: Powershell Tags: ,

Snapshot information from PowerCLI

September 6th, 2010 1 comment

Here are some PowerCLI single line scripts for getting different snapshot information:

Display VM Name and Snapshot Name

Get-VM | Get-Snapshot | select @{name="VM Name"; Expression={$}},name

Display VM Name, PowerState, Host and Snapshot Name

Get-VM | Get-Snapshot | select @{name="VM Name"; Expression={$}},@{name="Power State"; Expression={$_.vm.Powerstate}},@{name="Host"; Expression={$_.vm.Host}},name

Display VM Name and Number of Snapshots

Get-VM | Where{(Get-SnapShot -VM $_ | Measure-Object).Count -gt 0} | Format-Table Name, @{Label="NumSnapshots";Expression={(Get-Snapshot -VM $_ | Measure-Object).Count}}

All snapshots older than a particular date, say 30 days?

Get-VM | Get-Snapshot | Where { $_.Created -lt (Get-Date).AddDays(-0)} | select @{name="VM Name"; Expression={$}},@{name="Power State"; Expression={$_.vm.Powerstate}},name, Created