Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.36 KB

Powershell Info.md

File metadata and controls

23 lines (14 loc) · 1.36 KB

Powershell

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language. Concepts below:

Cmdlets:

cmdlets are the basic commands in PowerShell that perform specific actions. They can be executed from the command line, or included in scripts.

Variables: Variables are used to store values in PowerShell. You can create a variable using the "$" symbol followed by the variable name, and then assign a value to it. For example:

Bash

$variable= "value"

Piping: Piping allows you to send the output of one cmdlet as the input to another cmdlet. This allows you to perform complex tasks by chaining together multiple simple cmdlets. The pipe operator "|" is used to pass the output of one cmdlet to another. For example:

Vbnet

Get-Process | Where-Object{ $_.Handles-gt 1000}

Loops: Loops are used to repeat a block of code multiple times. PowerShell supports "for", "while", and "do-while" loops. For example:

Perl

for($i = 0; $i -lt10; $i++) { Write-Output $i }

These are just a few of the many concepts in PowerShell. To learn more, I would recommend exploring the built-in help and documentation, as well as online resources and tutorials. Practice is key to becoming proficient in PowerShell, so try to work on real-world scenarios and tasks to solidify your understanding.