objects

$process = Get-Process | Select-Object -First 1
$process.Name
$process | Get-Member

Get-Member

Get-Member shows properties and methods That is the fastest way to learn what an object can do Use it before reading documentation

Property access

$process.Name

Dot notation on an object No parsing, no column index

Methods

"0x1RIS".ToUpper()

Methods are called with parentheses Properties are read without them That distinction is the same as in most object oriented languages

Type system

PowerShell has an extensible type system You can add properties and methods to types That is useful for custom output and dangerous when it hides behaviour

Next

Control in 05 control

Test this in your lab first

Posted