PowerShell Basics
Now that we have an idea about what PowerShell is, let's get into how it is different (being object-oriented) and explore some of its important and frequently used cmdlets.
Objects-oriented
PowerShell is object-oriented. The output of cmdlets is one or more objects, not text like CMD.exe or Bash—even though they are printed on the screen as text, they are actually stored as objects in memory. Objects possess properties and methods which can simply be defined as:
Property: Variable information about the object. A process object, for example, has properties such as Process ID, Process Name, Memory Usage, etc.
Method: A piece of code that performs some action on the object. A process object, for example, has methods such as kill the process, start the process, etc.
For example, when running a cmdlet, such as Get-Process, which shows the running processes on the machine, the output is properties of each of these processes, such as Process Name and Process ID. The output of the command is an array of objects. The objects here are of type "Process" (or "System.Diagnostics.Process" for the complete name).
Each row represents a single Process object: