SlideShare a Scribd company logo
POWERSHELL ZERO TO HERO!
PRESENTED BY :- DAISY OLIVIA STEVENS
DATE: 16/07/2019
THE AGENDA!
TOOLING FUNDAMENTALS CONSTRUCTION
MEET THE PRESENTER
 I have worked in the majority of all market sectors within
tech functions for over 10 years
 My Specialties are:-
 Networking (Multi-vendor full stack)
 Cloud (Public and Private)
 VMware, Hyper-V and Citrix
 Azure, AWS, GCP
 Storage (Dell EMC / HP etc)
 Deployment Automation (Windows / Linux)
 Social
 LinkedIn :- https://www.linkedin.com/in/theheroic/
 Instagram :-
https://www.instagram.com/daisyoliviastevens/
 WordPress :- https://adminscriptbank.wordpress.com/
WHAT IS POWERSHELL?
 PowerShell is an automated task framework from Microsoft, with a command line shell and a scripting
language integrated into the .NET framework.
 PowerShell is used to automate batch process’s and perform administrative tasks in Windows, Linux and
MacOS environments.
 Windows PowerShell executes four types of commands:
 Cmdlets
 PowerShell functions
 PowerShell scripts
 Executable programs
TOOLING
A GREAT TOOL IMPROVES THE WAY YOU THINK!
TOOLING - VSCODE
Visual Studio Code is a source-code editor
developed by Microsoft for Windows, Linux and
macOS. With a large array of features to enhance
your development experience such as :-
 Intellisence
 Refactoring
 Debugging
 Version Control
 Terminal Integration
 Multi Language Support (15+)
TOOLING – NOTEPAD++
Notepad++ is a free (as in "free speech" and also as in "free beer")
source code editor and Notepad replacement that supports
several languages. Running in the MS Windows environment
 Syntax Highlighting and Syntax Folding
 PCRE (Perl Compatible Regular Expression) Search/Replace
 GUI entirely customizable: minimalist, tab with close button,
multi-line tab, vertical tab and vertical document list
 Document Map
 Auto-completion: Word completion, Function completion and
Function parameters hint
 Multi-Document (Tab interface)
 Multi-Language environment supported
 Bookmark
 Macro recording and playback
TOOLING – POWERSHELL ISE
The Windows PowerShell Integrated Scripting
Environment (ISE) is a host application for Windows
PowerShell. In the ISE, you can run commands and
write, test, and debug scripts in a single Windows-
based graphic user interface.
 Context-sensitive help
 Selective execution
 Multiline editing
FUNDAMENTALS
TALK IS CHEAP SHOW ME THE CODE! – LINUS TORVADS
DATA TYPES
A data type is an attribute of data which tells the
compiler or interpreter how the programmer
intends to use the data.
Data types defines the operations that can be
done on the data
Data Type Description Example
[string] Text String Hello World
[char] Symbol =
[bool] Boolean $true
[int] Integer 32 Bit 235235345
[long] Integer 64 Bit 2352353457
[decimal] 128 Bit Decimal 23523.53456d
[DateTime] Date And Time 26/07/19 10:30
[array] A series of objects all of
which are the same size
and type
“One”,”Two”,”Three”
And More!
OBJECTS / VARIABLES
PowerShell lets you create named objects known as
variables. Variable names can include the underscore
character and any alphanumeric characters.
When used in PowerShell, a variable is always specified
using the $ character followed by variable name.
Within PowerShell you have also have global and local
variables:
 Global variables are declared outside any function,
and they can be accessed (used) on any function in
the program
 Local variables are declared inside a function, and
can be used only inside that function. It is possible
to have local variables with the same name in
different functions.
FUNCTIONS
A function is a list of PowerShell statements that
has a name that you assign. When you run a
function, you type the function name. The
statements in the list run as if you had typed them
at the command prompt.
Like cmdlets, functions can have parameters. The
parameters can be named, positional, switch, or
dynamic parameters. Function parameters can be
read from the command line or from the pipeline.
IF
Every programming and scripting language has had
some sort of way to perform a conditional
operation using an If statement as part of flow
control in a script or program.
You can use the If statement to run code blocks if a
specified conditional test evaluates to true. You can
also specify one or more additional conditional
tests to run if all the prior tests evaluate to false
TRY
Handle a terminating error (exception) within a
script block.
Use the Try block to define a section of a script in
which you want PowerShell to monitor for errors.
When an error occurs within the Try block, the error
is first saved to the $Error.
PowerShell then searches for a Catch block to
handle the error. After a Catch block is completed,
the Finally block is run.
LOOP
 It is a fundamental concept of any programming
language
 PowerShell loops, at their most basic, simply
