Powershell Scripting Features
cmdlets - Perform common system admin tasks. EG managing registry, services, processes, event logs, windows management unstrumentation Task Oriented Consistent design Simple to use Object based Extensible interface
Powershell Scripting
Variables
- Named objects
Creating Variables
- Variable name starts with $ and can contain alphanumeric characters and underscore in their names. Variable name must be valid.
Operators
Arithmetic Assignment Comparison Logical Redirectional Split and Join Type Unary These operators manipulate variables
Arithmetic Operators
\+ - * / % (modulus) Divides left hand operand by right hand operand and returns remainder
Comparison Operators
eq (equals) ne (not equals) gt (greater than) ge (greater than or equal to) lt (less than) le (less than or equal to)
Assignment Operators
=
+=
-=
Logical Operators
AND
OR
NOT