SlideShare a Scribd company logo
1 of 10
Day 2
Scripting
In Windows PowerShell, script files have a .ps1 file name extension. To
run a script, type the name of the script at the command prompt. The
file name extension is optional.
For example:
c:testHelloWorld.ps1
-or-
c:testHelloWorld
Using PowerShell
The first topic of interest might be the Help system itself. To display
information about the Help system inWindows PowerShell, type:
get-help
Then, you might be interested in learning about a few of the basic
cmdlets, such as Get-Help, Get-Command, Get-Process, Get-Service,
and Get-Eventlog.
Execution Policy
• The Get-ExecutionPolicy cmdlet simply tells
you which of the four execution policies
(policies that determine whichWindows
PowerShell scripts, if any, will run on your
computer) is currently in-force.TheWindows
PowerShell execution policies include the
following:
• Restricted - No scripts can be run.Windows
PowerShell can be used only in interactive
mode.
• AllSigned - Only scripts signed by a trusted
publisher can be run.
• RemoteSigned - Downloaded scripts must
be signed by a trusted publisher before they
can be run.
• Unrestricted - No restrictions; allWindows
PowerShell scripts can be run.
• The Set-ExecutionPolicy cmdlet enables
you to determine whichWindows
PowerShell scripts (if any) will be allowed to
run on your computer.Windows PowerShell
has four different execution policies:
• Restricted - No scripts can be run.Windows
PowerShell can be used only in interactive
mode.
• AllSigned - Only scripts signed by a trusted
publisher can be run.
• RemoteSigned - Downloaded scripts must
be signed by a trusted publisher before they
can be run.
• Unrestricted - No restrictions; allWindows
PowerShell scripts can be run.
Get-help and Get-Command
• To get help for aWindows PowerShell command, type Get-Help
followed by the command name, such as: Get-Help Get-Process .
• Get-Command can help you with. Just type Get-Command without
any additional parameters and you’ll get back a list of all the Windows
PowerShell cmdlets:
Format Output
• Windows PowerShell has a set of cmdlets that allow you to control
which properties are displayed for particular objects.The names of all
the cmdlets begin with the verb Format.We commonly use Format-
Table and Format-List quite often
Advantages and Disadvantages of
PowerShell
• Advantages
• Object-Oriented
• .NET Objects and Forms supported
• More Functions compared to cmd.exe andVBScript.
More Extensible via cmdlets, plugins.
• Background Jobs
• Ease of administration
• Disadvantages
• Remoting creates openings for an attacker to exploit
• WinRM requires aWeb server to run on the server
Thank you!

More Related Content

What's hot

What's hot (20)

Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Docker 101 - High level introduction to docker
Docker 101 - High level introduction to dockerDocker 101 - High level introduction to docker
Docker 101 - High level introduction to docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Getting started with Docker
Getting started with DockerGetting started with Docker
Getting started with Docker
 
Building aosp
Building aospBuilding aosp
Building aosp
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Spring boot
Spring bootSpring boot
Spring boot
 
Maven
MavenMaven
Maven
 
Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?Android Treble: Blessing or Trouble?
Android Treble: Blessing or Trouble?
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Diapositivas Web Util
Diapositivas Web UtilDiapositivas Web Util
Diapositivas Web Util
 
What is component in reactjs
What is component in reactjsWhat is component in reactjs
What is component in reactjs
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
Angular material
Angular materialAngular material
Angular material
 

Similar to Power shell basics day 2

PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionDave Diehl
 
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
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitjaredhaight
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basicsDan Morrill
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewRichard Giles
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction  to Command LineChapter 1: Introduction  to Command Line
Chapter 1: Introduction to Command Lineazzamhadeel89
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction to  Command LineChapter 1: Introduction to  Command Line
Chapter 1: Introduction to Command Lineazzamhadeel89
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopersBryan Cafferky
 
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...VMworld
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltPuppet
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShellNikhil Mittal
 
PowerShell Scripting and Modularization (TechMentor Fall 2011)
PowerShell Scripting and Modularization (TechMentor Fall 2011)PowerShell Scripting and Modularization (TechMentor Fall 2011)
PowerShell Scripting and Modularization (TechMentor Fall 2011)Concentrated Technology
 
Introduction to PowerShell and getting started
Introduction to PowerShell and getting startedIntroduction to PowerShell and getting started
Introduction to PowerShell and getting startedRavikanth Chaganti
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attackjaredhaight
 