repeat the same set of commands a set number
of times.
STRUCTURE
Structured programming is a subset of procedural
programming that enforces a logical structure on
the program being written to make it more efficient
and easier to understand and modify.
Structured programming frequently employs a top-
down design model, in which developers map out
the overall program structure into separate
subsections.
Remember be consistent!
Naming Conventions, Indentation, Capitalisation
• Comment Block
• Comment Based Help
Header
• $UserName
• $UserAge
Input Params
• $Global:UDateTime = get-date
• $Env:ComputerName
Global Params
• Function Get-CompName {write-host “The Computer Name is $Env:ComputerName”}
Functions
• Get-ComputerName
Call Stack
• Write-host “The Script Has Now Finished Executing!”
Script End
CONSTRUCTION
LET’S GO INVENT TOMORROW INSTEAD OF WORRYING ABOUT WHAT HAPPENED YESTERDAY. – STEVE JOBS
HELLO WORLD!
HELLO WORLD – FORMATTED!
HELLO WORLD – STRUCTURED!
HELLO WORLD – LOOP!
HELLO WORLD – IF!
Array Size Count Greater Than 4 Array Size Count Less Than 4
HELLO WORLD – TRY!
No Error! Invoked Error!
RESOURCE LINKS
 VSCODE
 https://code.visualstudio.com/
 Data Type Detail
 https://ss64.com/ps/syntax-datatypes.html
 Microsoft PowerShell Help Documentation
 https://docs.microsoft.com/en-
gb/powershell/scripting/overview?view=powershell
-6
THANK YOU
DAISYSTEVENS100@OUTLOOK.COM
ADMINSCRIPTBANK.WORDPRESS.COM/
MOBILE UK: +44 (0) 7757 998 750
MOBILE RO: +40 (0) 7846 784 65

More Related Content

PPTX
Rubrik Türleri
PPTX
İmaj Nedir? | Yaprak Özer
PDF
Rapport de stage(gestion des étudiants).pdf
PPTX
Présentation du pfe - Master spécialisé en ingénierie informatique
PPT
Eğitim Akımları
PDF
Couplage CRM / CTI VoIP
PDF
Crm Analytique vision et convictions
PPTX
Dereceli puanlama anahtari (rubric)
Rubrik Türleri
İmaj Nedir? | Yaprak Özer
Rapport de stage(gestion des étudiants).pdf
Présentation du pfe - Master spécialisé en ingénierie informatique
Eğitim Akımları
Couplage CRM / CTI VoIP
Crm Analytique vision et convictions
Dereceli puanlama anahtari (rubric)

Similar to PowerShell Zero To Hero Workshop! (20)

PPT
Plug-in Architectures
PDF
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
PPS
Web technology html5 php_mysql
PDF
Powershell uses.pdf
PPTX
What should or not be programmed on the web
PPT
No-script PowerShell v2
PDF
Sql Server & PowerShell
PPTX
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
DOCX
Training 8051Report
PPT
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
PPTX
Introduction to windows power shell in sharepoint 2010
PPTX
01 Database Management (re-uploaded)
PDF
Ppt on visual basics
PPTX
Holy PowerShell, BATman! - dogfood edition
PPTX
PDF
Power Shell For Testers
PPTX
Fundamentalsofprogrammingfinal 121011003536-phpapp02
PPT
Functional Testing Swing Applications with Frankenstein
PPT
Visual Studio .NET2010
PPTX
Fundamentals of programming
Plug-in Architectures
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Web technology html5 php_mysql
Powershell uses.pdf
What should or not be programmed on the web
No-script PowerShell v2
Sql Server & PowerShell
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Training 8051Report
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Introduction to windows power shell in sharepoint 2010
01 Database Management (re-uploaded)
Ppt on visual basics
Holy PowerShell, BATman! - dogfood edition
Power Shell For Testers
Fundamentalsofprogrammingfinal 121011003536-phpapp02
Functional Testing Swing Applications with Frankenstein
Visual Studio .NET2010
Fundamentals of programming
Ad

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Programs and apps: productivity, graphics, security and other tools
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The AUB Centre for AI in Media Proposal.docx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Ad

