SlideShare a Scribd company logo
1 of 25
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

What's hot

Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...
Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...
Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...Amazon Web Services
 
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideSQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideLars Platzdasch
 
Hive Bucketing in Apache Spark
Hive Bucketing in Apache SparkHive Bucketing in Apache Spark
Hive Bucketing in Apache SparkTejas Patil
 
AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationVolodymyr Rovetskiy
 
Snowflake for Data Engineering
Snowflake for Data EngineeringSnowflake for Data Engineering
Snowflake for Data EngineeringHarald Erb
 
How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceMongoDB
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...DataStax
 
Introducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseIntroducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseSnowflake Computing
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Riccardo Zamana
 
Demystifying Data Warehouse as a Service
Demystifying Data Warehouse as a ServiceDemystifying Data Warehouse as a Service
Demystifying Data Warehouse as a ServiceSnowflake Computing
 
Snowflake free trial_lab_guide
Snowflake free trial_lab_guideSnowflake free trial_lab_guide
Snowflake free trial_lab_guideslidedown1
 
Introduction to Database Services
Introduction to Database ServicesIntroduction to Database Services
Introduction to Database ServicesAmazon Web Services
 
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...Amazon Web Services
 
Modernize & Automate Analytics Data Pipelines
Modernize & Automate Analytics Data PipelinesModernize & Automate Analytics Data Pipelines
Modernize & Automate Analytics Data PipelinesCarole Gunst
 
Troubleshooting your Elasticsearch cluster like an Elastic Support Engineer
Troubleshooting your Elasticsearch cluster like an Elastic Support EngineerTroubleshooting your Elasticsearch cluster like an Elastic Support Engineer
Troubleshooting your Elasticsearch cluster like an Elastic Support EngineerImma Valls Bernaus
 
Spark overview
Spark overviewSpark overview
Spark overviewLisa Hua
 
philosophers
philosophersphilosophers
philosopherssarahW3
 

What's hot (20)

Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...
Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...
Snowflake: Your Data. No Limits (Session sponsored by Snowflake) - AWS Summit...
 
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step GuideSQL Server Alwayson for SharePoint HA/DR Step by Step Guide
SQL Server Alwayson for SharePoint HA/DR Step by Step Guide
 
Hive Bucketing in Apache Spark
Hive Bucketing in Apache SparkHive Bucketing in Apache Spark
Hive Bucketing in Apache Spark
 
AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
 
Snowflake for Data Engineering
Snowflake for Data EngineeringSnowflake for Data Engineering
Snowflake for Data Engineering
 
How To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own DatasourceHow To Connect Spark To Your Own Datasource
How To Connect Spark To Your Own Datasource
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...Webinar  |  How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
 
Introducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data WarehouseIntroducing the Snowflake Computing Cloud Data Warehouse
Introducing the Snowflake Computing Cloud Data Warehouse
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020Azure Data Explorer deep dive - review 04.2020
Azure Data Explorer deep dive - review 04.2020
 
Demystifying Data Warehouse as a Service
Demystifying Data Warehouse as a ServiceDemystifying Data Warehouse as a Service
Demystifying Data Warehouse as a Service
 
Snowflake free trial_lab_guide
Snowflake free trial_lab_guideSnowflake free trial_lab_guide
Snowflake free trial_lab_guide
 
Introduction to Database Services
Introduction to Database ServicesIntroduction to Database Services
Introduction to Database Services
 
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
 
Modernize & Automate Analytics Data Pipelines
Modernize & Automate Analytics Data PipelinesModernize & Automate Analytics Data Pipelines
Modernize & Automate Analytics Data Pipelines
 
Troubleshooting your Elasticsearch cluster like an Elastic Support Engineer
Troubleshooting your Elasticsearch cluster like an Elastic Support EngineerTroubleshooting your Elasticsearch cluster like an Elastic Support Engineer
Troubleshooting your Elasticsearch cluster like an Elastic Support Engineer
 
Spark overview
Spark overviewSpark overview
Spark overview
 
philosophers
philosophersphilosophers
philosophers
 
Amazon Redshift
Amazon Redshift Amazon Redshift
Amazon Redshift
 

Similar to PowerShell Zero To Hero Workshop!

Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectureselliando dias
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfClapperboardCinemaPV
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysqldurai arasan
 
What should or not be programmed on the web
What should or not be programmed on the  webWhat should or not be programmed on the  web
What should or not be programmed on the webMohammad Kamrul Hasan
 
Sql Server & PowerShell
Sql Server & PowerShellSql Server & PowerShell
Sql Server & PowerShellAaron Shilo
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersDave Bost
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightFrank La Vigne
 
Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Binh Nguyen
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)bluejayjunior
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basicsyounganand
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionDave Diehl
 
Fundamentalsofprogrammingfinal 121011003536-phpapp02
Fundamentalsofprogrammingfinal 121011003536-phpapp02Fundamentalsofprogrammingfinal 121011003536-phpapp02
Fundamentalsofprogrammingfinal 121011003536-phpapp02thinesonsing
 
Functional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with FrankensteinFunctional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with Frankensteinvivek_prahlad
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Fundamentals of programming
Fundamentals of programmingFundamentals of programming
Fundamentals of programmingKaycee Parcon
 

Similar to PowerShell Zero To Hero Workshop! (20)

Plug-in Architectures
Plug-in ArchitecturesPlug-in Architectures
Plug-in Architectures
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 
Powershell uses.pdf
Powershell uses.pdfPowershell uses.pdf
Powershell uses.pdf
 
What should or not be programmed on the web
What should or not be programmed on the  webWhat should or not be programmed on the  web
What should or not be programmed on the web
 
No-script PowerShell v2
No-script PowerShell v2No-script PowerShell v2
No-script PowerShell v2
 
Sql Server & PowerShell
Sql Server & PowerShellSql Server & PowerShell
Sql Server & PowerShell
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
Training 8051Report
Training 8051ReportTraining 8051Report
Training 8051Report
 
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
 
Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010Introduction to windows power shell in sharepoint 2010
Introduction to windows power shell in sharepoint 2010
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
PHP
PHPPHP
PHP
 
Power Shell For Testers
Power Shell For TestersPower Shell For Testers
Power Shell For Testers
 
Fundamentalsofprogrammingfinal 121011003536-phpapp02
Fundamentalsofprogrammingfinal 121011003536-phpapp02Fundamentalsofprogrammingfinal 121011003536-phpapp02
Fundamentalsofprogrammingfinal 121011003536-phpapp02
 
Functional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with FrankensteinFunctional Testing Swing Applications with Frankenstein
Functional Testing Swing Applications with Frankenstein
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Fundamentals of programming
Fundamentals of programmingFundamentals of programming
Fundamentals of programming
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

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