PowerCLI vs. PowerShell who is the best script

Source: Internet
Author: User
Tags powergui

Comparing VMware PowerCLI with Microsoft PowerShell seems to be too likely, because the former requires the latter to be installed first, and it is only an additional thing specified by a vendor for the core PowerShell environment.

It is impossible for someone to select a virtualization platform just based on the script function. Therefore, my comparison here is not to set up a malicious competition for two companies. I will tell you what I like and dislike in each solution. I hope I can explain how the two companies can improve their script products. Let's start from Microsoft.

Microsoft PowerShell

About SCVMM, one of my favorite aspects of virtualization management is its built-in observation script window. This is like a script recorder, which gives you the ability to capture and manage behaviors like PowerShell scripts. This is a good example when you are executing a transfer task in SCVMM to transfer a virtual machine to another Hyper-V host. At the end of the wizard, a "View Script" button will appear to display the exact PowerShell command required by a script.


Figure 1

To some extent, this is entirely a gospel from the scvmm r & D method. Initially, SCVMM was managed by PowerShell, and later a graphical management shell was developed around it. Therefore, Windows administrators do not need to understand the PowerShell behind it.

For Microsoft, it is not difficult to reveal PowerShell running in the background. Although this is not conducive to the Administrator using every loop, error check, and log variable to write PowerShell scripts, it is very useful for new users who are new to PowerShell, at least they can overcome the difficult stage of learning how to execute common management tasks through the Basic PowerShell command set.

Currently, Hyper-V does not have an official command set, but James o'neill creates a set and stores it on the Codeplex website. O 'Neill adopts the application interface and compiles the command set based on this. With the release of SCVMM 2012, the number of command sets will increase significantly, and the number of tasks that people can do in SCVMM will also increase significantly.

VMware PowerCLI

VMware has made great strides forward by adding many new features in PowerShell, known as PowerCLI. In the continuous release, the company has significantly increased the number of command sets in the product, with approximately 250 command sets. The previous supplement lacked a command set to control the ESX host iSCSI stack, although the latest version of vSphere4.1 has filled this gap.

However, strange vulnerabilities still exist everywhere. For example, there is no meaningful command set for the VMware distributed virtual network switch. It seems that the company agrees to use its "Host Profiles" function as the main configuration tool for the newly created ESX Host. Customers who purchase Enterprise and SKU have the right to use distributed virtual network switches and Host Profiles.

There will be new deployment methods in future versions, which emphasize that host profiles will be used on PowerCLI when new ESX hosts are deployed. It is worth mentioning that Luc Dekens, A virtualization expert, has developed the DvSwitches management function. In this way, PowerCLI is primarily used in the VMware community to report and check the vSphere environment. Health Check scripts such as virtu-al.com are also very popular.

VMware software development kit is everything. This extremely rich interface allows the visitor to execute almost every desired action, whether on the host or on the vCenter management server. This is a comparison with the only officially supported command set of Microsoft for SCVMM only. There are some commonalities between VMware and Microsoft: They all provide extremely limited PowerShell support for the so-called "free" version of their hypervisor. Both companies are cautious when customers may get a free hypervisor and use command line tools to manage it rather than pay a premium for the management block.

VCenter itself does not directly integrate PowerCLI into the vSphere client. To find a way to "record" management into PowerCLI code, you can view VMware Onyx, which is a free device placed between the vSphere client and vCenter, it outputs the behavior in the form of the original PowerCLI SDK code. It also outputs behaviors in the Java Script format suitable for VMware Orchestrator.

The output of Onyx may be a bit confusing, but please do not be scared. Through a graphical user interface and the PowerCLI code collected after the task is completed, we use a more friendly way to execute management tasks. People should use the front-end of PowerGUI and various PowerPacks that can expand their functions. PowerGUI is effective for a wide range of management tasks, including active directories, but from the perspective of virtualization, prepare PowerPacks for VMware vSphere, Citrix XenServer, Microsoft HyperV, Virtual Disk analysis, HP Virtual Connection, and Quest vWorkspace.


Figure 2

At the same time, VMware is trying to extend PowerCLI support to other technologies, which is what Microsoft is ready to do in the future. There is a PowerCLI as a VMware virtual desktop solution called View, but this implementation solution is very different from the vSphere PowerCLI implementation. It feels like a DOS command line system rather than PowerShell, and it allows pipeline technology and query object attributes and features. So far, although technologies such as site recovery management of virtual machines do not have PowerCLI, they are likely to appear on the radar screen of virtual machines.

For those who do not live in the Windows world, PowerShell and PowerCLI have already caused a huge shock in the system management world. However, Linux-based script writers may feel cold. VMware provides the Perl language, which Microsoft does not, but is just around the corner.

Similar old CLI and remote CLI seem to be dying, just like the "ESX" command line port from VMware to vCLI and the vCLI device. Now they want an intermediate step, and they want VMware customers to depend on the old version of the "service console" environment. Now, it seems that PowerShell and PowerCLI are the locations for system administrators to rest for the foreseeable future.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.