Similar to Power shell basics day 2 (20)

PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
PowerShell-1
PowerShell-1PowerShell-1
PowerShell-1
 
Taking Advantage of Microsoft PowerShell
Taking Advantage of Microsoft PowerShell Taking Advantage of Microsoft PowerShell
Taking Advantage of Microsoft PowerShell
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
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
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basics
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction  to Command LineChapter 1: Introduction  to Command Line
Chapter 1: Introduction to Command Line
 
Chapter 1: Introduction to Command Line
Chapter 1: Introduction to  Command LineChapter 1: Introduction to  Command Line
Chapter 1: Introduction to Command Line
 
PowerShellForDBDevelopers
PowerShellForDBDevelopersPowerShellForDBDevelopers
PowerShellForDBDevelopers
 
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
 
Easy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet BoltEasy Cross-Platform PowerShell Automation with Puppet Bolt
Easy Cross-Platform PowerShell Automation with Puppet Bolt
 
Client side attacks using PowerShell
Client side attacks using PowerShellClient side attacks using PowerShell
Client side attacks using PowerShell
 
Linux Day2
Linux Day2Linux Day2
Linux Day2
 
powershell.pdf
powershell.pdfpowershell.pdf
powershell.pdf
 
PowerShell Scripting and Modularization (TechMentor Fall 2011)
PowerShell Scripting and Modularization (TechMentor Fall 2011)PowerShell Scripting and Modularization (TechMentor Fall 2011)
PowerShell Scripting and Modularization (TechMentor Fall 2011)
 
Introduction to PowerShell and getting started
Introduction to PowerShell and getting startedIntroduction to PowerShell and getting started
Introduction to PowerShell and getting started
 
Powershell training material
Powershell training materialPowershell training material
Powershell training material
 
Incorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>AttackIncorporating PowerShell into your Arsenal with PS>Attack
Incorporating PowerShell into your Arsenal with PS>Attack
 

More from Ashish Raj

GitOps with Argo - Part 1.pdf
GitOps with Argo - Part 1.pdfGitOps with Argo - Part 1.pdf
GitOps with Argo - Part 1.pdfAshish Raj
 
Getting Started with IaC in Azure using ARM Template
Getting Started with IaC in Azure using ARM TemplateGetting Started with IaC in Azure using ARM Template
Getting Started with IaC in Azure using ARM TemplateAshish Raj
 
Power shell basics day 19
Power shell basics day 19Power shell basics day 19
Power shell basics day 19Ashish Raj
 
18 .NET Objects in PowerShell
18 .NET Objects in PowerShell18 .NET Objects in PowerShell
18 .NET Objects in PowerShellAshish Raj
 
Powershell basics day 17
Powershell basics day 17 Powershell basics day 17
Powershell basics day 17 Ashish Raj
 
Cloud quick start
Cloud quick startCloud quick start
Cloud quick startAshish Raj
 
Power shell basics day 16
Power shell basics day 16Power shell basics day 16
Power shell basics day 16Ashish Raj
 
PowerShell basics day 15
PowerShell basics day 15PowerShell basics day 15
PowerShell basics day 15Ashish Raj
 
Power shell basics day 14
Power shell basics day 14Power shell basics day 14
Power shell basics day 14Ashish Raj
 
Power shell basics day 13
Power shell basics day 13Power shell basics day 13
Power shell basics day 13Ashish Raj
 
PowerShell basics day 12
PowerShell basics day 12PowerShell basics day 12
PowerShell basics day 12Ashish Raj
 
Power shell basics day 11
Power shell basics day 11Power shell basics day 11
Power shell basics day 11Ashish Raj
 
Power shell basics day 9
Power shell basics day 9Power shell basics day 9
Power shell basics day 9Ashish Raj
 
Power shell basics day 8
Power shell basics day 8Power shell basics day 8
Power shell basics day 8Ashish Raj
 
Power shell basics day 7
Power shell basics day 7Power shell basics day 7
Power shell basics day 7Ashish Raj
 
Power shell basics day 6
Power shell basics day 6Power shell basics day 6
Power shell basics day 6Ashish Raj
 
Power shell basics day 5
Power shell basics day 5Power shell basics day 5
Power shell basics day 5Ashish Raj
 

More from Ashish Raj (17)

