When doing deployments whether they are large or small, you can do them the traditional way; which is building piece by piece from scratch, or you can make your life easier and automate some or all of it. By automating it, you can save time to focus on areas that are more relevant than tedious. It also helps you with standardization, so a build workflow is consistent every time.
One really good tool for this is Powershell. There are many comandlets that help with this and will make your life easier. Here I will talk about powershell comandlets for vSphere and Cisco UCS.
First thing first, install Powershell on a windows machine.
Or follow these steps below:
To install Windows PowerShell 3.0
- Start Cmd.exe
- Run the following DISM commands. These commands install .NET Framework 2.0 and Windows PowerShell 2.0.
dism /online /enable-feature:NetFx2-ServerCore dism /online /enable-feature:MicrosoftWindowsPowerShell dism /online /enable-feature:NetFx2-ServerCore-WOW64
- Install Microsoft .NET Framework 4.0 full installation from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=248450.
- Install Windows Management Framework 3.0 from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290.
Then install PowerCLI from VMware:
First, from the PowerShell prompt enter:
Then, open a command prompt and type the following commands in sequence.
Set-ExecutionPolicy RemoteSigned <Enter>
Download vSphere PowerCLI from the Download page of the VMware Web site and install the vSphere PowerCLI software.
Confirm that PowerCLI is working.
Double-click the PowerCLI icon on the desktop to open a PowerCLI window.
A great resource for PowerCLI gems is the PowerCLI cookbook by Phillip Sellers.
Now there are a plethora of things you can do from here that I will get into on the next blog in the series tomorrow.