Other object commands in windows powershell

Here is the list of Object Commands in Windows Powershell
  • New-Object : This command creates new object.
  • Select-Object : This command lets you select specific object from the collection.
  • Group-Object : This command lets you group objects based on certain condition.
  • ForEach-Object : This command allows you to iterate through each object in the collection.
  • 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()}
                    

Web development and Automation testing

solutions delivered!!