Other object commands in Powershell

Here is the list of Object Commands in Windows Powershell

  1. New-Object : This command creates new object.
  2. Select-Object : This command lets you select specific object from the collection.
  3. Group-Object : This command lets you group objects based on certain condition.
  4. ForEach-Object : This command allows you to iterate through each object in the collection.
  5. Where-Object : This command allows you to pass specific objects through pipe.

Here is an example on “ForEach-Object” command. Here we are calling Kill method on each “firefox” process object.

Get-Process -Name firefox | ForEach-Object -Process {$_.Kill()}

You may also like...