A batch cmdlet applies one operation to a collection of objects in a single PowerShell command. Pipe multiple targets to a cmdlet designed to accept them, rather than handling each target separately. section 15.0 section 15.1
For example, Get-Service BITS,Spooler | Set-Service -StartupType Automatic changes both services. Action cmdlets may produce no visible output; add -PassThru when you want the modified objects displayed for verification. section 15.1
Copy several items and inspect the result
Get-ChildItem .\ | Copy-Item -Destination C:\Drivers -PassThru copies the current directory’s items and displays what Copy-Item accepted. Without -PassThru, the command normally returns to the prompt without showing results. section 15.1
Get-Service BITS,Spooler | Set-Service -startuptype Automatic
Compare a compact multi-service command with other supplied batch-cmdlet examples. section 15.1
