Using the vSphere CLI commands from PowerCLI
If you installed both VMware vSphere PowerCLI and VMware vSphere CLI on the same computer, you can use the vSphere CLI Perl commands from PowerCLI. Using the VMware vSphere CLI commands, you can perform tasks that you cannot do with PowerCLI natively, such as configuring IPsec on your ESXi host with the
vicfg-ipsec
command.
The Add-vCLIfunction
function creates a function string for each Perl script in the vSphere CLI bin directory. The function strings are executed using the PowerShell Invoke-Expression
cmdlet. This creates a PowerShell function for each vSphere CLI Perl script.
function Add-vCLIfunction { <# .SYNOPSIS Adds the VMware vSphere Command-Line Interface Perl scripts as PowerCLI functions. ...
Get Learning PowerCLI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.