PowerShell Zero To Hero Workshop!

  • 1. POWERSHELL ZERO TO HERO! PRESENTED BY :- DAISY OLIVIA STEVENS DATE: 16/07/2019
  • 3. MEET THE PRESENTER  I have worked in the majority of all market sectors within tech functions for over 10 years  My Specialties are:-  Networking (Multi-vendor full stack)  Cloud (Public and Private)  VMware, Hyper-V and Citrix  Azure, AWS, GCP  Storage (Dell EMC / HP etc)  Deployment Automation (Windows / Linux)  Social  LinkedIn :- https://www.linkedin.com/in/theheroic/  Instagram :- https://www.instagram.com/daisyoliviastevens/  WordPress :- https://adminscriptbank.wordpress.com/
  • 4. WHAT IS POWERSHELL?  PowerShell is an automated task framework from Microsoft, with a command line shell and a scripting language integrated into the .NET framework.  PowerShell is used to automate batch process’s and perform administrative tasks in Windows, Linux and MacOS environments.  Windows PowerShell executes four types of commands:  Cmdlets  PowerShell functions  PowerShell scripts  Executable programs
  • 5. TOOLING A GREAT TOOL IMPROVES THE WAY YOU THINK!
  • 6. TOOLING - VSCODE Visual Studio Code is a source-code editor developed by Microsoft for Windows, Linux and macOS. With a large array of features to enhance your development experience such as :-  Intellisence  Refactoring  Debugging  Version Control  Terminal Integration  Multi Language Support (15+)
  • 7. TOOLING – NOTEPAD++ Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment  Syntax Highlighting and Syntax Folding  PCRE (Perl Compatible Regular Expression) Search/Replace  GUI entirely customizable: minimalist, tab with close button, multi-line tab, vertical tab and vertical document list  Document Map  Auto-completion: Word completion, Function completion and Function parameters hint  Multi-Document (Tab interface)  Multi-Language environment supported  Bookmark  Macro recording and playback
  • 8. TOOLING – POWERSHELL ISE The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. In the ISE, you can run commands and write, test, and debug scripts in a single Windows- based graphic user interface.  Context-sensitive help  Selective execution  Multiline editing
  • 9. FUNDAMENTALS TALK IS CHEAP SHOW ME THE CODE! – LINUS TORVADS
  • 10. DATA TYPES A data type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data. Data types defines the operations that can be done on the data Data Type Description Example [string] Text String Hello World [char] Symbol = [bool] Boolean $true [int] Integer 32 Bit 235235345 [long] Integer 64 Bit 2352353457 [decimal] 128 Bit Decimal 23523.53456d [DateTime] Date And Time 26/07/19 10:30 [array] A series of objects all of which are the same size and type “One”,”Two”,”Three” And More!
  • 11. OBJECTS / VARIABLES PowerShell lets you create named objects known as variables. Variable names can include the underscore character and any alphanumeric characters. When used in PowerShell, a variable is always specified using the $ character followed by variable name. Within PowerShell you have also have global and local variables:  Global variables are declared outside any function, and they can be accessed (used) on any function in the program  Local variables are declared inside a function, and can be used only inside that function. It is possible to have local variables with the same name in different functions.
  • 12. FUNCTIONS A function is a list of PowerShell statements that has a name that you assign. When you run a function, you type the function name. The statements in the list run as if you had typed them at the command prompt. Like cmdlets, functions can have parameters. The parameters can be named, positional, switch, or dynamic parameters. Function parameters can be read from the command line or from the pipeline.
  • 13. IF Every programming and scripting language has had some sort of way to perform a conditional operation using an If statement as part of flow control in a script or program. You can use the If statement to run code blocks if a specified conditional test evaluates to true. You can also specify one or more additional conditional tests to run if all the prior tests evaluate to false
  • 14. TRY Handle a terminating error (exception) within a script block. Use the Try block to define a section of a script in which you want PowerShell to monitor for errors. When an error occurs within the Try block, the error is first saved to the $Error. PowerShell then searches for a Catch block to handle the error. After a Catch block is completed, the Finally block is run.
  • 15. LOOP  It is a fundamental concept of any programming language  PowerShell loops, at their most basic, simply repeat the same set of commands a set number of times.
  • 16. STRUCTURE Structured programming is a subset of procedural programming that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify. Structured programming frequently employs a top- down design model, in which developers map out the overall program structure into separate subsections. Remember be consistent! Naming Conventions, Indentation, Capitalisation • Comment Block • Comment Based Help Header • $UserName • $UserAge Input Params • $Global:UDateTime = get-date • $Env:ComputerName Global Params • Function Get-CompName {write-host “The Computer Name is $Env:ComputerName”} Functions • Get-ComputerName Call Stack • Write-host “The Script Has Now Finished Executing!” Script End
  • 17. CONSTRUCTION LET’S GO INVENT TOMORROW INSTEAD OF WORRYING ABOUT WHAT HAPPENED YESTERDAY. – STEVE JOBS
  • 19. HELLO WORLD – FORMATTED!
  • 20. HELLO WORLD – STRUCTURED!
  • 22. HELLO WORLD – IF! Array Size Count Greater Than 4 Array Size Count Less Than 4
  • 23. HELLO WORLD – TRY! No Error! Invoked Error!
  • 24. RESOURCE LINKS  VSCODE  https://code.visualstudio.com/  Data Type Detail  https://ss64.com/ps/syntax-datatypes.html  Microsoft PowerShell Help Documentation  https://docs.microsoft.com/en- gb/powershell/scripting/overview?view=powershell -6
  • 25. THANK YOU DAISYSTEVENS100@OUTLOOK.COM ADMINSCRIPTBANK.WORDPRESS.COM/ MOBILE UK: +44 (0) 7757 998 750 MOBILE RO: +40 (0) 7846 784 65