Description
Course info
Rating
(44)
Level
Intermediate
Updated
Mar 20, 2012
Duration
2h 28m
Description

This course takes a close look at a variety of mechanisms you can leverage to get great looking output from Powershell. The first two modules focus on string formatting and using the ToString() method. The rest of the course looks at using Format-* cmdlets, hash tables, and using format files and Format XML.

About the author
About the author

Thomas is a UK IT Pro, with over 40 year’s experience in the IT field. He’s presently doing writing, consulting and training around some of the key Microsoft technologies including PowerShell, Lync and Windows Server/client.

More from the author
Windows Workflows with PowerShell
Intermediate
2h 31m
Aug 2, 2016
Using WMI and CIM in PowerShell
Intermediate
3h 31m
Jan 15, 2016
Implementing PowerShell Web Access in Server
Intermediate
1h 35m
Aug 11, 2015
More courses by Thomas Lee
Section Introduction Transcripts
Section Introduction Transcripts

Composite Format Strings
So welcome to Module 2, composite format strings. In this module, I'll look at what are composite format strings and look at what composite format string targets. We'll look at using composite string formatting. It's a feature I use all the time in my day-to-day use of PowerShell. I'll mention combining composite format string and format string formatting with the ToString method we saw in the previous module. We'll look at best practice around using composite string formatting and I'll supplement this with some demos and close with a summary. Now, as you already know by seeing this course so far, PowerShell knows how by default the format single values; number 42, a date, a string. PowerShell also knows how to format objects using the ToString method to format an object's property whereas we'll see later in the course using format table format list. Format table we'll discuss in Module 3 and 4 and also format list. We can also use format y to format a single property across multiple columns and we'll discuss that in later modules as well. As we discuss in module 6 PowerShell can also format it into other formats XML, HTML, Comma Separated Value and the like. Now, PowerShell leverages, many of the. net formatting capabilities, and one of the cool ones, is the composite formatting strings.

Other Output Mechanisms
Thomas Lee: Welcome to Module 6 Other Output Mechanisms. In this module, I want to first discuss the alternatives to console output. We've been primarily focusing on console output but there are some alternatives to this and we'll discuss those briefly. We'll look at the out dash star Cmdlets, talk about XML and CliXML. We'll look at CSV files and HTML. We'll talk about interaction with Microsoft Office. We'll finish with best practices, there will be some demos and I'll finish with a summary. Now there are alternatives to console output. Console output is very useful; it's what we've been concentrating on in this course so far and overall it's often all the IT Pro needs, but sometimes other output is appropriate. The alternatives include sending console output to a file, to a printer, to a string or to a grid view and we'll see each of these in a moment, but what about if you want to send output to XML, CSV and HTML? These are all potential uses for Power Shell and data, and of course, you can send data out to Microsoft Office documents to get even higher quality documentation. Now each of these has its own uses and best practices and we'll try and discuss these as we walk through these various topics.