top of page
Writer's pictureSumit Raj

LetsDevOps: Introduction to PowerShell

Introduction

In this series we will learn the basic of powershell. It is command line shell and scripting language which is mainly used for the task automation.






What is Powershell

Powershell is command line shell and scripting language. It started out as a framework to automate administrative tasks in Windows. PowerShell has grown into a cross-platform tool that's used for many kinds of tasks.


Why PowerShell

Powershell help to automate task in


  1. Windows Administration

  2. CI/CD pipelines

  3. Managing Azure Resources


Installation


Windows

By Default Powershell installed with windows 8 or later so if you have lower version then follow here --> https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.4


Windows PowerShell ISE --> Powershell with Editor


WIndows PowerShell --> Powershell with Shell only



Other OS

You can follow instruction from -->

Visual Studio Code with Powershell Extenstion

We can run the Powershell using the Visual Studio code after installing the Extension. I highly recommend to used the VS code you dont have already


Download VS code for free -->https://code.visualstudio.com/

Install PowerShell Extension

Open VS CODE --> Extension --> Powershell --> Install



After installation



Run your first Powershell Command


Open PowerShell


write-host "Hello Powershell"


Using VS Code



Commands

With the Powershell we have thousands of the commands installed. That is also called as built in command.


Each command has concept of and we call it as cmdlets.




Locate Commands

Core commads.


  1. Get-Command --> Helps to display all the commads exist in the systems

  2. Get-Help --> Helps to understand more on specific command


Get-Command -Verb Get -Noun File*




Comments


bottom of page