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

Android Interview Questions and Answers

What is  Android ? It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions. What Is the Google Android SDK? The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes. >>Read more>>

Tableau Interview Questions and Answers

What is Data Visualization? A much advanced, direct, precise and ordered way of viewing large volumes of data is called data visualization. It is the visual representation of data in the form of graphs and charts, especially when you can’t define it textually. You can show trends, patters and correlations through various data visualization software and tools; Tableau is one such data visualization software used by businesses and corporates. What are the differences between Tableau desktop and Tableau Server? While Tableau desktop performs data visualization and workbook creation, Tableau server is used to distribute these interactive workbooks and/or reports to the right audience. Users can edit and update the workbooks and dashboards online or Server but cannot create new ones. However, there are limited editing options when compared to desktop. Tableau Public is again a free tool consisting of Desktop and Server components accessible to anyone. >>Read more>...

Data Science in Python Interview Questions and Answers

Q1). How can you build a simple logistic regression model in Python? Q2). How can you train and interpret a linear regression model in SciKit learn? Q3).Name a few libraries in Python used for Data Analysis and Scientific computations. Ans1.2.3:   NumPy, SciPy, Pandas, SciKit, Matplotlib, Seaborn   Q4).Which library would you prefer for plotting in Python language: Seaborn or Matplotlib? Ans4:   Matplotlib is the python library used for plotting but it needs lot of fine-tuning to ensure that the plots look shiny. Seaborn helps data scientists create statistically and aesthetically appealing meaningful plots. The answer to this question varies based on the requirements for plotting data.   Q5).What is the main difference between a Pandas series and a single-column DataFrame in Python? Q6). Write code to sort a DataFrame in Python in descending order. Q7). How can you handle duplicate values in a dataset for a variable in Python? Q8). Which Random F...