SlideShare a Scribd company logo
1 of 13
PowerShell
Reincarnation of command
prompt

Ankit Kashyap
ankit.kashyap@wipro.com

© 2009 Wipro Ltd - Confidential
Before We Begin
How Many of you have seen the blockbuster “Karan-Arjun”?

How many of you believe in „Reincarnation‟?

TP 49

TP 50

The Very basic difference between Unix and
Windows…

91% Market Share
2

© 2009 Wipro Ltd - Confidential
GUI Rocks, Command Line is hell!

Why GUI Rocks?
 Easy Navigation
 Simpler depiction of System data, files, folders
 No need to memorize lengthy commands and their bunch of
parameters
 No significant competency required, even a layman can work
on it.

So is it a panacea?

3

© 2009 Wipro Ltd - Confidential
GUI ≠ Panacea for all
My Bro

IT Admin @ Wipro

“Mixed Approach”
Scripts
make Life
Easier!

Wanna Just GUI!!

4

© 2009 Wipro Ltd - Confidential
Scripting
Not this Script

JScrip
t
Perl

Shell
PHP

VBScript

Awk

Sid

JavaScrip
t
TCL -TK

Is VBScript OK?
 Its COM based but softwares are .NET based
 No OOPS!!
 MS Stopped its further development – No new
releases!!
We need a new
language!!

5

© 2009 Wipro Ltd - Confidential
Need of the hour: PowerShell
World needs a brand new scripting language:
.NET based
OOPS Enabled
Simple to learn
Complete language
“Windows PowerShell is Exactly
what we are looking for!”

•

Already in-built in Windows 7 & Server
2K8 (its R2)

•
•

PreReq for Downlevel OS: .NET 2.0 SP1

•

6

Free download for XP, Vista and WS03

Current Version: 2.0

© 2009 Wipro Ltd - Confidential
PowerShell: Basics for Dummies
PowerShell

Completely Based on .NET

What it means??

 Based on .NET framework
 You can use a major portion of
.NET framework in PS.
 Not limited to cmd, even you can
develop a GUI based program
too!!
 Backward compatible with old
cmd
(Reincarnation??)
7

© 2009 Wipro Ltd - Confidential
PowerShell: Basics for Dummies
Don‟t call Commands, Call them cmdlets

Set-date

They are not .exe or
.com based binaries,
they are .NET
classes!!

8

© 2009 Wipro Ltd - Confidential

They have unique
naming convention
in verb-noun
format! Easy to
remember
PowerShell: Basics for Dummies
Supports Pipelining

Support Remote
Execution

dir c: | find “.exe”

Has a Good GUI-Editor
PowerShell ISE

Support a command line
based Intelli-sense just like
Visual Studio

All the main programming features
like Array, files, loops , logic
operator etc

9

© 2009 Wipro Ltd - Confidential
PowerShell: Is it just another Scripting
language
Just like traditional scripting languages, it does the basic
scripting tasks
So is it just another Language??

 Almost every latest version of server apps like Exchange
server, SQL server, SharePoint have PS based management
environment
 Even 3rd party apps now a days are having their own PS
cmdlets!!
 It‟s the future language for Server Admins & Power Users.
 In the future, PowerShell become OmniPresent
10

© 2009 Wipro Ltd - Confidential
More about PowerShell
• Microsoft Learning portal
http://www.microsoft.com/learning/en/us/course.aspx?ID=50025a
• PowerShell Script Center
http://technet.microsoft.com/en-us/scriptcenter/
• PowerShell Community
http://www.powershell.com/cs/

12

© 2009 Wipro Ltd - Confidential
Queries

tweet me : @ankitwww

13

© 2009 Wipro Ltd - Confidential
Thanks
Closing Line:
PowerShell = emPOWERing the old cmd
SHELL with the help of .NET for mainly
Server Professionals

© 2009 Wipro Ltd - Confidential

More Related Content

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Introduction to powershell

  • 1. PowerShell Reincarnation of command prompt Ankit Kashyap ankit.kashyap@wipro.com © 2009 Wipro Ltd - Confidential
  • 2. Before We Begin How Many of you have seen the blockbuster “Karan-Arjun”? How many of you believe in „Reincarnation‟? TP 49 TP 50 The Very basic difference between Unix and Windows… 91% Market Share 2 © 2009 Wipro Ltd - Confidential
  • 3. GUI Rocks, Command Line is hell! Why GUI Rocks?  Easy Navigation  Simpler depiction of System data, files, folders  No need to memorize lengthy commands and their bunch of parameters  No significant competency required, even a layman can work on it. So is it a panacea? 3 © 2009 Wipro Ltd - Confidential
  • 4. GUI ≠ Panacea for all My Bro IT Admin @ Wipro “Mixed Approach” Scripts make Life Easier! Wanna Just GUI!! 4 © 2009 Wipro Ltd - Confidential
  • 5. Scripting Not this Script JScrip t Perl Shell PHP VBScript Awk Sid JavaScrip t TCL -TK Is VBScript OK?  Its COM based but softwares are .NET based  No OOPS!!  MS Stopped its further development – No new releases!! We need a new language!! 5 © 2009 Wipro Ltd - Confidential
  • 6. Need of the hour: PowerShell World needs a brand new scripting language: .NET based OOPS Enabled Simple to learn Complete language “Windows PowerShell is Exactly what we are looking for!” • Already in-built in Windows 7 & Server 2K8 (its R2) • • PreReq for Downlevel OS: .NET 2.0 SP1 • 6 Free download for XP, Vista and WS03 Current Version: 2.0 © 2009 Wipro Ltd - Confidential
  • 7. PowerShell: Basics for Dummies PowerShell Completely Based on .NET What it means??  Based on .NET framework  You can use a major portion of .NET framework in PS.  Not limited to cmd, even you can develop a GUI based program too!!  Backward compatible with old cmd (Reincarnation??) 7 © 2009 Wipro Ltd - Confidential
  • 8. PowerShell: Basics for Dummies Don‟t call Commands, Call them cmdlets Set-date They are not .exe or .com based binaries, they are .NET classes!! 8 © 2009 Wipro Ltd - Confidential They have unique naming convention in verb-noun format! Easy to remember
  • 9. PowerShell: Basics for Dummies Supports Pipelining Support Remote Execution dir c: | find “.exe” Has a Good GUI-Editor PowerShell ISE Support a command line based Intelli-sense just like Visual Studio All the main programming features like Array, files, loops , logic operator etc 9 © 2009 Wipro Ltd - Confidential
  • 10. PowerShell: Is it just another Scripting language Just like traditional scripting languages, it does the basic scripting tasks So is it just another Language??  Almost every latest version of server apps like Exchange server, SQL server, SharePoint have PS based management environment  Even 3rd party apps now a days are having their own PS cmdlets!!  It‟s the future language for Server Admins & Power Users.  In the future, PowerShell become OmniPresent 10 © 2009 Wipro Ltd - Confidential
  • 11. More about PowerShell • Microsoft Learning portal http://www.microsoft.com/learning/en/us/course.aspx?ID=50025a • PowerShell Script Center http://technet.microsoft.com/en-us/scriptcenter/ • PowerShell Community http://www.powershell.com/cs/ 12 © 2009 Wipro Ltd - Confidential
  • 12. Queries tweet me : @ankitwww 13 © 2009 Wipro Ltd - Confidential
  • 13. Thanks Closing Line: PowerShell = emPOWERing the old cmd SHELL with the help of .NET for mainly Server Professionals © 2009 Wipro Ltd - Confidential

