liveBook · Manning

Type name

As explained in Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

A typename is the unique name identifying an object's type.

A type name is the unique name assigned to an object type. In PowerShell, Get-Member displays it as the first line of its output, helping you identify what is flowing through the pipeline. section 8.3 section 8.8

Inspect a process type

Run Get-Process | gm and look for the first output line: TypeName: System.Diagnostics.Process. The complete type name can guide searches for documentation about methods such as Kill and Start. section 15.5.3 section 8.3

TypeName: System.Diagnostics.Process
Name                       MemberType     Definition
----                       ----------     ----------
BeginErrorReadLine         Method         void BeginErrorReadLine()
BeginOutputReadLine        Method         void BeginOutputReadLine()
CancelErrorRead            Method         void CancelErrorRead()
CancelOutputRead           Method         void CancelOutputRead()
Close                      Method         void Close()
CloseMainWindow            Method         bool CloseMainWindow()
Dispose                    Method         void Dispose(), void IDisposable.Dispose()
Equals                     Method         bool Equals(System.Object obj)
GetHashCode                Method         int GetHashCode()
GetLifetimeService         Method         System.Object GetLifetimeService()
GetType                    Method         type GetType()
InitializeLifetimeService  Method         System.Object InitializeLifetimeService()
Kill                       Method         void Kill(), void Kill(bool entireProcessTree)
Refresh                    Method         void Refresh()
Start                      Method         bool Start()
ToString                   Method         string ToString()
WaitForExit                Method         void WaitForExit(), bool WaitForExit(int milliseconds)
WaitForInputIdle           Method         bool WaitForInputIdle(), bool 
 WaitForInputIdle(int milliseconds)

Use the member listing to connect a type name with the methods and other members available on that object. section 15.5.3

How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it

How deep it goes
Defines unique type names and demonstrates their display, but stops short of explaining type internals.
Examples
Uses Get-Process | gm and the System.Diagnostics.Process listing to show a type name alongside members.
What it assumes
Assumes familiarity with PowerShell objects, pipelines, and Get-Member commands.
What you can do after
Evaluate pipeline objects and locate documentation by searching their complete type names.
How it connects
Links objects and pipelines with Get-Member, properties, methods, and member definitions.

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS. The section links point to the parts of the book it draws on.