How to use -InputObject switch for a command like stop-service?

Hi all,

I am trying to find examples to understand how to use “Stop-Service -InputObject …” and I can’t find anything about it?

Can you please help me?

I found out:

get-service -name BITS | Foreach-object {stop-service -InputObject $_}

makes sense, as -InputObject accepts only <System.ServiceProcess.ServiceController> and “Accept pipeline input? True (ByValue)”