Skip to main content

Windows Powershell Commands for Beginners




Agenda
  • Introduction of Powershell
  • Need of powershell
  • BackGround of Powershell
  • Tools
  • Why its better than alternatives ?
  • Top Most Administrative Powershell Commands
  • Working with Pipeline
  • Selecting, Sorting, Measuring, Exporting, Importing, Converting,     Filtering, Passing Data in Pipeline.
  • Using PSProviders and PSDrives
  • Formatting Output
  • Introduction of WMI (Windows Management Instrumentation)
  • Condition
  • Looping (For/ Eor-each/While)
  • Take user Input
  • Display Output
 Introduction
  • This Shell is Command line based or can be included to GUI.
  • Developed by Microsoft
  • Based on .Net Framework
  • It includes Scripting.
  • Capability to interact with another Windows based Softwares, for instances:-
  • Citrix, SQL, AD, any open APIs like Slack etc.
Jeffrey SnoverBruce Payette, James Truher (et al.)
First appeared
November 14, 2006
5.1.14393 / August 2, 2016; 8 months ago
6.0.0 Alpha 17 / March 8, 2017; 35 days ago
Windows 7 and later, macOSCentOSUbuntu
•.ps1xml (XML Document)
•.psc1 (Console File)
•.psd1 (Data File)
•.psm1 (Script Module)
•.pssc (Session Configuration File)
•.cdxml (Cmdlet Definition XML Document)
What’s Need ?   
  • Microsoft describes PowerShell as “a task-based command-line shell and scripting language… built on the .NET Framework.”  What is so great about PowerShell?  Why should you use it?
  • PowerShell is both a command-line shell and scripting language
  • PowerShell can interact with a dizzying number of technologies.
  • .NET Framework, the Registry, COM, WMI, ADSI.  Exchange, Sharepoint, Systems Center, Hyper-V, SQL.  VMware vCenter, Cisco UCS, Citrix XenApp and XenDesktop.  REST APIs, XML, CSV, JSON, websites, Excel and other Office applications.  C# and other languages, DLLs and other binaries, including *nix tools.
  • PowerShell is object-based.This gives us incredible flexibility.  Filter, sort, measure, group, compare or take other actions on objects as they pass through the pipeline.  Work with properties and methods rather than raw text.
  • Microsoft is putting its full weight behind PowerShell.PowerShell isn’t going away.  It is a requirement in the Microsoft Common Engineering Criteria, and a Server product cannot be shipped without a PowerShell interface.
  • In many cases, Microsoft is building their GUI with the help of Powershell only. Here we can perform more than what we think on GUI.
  • PowerShell also provides a hosting API with which the PowerShell runtime can be embedded inside other applications.
BackGround   
  • Every released version of Microsoft DOS and Microsoft Windows for personal computers has Shell, so till Windows9x, it was relying on Command.com and later on in NT family it came as cmd.exe
  • In 1998, MS launched Cscript.exe to allow compatible scripting languages like Jscript and VBScript.
  •  By 2002 Microsoft had started to develop a new approach to command line management, including a shell called Monad (also known as Microsoft Shell or MSH) 
  • PowerShell version 1 was released on September 26, 2006 , but officially released on Nov 14, 2006.       
  •   PowerShell v2.0 was completed and released to manufacturing in August 2009, as an integral part of Windows 7 and Windows Server 2008 R2
  • On 18 August 2016, Microsoft announced that they had made PowerShell open-source and cross-platform with support for Windows, OS XCentOS and Ubuntu.
  • The move to open source created a second incarnation of PowerShell called "PowerShell Core", which runs on .NET Core. It is distinct from "Windows PowerShell", which runs on the full .NET Framework. Starting with version 5.1, PowerShell Core is bundled with Windows Server 2016 Nano Server.

Comments

Popular posts from this blog

Automation Testing Python Interview Questions

1.What is Python? What are the benefits of using Python? Answer: Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits of pythons are that it is simple and easy, portable, extensible, build-in data structure and it is an open source. 2.   How Python can be used in software testing?  Answer: 1. To generate test data; parse test results; generate reports; testing API calls etc. 2. Python to extract requirements from a Word document. 3. For testing tasks automation, setting up environments for tests, extracting performance data, etc… 4. Testers use Python extensively in many companies with Selenium for test automation. 5. For writing desktop applications used by testers. 6. Test data manipulation. 7. To build test environment 8. Testing with IronPython on .NET  3.What Python frameworks do you know?  Answer:  Framework called Web2py, PAMIE (Python automation Module for I. E.), The p...

Python Flask Interview Questions and Answers

Q1). What is Flask? Ans1 : Flask is a web micro framework for  Python  based on “Werkzeug, Jinja 2 and good intentions” BSD licensed. Werkzeug and jingja are two of its dependencies. Q2). What is the benefit of using Flask? Ans2:  Flask is part of the micro-framework. Which means it will have little to no dependencies on external libraries. It makes the framework light while there is little dependency to update and less security bugs. Q3). What is the difference between  Django,  Pyramid, and Flask? Ans3:  Flask is a “microframework” primarily build for a small application with simpler requirements. In flask, you have to use external libraries. Flask is ready to use.Pyramid are build for larger applications. It provides flexibility and lets the developer use the right tools for their project. The developer can choose the database, URL structure, templating style and more. Pyramid is heavy configurable. Q4). What is Flask-WTF and what are t...

Python real time Interview Questions and Answers

Q1).What is Python? Ans1:  Python is a high-level, interpreted, interactive and object-oriented scripting language.  Python  is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it h as fewer syntactical constructions than other languages. Q2).Name some of the features of Python. Ans2:  Following are some of the salient features of python − It supports functional and structured programming methods as well as OOP. It can be used as a scripting language or can be compiled to byte-code for building large applications. It provides very high-level dynamic data types and supports dynamic type checking. It supports automatic garbage collection. It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java. Q3).Do you have any personal projects? Really? Ans3: This shows that you are willing to do more than the bare minimum in terms of keeping your skillset up to date. If you work on per...