Post

PowerShell 101 - Introduction to Scripting & Automation!

This is an Introduction video to a video series on Scripting and Automation using PowerShell in Hindi



WHY POWERSHELL?

  1. Comes preinstalled with Windows OS
  2. Platform independent (Windows/Linux/Mac)
  3. Learn Programming easily
  4. Automate repetitive work
  5. Look cool within team
  6. Manage Office 365
  7. Backup Automation
  8. Manage Active Directory

FEW AUTOMATION IDEAS

  1. Excel sheets management
  2. Files & folders management
  3. Databases management
  4. Emails management
  5. Browsers & API requests
  6. Files download
  7. VMware management
  8. Manage Azure/GCP/AWS cloud platforms
  9. Manage Windows/Linux/Mac OS
  10. Schedule tasks

WHAT IS POWERSHELL?

PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-source and cross-platform on August 18, 2016, with the introduction of PowerShell Core. The former is built on the.NET Framework, the latter on.NET.

APPLICATIONS OF SCRIPTING LANGUAGES

  • To automate certain tasks in a program
  • Extracting information from a data set
  • Less code intensive as compared to traditional programming languages

APPLICATIONS OF PROGRAMMING LANGUAGES

  • They typically run inside a parent program like scripts
  • More compatible while integrating code with mathematical models
  • Languages like JAVA can be compiled and then used on any platform

HOW TO OPEN POWERSHELL?

  1. Click on Windows icon and search for PowerShell
  2. Click on Windows PowerShell in search results.

TIPS

  • You can use Ctrl + Scroll Up to increase text size. Ctrl + Scroll Down to decrease text size.
  • You can use cls command to clear the screen. You can also use shortcut Ctrl + L for this.
  • You can use exit command to exit from the terminal.
  • You can download Windows Terminal from Microsoft Store for more features like color themes, etc.

HOW TO START/STOP PROCESS/PROGRAM USING POWERSHELL?

  • You can use command start <process-name> to start a program. E.g. start notepad, start explorer, start calc, etc.
  • To stop the program, you can simply type any of
    • stop -name <program-name>
    • stop <process-id>
    • kill -name <program-name>
    • kill <process-id>
  • To search existing running program, you can type ps | ? Name -Like '*<keyword>*'. E.g.
    • ps | ? Name -Like '*cal*'
    • ps | ? Name -Like '*note*'
This post is licensed under CC BY 4.0 by the author.