GitOps with Argo - Part 1.pdf
GitOps with Argo - Part 1.pdfGitOps with Argo - Part 1.pdf
GitOps with Argo - Part 1.pdf
 
Getting Started with IaC in Azure using ARM Template
Getting Started with IaC in Azure using ARM TemplateGetting Started with IaC in Azure using ARM Template
Getting Started with IaC in Azure using ARM Template
 
Power shell basics day 19
Power shell basics day 19Power shell basics day 19
Power shell basics day 19
 
18 .NET Objects in PowerShell
18 .NET Objects in PowerShell18 .NET Objects in PowerShell
18 .NET Objects in PowerShell
 
Powershell basics day 17
Powershell basics day 17 Powershell basics day 17
Powershell basics day 17
 
Cloud quick start
Cloud quick startCloud quick start
Cloud quick start
 
Power shell basics day 16
Power shell basics day 16Power shell basics day 16
Power shell basics day 16
 
PowerShell basics day 15
PowerShell basics day 15PowerShell basics day 15
PowerShell basics day 15
 
Power shell basics day 14
Power shell basics day 14Power shell basics day 14
Power shell basics day 14
 
Power shell basics day 13
Power shell basics day 13Power shell basics day 13
Power shell basics day 13
 
PowerShell basics day 12
PowerShell basics day 12PowerShell basics day 12
PowerShell basics day 12
 
Power shell basics day 11
Power shell basics day 11Power shell basics day 11
Power shell basics day 11
 
Power shell basics day 9
Power shell basics day 9Power shell basics day 9
Power shell basics day 9
 
Power shell basics day 8
Power shell basics day 8Power shell basics day 8
Power shell basics day 8
 
Power shell basics day 7
Power shell basics day 7Power shell basics day 7
Power shell basics day 7
 
Power shell basics day 6
Power shell basics day 6Power shell basics day 6
Power shell basics day 6
 
Power shell basics day 5
Power shell basics day 5Power shell basics day 5
Power shell basics day 5
 

Recently uploaded

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Power shell basics day 2

  • 2. Scripting In Windows PowerShell, script files have a .ps1 file name extension. To run a script, type the name of the script at the command prompt. The file name extension is optional. For example: c:testHelloWorld.ps1 -or- c:testHelloWorld
  • 3. Using PowerShell The first topic of interest might be the Help system itself. To display information about the Help system inWindows PowerShell, type: get-help Then, you might be interested in learning about a few of the basic cmdlets, such as Get-Help, Get-Command, Get-Process, Get-Service, and Get-Eventlog.
  • 4. Execution Policy • The Get-ExecutionPolicy cmdlet simply tells you which of the four execution policies (policies that determine whichWindows PowerShell scripts, if any, will run on your computer) is currently in-force.TheWindows PowerShell execution policies include the following: • Restricted - No scripts can be run.Windows PowerShell can be used only in interactive mode. • AllSigned - Only scripts signed by a trusted publisher can be run. • RemoteSigned - Downloaded scripts must be signed by a trusted publisher before they can be run. • Unrestricted - No restrictions; allWindows PowerShell scripts can be run. • The Set-ExecutionPolicy cmdlet enables you to determine whichWindows PowerShell scripts (if any) will be allowed to run on your computer.Windows PowerShell has four different execution policies: • Restricted - No scripts can be run.Windows PowerShell can be used only in interactive mode. • AllSigned - Only scripts signed by a trusted publisher can be run. • RemoteSigned - Downloaded scripts must be signed by a trusted publisher before they can be run. • Unrestricted - No restrictions; allWindows PowerShell scripts can be run.
  • 5.
  • 6. Get-help and Get-Command • To get help for aWindows PowerShell command, type Get-Help followed by the command name, such as: Get-Help Get-Process . • Get-Command can help you with. Just type Get-Command without any additional parameters and you’ll get back a list of all the Windows PowerShell cmdlets:
  • 7. Format Output • Windows PowerShell has a set of cmdlets that allow you to control which properties are displayed for particular objects.The names of all the cmdlets begin with the verb Format.We commonly use Format- Table and Format-List quite often
  • 8.
  • 9. Advantages and Disadvantages of PowerShell • Advantages • Object-Oriented • .NET Objects and Forms supported • More Functions compared to cmd.exe andVBScript. More Extensible via cmdlets, plugins. • Background Jobs • Ease of administration • Disadvantages • Remoting creates openings for an attacker to exploit • WinRM requires aWeb server to run on the server