Pipe Cmdlets

Format-Table

# Long syntax
Get-AzSubscription | Format-Table
Get-AzSubscription | Format-Table -Property Name, Id

# Short syntax
Get-AzSubscription | ft
Get-AzSubscription | ft Name, Id

Format-List

# Long syntax
Get-AzSubscription | Format-List
Get-AzSubscription | Format-List -Property Name, Id

# Short syntax
Get-AzSubscription | fl
Get-AzSubscription | fl Name, Id

Where-Object

# Long syntax
Get-AzSubscription | Where-Object { $_.Id -eq 'xxxx' }

# Short syntax
Get-AzSubscription | ? { $_.Id -eq 'xxxx' }

ConvertTo-Json

Get-AzSubscription | ConvertTo-Json

Out-File

Get-AzSubscription | ConvertTo-Json | Out-File "subscription.json"