Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
YouTube Security VideosNutanix advances legacy and AI app management with AMD(01.10.2026 um 16:00 Uhr)
•
YouTube Security VideosPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••••
Videos & KonferenzenPC-WELT: 32 TB SSD-Speicher in der HMX 6!(01.10.2026 um 16:15 Uhr)
••
Sicherheitslücken (CVE)USN-8857-1: KCoreAddons vulnerability(01.10.2026 um 12:48 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

Powerful Piping in PowerShell: Chain Commands Together

Powerful Piping in PowerShell: Chain Commands Together The pipe (|) sends output from one command into another. This is what makes PowerShell powerful. How It…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!




Powerful Piping in PowerShell: Chain Commands Together



The pipe (|) sends output from one command into another. This is what makes PowerShell powerful.






How It Works



The pipe (|) is a connector. Output from the left command becomes input to the right command. Instead of doing 3 separate steps, one pipeline does it all in one powerful line.



Think of it like an assembly line: each command does one job, then passes results to the next command.






Code Examples






Basic Pipeline






# Get files, send them to Sort-Object
Get-ChildItem | Sort-Object LastWriteTime

# Without piping, you'd need to:
# 1. Run Get-ChildItem
# 2. Look at results manually
# 3. Run Sort-Object with specific files
# With piping: one command does it all!









Chaining Multiple Commands






# Get files → Filter to .txt → Show only name → Sort
Get-ChildItem | Where-Object {$_.Name -like "*.txt"} | Select-Object Name | Sort-Object Name

# Each command passes results to the next:
# 1. Get-ChildItem finds all files
# 2. Where-Object filters to only .txt
# 3. Select-Object shows only Name column
# 4. Sort-Object alphabetizes them









Real-World Cleanup






# Find and delete old .tmp files
Get-ChildItem -Filter "*.tmp" | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | Remove-Item -WhatIf

# 1. Find .tmp files
# 2. Filter to older than 30 days
# 3. Delete (with -WhatIf to preview first!)









Display Specific Data






# Show top 5 processes by memory usage
Get-Process | Sort-Object Memory -Descending | Select-Object Name, Memory | Select-Object -First 5

# 1. Get all processes
# 2. Sort by memory (biggest first)
# 3. Show only name and memory
# 4. Limit to first 5









Most Used Options





  • | - Pipe - sends output to next command


  • Where-Object - Filter results by condition


  • Sort-Object - Order results alphabetically or numerically


  • Select-Object - Choose which properties to display






The Trick: Power Usage



Build pipelines step by step:




# Start simple
Get-ChildItem

# Add sorting
Get-ChildItem | Sort-Object LastWriteTime -Descending

# Add filtering
Get-ChildItem | Where-Object {$_.Length -gt 1MB} | Sort-Object LastWriteTime -Descending

# Add cleanup (show only columns we care about)
Get-ChildItem | Where-Object {$_.Length -gt 1MB} | Sort-Object LastWriteTime -Descending | Select-Object Name, Length

# Build complexity gradually - easier to debug!






Remember: Each | passes the entire result set to the next command. This is incredibly powerful!






Learn It Through Practice



Stop reading and start practicing right now:



👉 Practice on your browser



The interactive environment lets you type these commands and see real results immediately.






Next in PowerShell for Beginners



This is part of the PowerShell for Beginners series:





  1. Getting Started - Your first commands


  2. Command Discovery - Find what exists


  3. Getting Help - Understand commands


  4. Working with Files - Copy, move, delete


  5. Filtering Data - Where-Object and Select-Object


  6. Pipelines - Chain commands together










Summary



You now understand:




  • How this command works

  • The most common ways to use it

  • One powerful trick to level up

  • Where to practice hands-on



Practice these examples until they feel natural. Then tackle the next command in the series.






Ready to practice? Head to the interactive environment and try these commands yourself. That's how it sticks!



What PowerShell commands confuse you? Drop it in the comments!

🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

Bedrohungsgraph · ATT&CK-Mapping · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
4 Knoten · 3 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
MITRE ATT&CK Matrix Navigator
Enterprise-Matrix · nur belegte Techniken
14 Taktiken
1 belegte Technik
T1059TA0002 · Execution
Command and Scripting Interpreter
Mitigation: M1038 Execution Prevention & Script Block Logging
Quelle: Kontext-Klassifikation des Artikeltextes
Reconnaissance
Resource Development
Initial Access
Execution
Persistence
Privilege Escalation
Defense Evasion
Credential Access
Discovery
Lateral Movement
Collection
Command and Control
Exfiltration
Impact
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Powerful Piping in PowerShell: Chain Commands Together

Thematisch verwandte Begriffe: Powerful, Piping, PowerShell, Chain · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag