Automation in datacenter is a must for any IT-Admin. And scripting is the most important skill they can have. PowerShell is the most important scripting language in today’s virtualised environment. This is a session on basics of PowerShell and PowerCLI which I did for a customer. If you are just starting or plan to start with PowerShell and wondering where to start, then this session is for you.
Scripting started with SHELL (*nix environment) and BATCH (Windows) and has matured over the years. In this current age, the art of scripting has outgrown these two.Now we have Perl, Python or PowerShell to our rescue. Though shell and batch are still widely used, specially Shell Scripts in *nix environment, but for virtualisation you need PowerShell (vSphere, Hyper-V, RHEV, Xen).
Till now PowerShell was limited to Windows environment but recently Microsoft has extended the support for Linux and Mac environment too.
If you have a VMware environment, then apart from other tools, probably PowerCLI is the most helpful and powerful and easy to use tool out there. If you want to automate VMware environment then I strongly recommend you to learn this tool.
How PowerCLI is different from traditional tools?
When we talk about traditional scripting tools, they are text based. Meaning they take Text as input and provide text as output. In contradiction PowerShell is an Object-Oriented scripting language. Meaning it takes an object as input and provides object as an output. This puts PowerShell in an entire league altogether. Actually using this tool, you can build pretty much anything that you want to build.
PowerCLI is based on PowerShell and provides special cmdlets (pronounced as commandlets) applicable to VMware environment. So to learn or master PowerCLI you need to know PowerShell first.
What is covered in this session?
In this session I have covered absolute basics of PowerShell. This is not a cover everything basics. For example, I spoke about variables but did not cover how many types of variable supported in PowerShell (e.g, array or hashtables). I plan to cover those in the next session (Advance PowerCLI).
Hope you like the session and have fun as much as I had giving the session.
I have covered very basic of PowerShell and PowerCLI. This session should get you started. Next week, I am scheduled to give another session on advance topic. I am planning to cover the following points in that session:
- Advance Functions
- Exploring API
- Exploring REST API
I will upload the recording of that session as and when I deliver the session. Till then do let me know your feedback on this session.