Powershell - Small pipe to file

Not being an expert on Powershell, just needed a quick sample of something that created an output file for testing a MID orchestration job:

# PowerShell pipes output to a file Clear-Host $Location = "" $Output = "C:\Scripts\dll.txt" $Dir = Get-Childitem C:\Windows\System32 -recurse -ea 4 $List = $Dir | Where-Object {$_.extension -eq ".dll"} $List | Format-Table Fullname | Out-File $Output Invoke-Item $Output # List | Format-Table name