Posts

Showing posts from December, 2018

Fundamental of Powershell Scripting

Image
As a developer/programmer, if you have developed expertise in one programming language - learning another is just about understanding the syntax, the rest of the concepts are similar among all languages. So to get started developing automation scripts for Powershell , here are the things you care about: Read input & write output Data Types Operators Conditional Statements Looping Statement Functions  Object oriented scripting Read input & write output Output to console: Lets start with "Hello World!", in powershell there are two ways to output to console: Write-Host Write-Output The second one (Write-Output) is more preferred way to write to console as it does not destroy pipeline inputs.  You can find the code here Input from console: Reading inputs from console is super easy in powershell. Find the code above on my Github Gist here . Data Types Powershell is based on .NET Framework (and Powershell Core on .NET Core)