You are on page 1of 3

10 commands of power shell.

Certainly! Here are ten more common PowerShell commands:

Get-Module:
This command displays a list of modules that are available on your
system. PowerShell modules contain reusable cmdlets, functions, and
scripts.

New-Object:
Create a new instance of a .NET Framework or COM object, which can
be useful for various tasks, such as interacting with external libraries.

Select-Object (or select or %):


This cmdlet is used for filtering and selecting specific properties of
objects, allowing you to display only the information you need.

Measure-Object:
Use this cmdlet to calculate statistics on a set of objects, such as counting,
averaging, summing, or finding the minimum and maximum values.

Test-Path:
Determine whether a file or directory exists at a specified location. This
command is helpful for conditional logic in scripts.

Write-Output (or simply echo):


Display output to the console or redirect it to a file. This cmdlet is useful
for debugging and script output.

Get-EventLog:
Retrieve entries from the Windows event logs, which can be helpful for
monitoring and troubleshooting system events.
Add-Content:
Append content to an existing file, which can be useful for logging or
updating configuration files.

ForEach-Object (or foreach):


Iterate over a collection of objects and apply a script block to each item,
allowing you to perform actions on each object.

Export-Csv:
Convert objects into CSV (Comma-Separated Values) format, making it
easy to export data for reporting or analysis.

These additional PowerShell commands expand your scripting and


automation capabilities, allowing you to perform a wide range of tasks in
a Windows environment.

You might also like