This recipe is divided into two sections: one-line scripts and multiline scripts. One-line scripts can be entered in the PowerCLI window itself. For multiline scripts, it is a good idea to write the script in the PowerShell ISE, then run it in the PowerCLI window.