Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PowerCLI Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
PowerCLI Cookbook

PowerCLI Cookbook

By : Philip Brandon Sellers
4.8 (4)
close
close
PowerCLI Cookbook

PowerCLI Cookbook

4.8 (4)
By: Philip Brandon Sellers

Overview of this book

If you are a virtualization professional who wants to unleash the power of automation and combat the complexity of sprawling virtual environments, this book is ideal for you. This book will enhance your skills of administering VMware vSphere and vCloud Director with PowerCLI.
Table of Contents (13 chapters)
close
close
12
Index

Basics of formatting output from PowerShell objects


Anything that exists in a PowerShell object can be output as a report, e-mail, or editable file. Formatting the output is a simple task in PowerShell and to some extent you've already been doing some basic formatting in prior recipes. Sometimes, the information you receive in the object is in a long decimal number format, but to make it more readable, you want to truncate the output to just a couple decimal places. You did this in the Manipulating the list of snapshots to get better information recipe in Chapter 5, Creating and Managing Snapshots, with formatting numbers.

In this recipe, you will take a look at the Format-Table, Format-Wide, and Format-List cmdlets. You will dig into the Format-Custom cmdlet and also take a look at the -f format operator that you leveraged in Chapter 5, Creating and Managing Snapshots, for uses beyond formatting numbers.

The truth is that native cmdlets do a great job returning data using default formatting...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY