Introducing Microsoft PowerShell

4/9

Key Concepts: The PowerShell language

Source:  Microsoft

PowerShell is a dynamic, case-insensitive language based on the .NET Framework. It is designed for both immediate interactive use and for scripting. Although developers familiar with C# should find PowerShell a relatively easy transition, it is not an English-like language and the way code is sprinkled with $, vertical bar and hyphen characters can be confusing for newcomers. 

Variables in PowerShell are prefixed with a $ symbol, and there is a clear separation between assignment operators such as = (assign), += (add and assign), -= (subtract and assign, /= (divide and assign); and comparison operators such as -eq (equality), -gt (greater than), and -lt (less than). The -match operator uses regular expressions, and there are also operators for containment, replace, and bitwise operations.

PowerShell cmdlets support short aliases that enable more concise code or quicker typing, but also make code less readable, so use them with caution.

View All Photo Stories

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCIO

SearchSecurity

SearchNetworking

SearchDataCenter

SearchDataManagement

Close