Editor's Notes

  1. Hi All!! Before We begin today’s KM tech talk, I have something for you guys! Any Guesses? …… Hmm!
  2. After Q2: I promise you that after this ppt, many of you will start believing in it. B4 moving on my third q, I make an assumption that many among us have gone through some Unix training, class or at least have heard about it. After Q3: Today, Windows dominates the world OS market by having 91% market share. The obvious reason of the initial success of Windows was its simple, lucid GUI. It seems that Nobody wants to work with text based interfaces or Apps. So moral of this answer – GUI Rocks -> Next Slide
  3. Now once the operating system got a GUI , ppl started asking for GUI based Apps also. Various Apps which previously were Command line, got an GUI avatar. The Basic reasons for the success of GUI were: PPTSo is GUI a universal solution for dealing with the computers. Can we go for GUI approach in every scenario. Yes or No. Actually there is a classic answer for these kind of questions “It depends!” -> Next Slide
  4. Lets have example of my brother. He uses his system primarily for internet, movies, songs. All these features need a good GUI. Imagine checking ur mail thr’u command line or a command line browser or a media player. But now imagine a FMG Admin of Wipro. His job is to create new user-id for Wipro mail, manage them and delete whenever required. Suppose he want to create 100 new joinees ID. Now if he start creating them through Exchange server GUI , it will take at least 25 hours. In practice, these admin people use a script, commonly written in scripting languages like VBScript, Perl etc. They use few text based scripts also for automating their day to day tasks. In this case, a command base approach is more fast, reliable and painless. I said Scripting. What’s that? -> Next Slide
  5. In simple words, Script is a small non-compiled code which generally interpreted. In fact there are lots of scripting languages available. Scripting is very much important for server admin, developers as well as testers. Few of automation tools like QTP are based on scripting languages. If you see the MS Camp, we have VBScript…… in bucket. The most important among them is VBScript. So is that Sufficient? This time “NO it depends kind answer” but a clear NO! its not sufficient. Why? Actually 3 reasons: COM Based -> and No .NET based , no object oriented (OOPS is the biggest buzz of all time in Software industry) and No further development. But still they are providing support for any bugs and security loopholes.
  6. So obviously there was a need of a new, .NET based, object oriented scripting engine. With this basic motto, MS started developing project Monad and in Nov 2006 (Check it) they released it as Windows PowerShell. MS is recommended to migrate to PS from VBScript. An obvious quick Q? How to get Powershell? Well it’s a free download from MS and already incorporated in Windows 7 and WS08 R2. For downlevel, you need to have .NET 2.0 as a prereq. Current version of PS is 2.0. Here is a screenshot of PS window launched on Win7 machine. You will be agree that its quite similar to cmd in looks, just a reincarnation of the latter. In fact PS is backward compatible with cmd. All cmd commands will work in PS. But Few output and their formatting will be different. Like
  7. Lets explore few basics of PS1. PowerShell -> Completely based on .NET. U can call .NET classes. Like Mathematics, String, Logic, Loops , array.In fact it’s a complete programming language and lashed with the power of .NET framework. Even its not limited to cmd, you can develop GUI apps , not complex but at least simpler apps like MTC or ART.
  8. 2. CMDLETS
  9. 3. Pipelining4. ISE
  10. Till now whatever we discuss abt PS, you can achieve either thr’u scripting or thr’u complete languages like C#, VB or C++. So is it just another programming cum Scripting language? NO, in real world, PS is being used primarily by server admins. Also almost all the latest Microsoft server products like Exchange Server 2007, SQL 2010, Sharepoint 2010….. have in-built PS Support. They have their own set of PS cmdlets for managing them. These cmdlets are making the management part much easier, faster and reliable than GUI approach. I would like to show you one screencast, which will demonstrate one such incident. In this demo we will create a user on exchange server……..
  11. There are various blogs and sites where you can get excellent learning materials. Few tutorials and sample scripts can be found on…
  12. Get Ready!!!
  13. Thanks