SlideShare a Scribd company logo
Introduction to PowerShell Ivan Suhinin Senior Software Engineer
What is PowerShell? Automation engine Shell environment Scripting language
PowerShell as a shell A full replacement for CMD At last something bash-like in Windows Just… feel the power!
PowerShell as a language Variables: $a, $name Arrays:  $arr = 1,2,3,4,5,6;   $sarr=1..6 Hashes: $h = @{“Key1" = 23; “Key2" = 894} Functions: function hi ($name) { echo "Hi, $name!" } Classes:($o = New-Object Object) |Add-Member NoteProperty Name “Bianco"
PowerShell as an automation tool Predefined set of commands with lots of extensions Easy batch operations Simple command interconnections (pipelining)
Command types Cmdlets – Get-Location Functions User scripts - *.ps1 Native applications (msbuild, csc)
Cmdlets Predefined set of commands Form: Verb-Noun: Get-Location Get-ChildItem Set-Location Long, descriptive names for scripts Aliases for daily usage
Aliases Creating short names for long cmdlets Get-Alias, Set-Alias Makes scripting more friendly By default has standard UNIX aliases ls, ps, pwd, date, kill, gal, pushd, popd
Wiring commands up Pipelining: Get-Location | Get-Member Functional style .NET objects instead of strings (bash) Output becomes input Select – selecting only needed information Where – filtering results Group – grouping results ForEach – processing each input value
PowerShell providers Adapters to different subsystems Get-PSProvider, Get-PSDrive Default: WSMan, Alias, Environment, FileSystem, Registry Extended: IIS, SQL, SharePoint, VMWare
Using external components Windows Management Instrumentation (WMI) gwmi win32_service gwmi win32_operatingsystem COM (New-Object -ComObjectWScript.Shell).Run("calc.exe")
Using .NET Importing assemblies:[Reflection.Assembly]::LoadWithPartialName("System.Messaging") Calling static methods:[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("localhost") Creating and using objects:$b = New-Object System.Text.StringBuilder$b.Append("Hello!")
man Ultimate help system Examples Detailed Full
Demo: deleting MSMQ queues
Demo: sorting SQL tables by size
Demo: real-life deployment script
Development environment Autocompletion Tab key Wildcards Works for methods PowerShell ISE PowerGUI
Q & A

More Related Content

What's hot

Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...
Hitesh Mohapatra
 
Powershell Training
Powershell TrainingPowershell Training
Powershell TrainingFahad Noaman
 
Bash shell
Bash shellBash shell
Bash shellxylas121
 
Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
Bangladesh Network Operators Group
 
Microsoft Active Directory.pptx
Microsoft Active Directory.pptxMicrosoft Active Directory.pptx
Microsoft Active Directory.pptx
masbulosoke
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
Md. Zahid Hossain Shoeb
 
OpenHPC: Community Building Blocks for HPC Systems
OpenHPC: Community Building Blocks for HPC SystemsOpenHPC: Community Building Blocks for HPC Systems
OpenHPC: Community Building Blocks for HPC Systems
inside-BigData.com
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
Stephane Manciot
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Stefano Stabellini
 
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptx
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptxGreat new Domino features since 9.0.1FP8 - 2023 Ed.pptx
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptx
Darren Duke
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
sudhir singh yadav
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
Khizer Naeem
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
Gena Mykhailiuta
 
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
SlideTeam
 
Linux history & features
Linux history & featuresLinux history & features
Linux history & featuresRohit Kumar
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
Rayed Alrashed
 
Integrating Linux Systems with Active Directory Using Open Source Tools
Integrating Linux Systems with Active Directory Using Open Source ToolsIntegrating Linux Systems with Active Directory Using Open Source Tools
Integrating Linux Systems with Active Directory Using Open Source Tools
All Things Open
 

What's hot (20)

Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...
 
Powershell Demo Presentation
Powershell Demo PresentationPowershell Demo Presentation
Powershell Demo Presentation
 
Powershell Training
Powershell TrainingPowershell Training
Powershell Training
 
Bash shell
Bash shellBash shell
Bash shell
 
Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
 
Microsoft Active Directory.pptx
Microsoft Active Directory.pptxMicrosoft Active Directory.pptx
Microsoft Active Directory.pptx
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
OpenHPC: Community Building Blocks for HPC Systems
OpenHPC: Community Building Blocks for HPC SystemsOpenHPC: Community Building Blocks for HPC Systems
OpenHPC: Community Building Blocks for HPC Systems
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
 
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptx
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptxGreat new Domino features since 9.0.1FP8 - 2023 Ed.pptx
Great new Domino features since 9.0.1FP8 - 2023 Ed.pptx
 
Complete Guide for Linux shell programming
Complete Guide for Linux shell programmingComplete Guide for Linux shell programming
Complete Guide for Linux shell programming
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
 
Linux history & features
Linux history & featuresLinux history & features
Linux history & features
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Integrating Linux Systems with Active Directory Using Open Source Tools
Integrating Linux Systems with Active Directory Using Open Source ToolsIntegrating Linux Systems with Active Directory Using Open Source Tools
Integrating Linux Systems with Active Directory Using Open Source Tools
 
Linux
LinuxLinux
Linux
 

Viewers also liked

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
 
PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)Concentrated Technology
 
10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps
Jeffery Hicks
 
Power shell training
Power shell trainingPower shell training
Power shell training
David Brabant
 
Wsv315 Windows Power Shell For Beginners
Wsv315 Windows Power Shell For BeginnersWsv315 Windows Power Shell For Beginners
Wsv315 Windows Power Shell For Beginners
jsnover1
 
Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0
jsnover1
 
Everything you need to know about PowerShell
Everything you need to know about PowerShellEverything you need to know about PowerShell
Everything you need to know about PowerShell
Shane Hoey
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
Sharkrit JOBBO
 
VMUG - Mastering PowerShell to Call RESTful API Endpoints
VMUG - Mastering PowerShell to Call RESTful API EndpointsVMUG - Mastering PowerShell to Call RESTful API Endpoints
VMUG - Mastering PowerShell to Call RESTful API Endpoints
Chris Wahl
 
Unlock The Value Of Your Microsoft and SAP Investments
Unlock The Value Of Your Microsoft and SAP InvestmentsUnlock The Value Of Your Microsoft and SAP Investments
Unlock The Value Of Your Microsoft and SAP Investments
SAP Technology
 
Change document display
Change document displayChange document display
Change document display
Radosław Gref
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
Visual Engineering
 
Workshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensionesWorkshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensiones
Visual Engineering
 
CDS Unit Testing
CDS Unit TestingCDS Unit Testing
CDS Unit Testing
ChrisESwanepoel
 
Workshop 11: Trendy web designs & prototyping
Workshop 11: Trendy web designs & prototypingWorkshop 11: Trendy web designs & prototyping
Workshop 11: Trendy web designs & prototyping
Visual Engineering
 
Workshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operatorsWorkshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operators
Visual Engineering
 
Hana sql
Hana sql Hana sql
Hana sql
Manuel Zárate
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
Tim Penhey
 
Workshop 24: React Native Introduction
Workshop 24: React Native IntroductionWorkshop 24: React Native Introduction
Workshop 24: React Native Introduction
Visual Engineering
 
JavaScript for ABAP Programmers - 7/7 Functional Programming
JavaScript for ABAP Programmers - 7/7 Functional ProgrammingJavaScript for ABAP Programmers - 7/7 Functional Programming
JavaScript for ABAP Programmers - 7/7 Functional Programming
Chris Whealy
 

Viewers also liked (20)

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)
 
PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)
 
10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps10 PowerShell Mistakes, Trips and Traps
10 PowerShell Mistakes, Trips and Traps
 
Power shell training
Power shell trainingPower shell training
Power shell training
 
Wsv315 Windows Power Shell For Beginners
Wsv315 Windows Power Shell For BeginnersWsv315 Windows Power Shell For Beginners
Wsv315 Windows Power Shell For Beginners
 
Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0Wsv406 Advanced Automation Using Windows Power Shell2.0
Wsv406 Advanced Automation Using Windows Power Shell2.0
 
Everything you need to know about PowerShell
Everything you need to know about PowerShellEverything you need to know about PowerShell
Everything you need to know about PowerShell
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
 
VMUG - Mastering PowerShell to Call RESTful API Endpoints
VMUG - Mastering PowerShell to Call RESTful API EndpointsVMUG - Mastering PowerShell to Call RESTful API Endpoints
VMUG - Mastering PowerShell to Call RESTful API Endpoints
 
Unlock The Value Of Your Microsoft and SAP Investments
Unlock The Value Of Your Microsoft and SAP InvestmentsUnlock The Value Of Your Microsoft and SAP Investments
Unlock The Value Of Your Microsoft and SAP Investments
 
Change document display
Change document displayChange document display
Change document display
 
Workshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte IWorkshop 16: EmberJS Parte I
Workshop 16: EmberJS Parte I
 
Workshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensionesWorkshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 3: Testing, protocolos y extensiones
 
CDS Unit Testing
CDS Unit TestingCDS Unit Testing
CDS Unit Testing
 
Workshop 11: Trendy web designs & prototyping
Workshop 11: Trendy web designs & prototypingWorkshop 11: Trendy web designs & prototyping
Workshop 11: Trendy web designs & prototyping
 
Workshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operatorsWorkshop iOS 4: Closures, generics & operators
Workshop iOS 4: Closures, generics & operators
 
Hana sql
Hana sql Hana sql
Hana sql
 
Multithreading 101
Multithreading 101Multithreading 101
Multithreading 101
 
Workshop 24: React Native Introduction
Workshop 24: React Native IntroductionWorkshop 24: React Native Introduction
Workshop 24: React Native Introduction
 
JavaScript for ABAP Programmers - 7/7 Functional Programming
JavaScript for ABAP Programmers - 7/7 Functional ProgrammingJavaScript for ABAP Programmers - 7/7 Functional Programming
JavaScript for ABAP Programmers - 7/7 Functional Programming
 

Similar to Introduction To Power Shell

SVCC 5 introduction to powershell
SVCC 5 introduction to powershellSVCC 5 introduction to powershell
SVCC 5 introduction to powershell
qawarrior
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
jaredhaight
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Manav Prasad
 
The Power of PowerShell: Advanced
The Power of PowerShell: Advanced The Power of PowerShell: Advanced
The Power of PowerShell: Advanced
Microsoft TechNet - Belgium and Luxembourg
 
390aLecture05_12sp.ppt
390aLecture05_12sp.ppt390aLecture05_12sp.ppt
390aLecture05_12sp.ppt
mugeshmsd5
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
Thomas Lee
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptroot_fibo
 
The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shell
Roberto Reale
 
Powershell notes
Powershell notesPowershell notes
Powershell notes
Carlos Amorim
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Salaudeen Rajack
 
Shellscripting
ShellscriptingShellscripting
Shellscripting
Narendra Sisodiya
 
PowerShell_LangRef_v3 (1).pdf
PowerShell_LangRef_v3 (1).pdfPowerShell_LangRef_v3 (1).pdf
PowerShell_LangRef_v3 (1).pdf
outcast96
 
Getting Started With PowerShell Scripting
Getting Started With PowerShell ScriptingGetting Started With PowerShell Scripting
Getting Started With PowerShell Scripting
Ravikanth Chaganti
 
Licão 09 variables and arrays v2
Licão 09 variables and arrays v2Licão 09 variables and arrays v2
Licão 09 variables and arrays v2
Acácio Oliveira
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell ScriptingRaghu nath
 
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
Binh Nguyen
 
PowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersPowerShell for SharePoint Developers
PowerShell for SharePoint Developers
Boulos Dib
 
Using Unix
Using UnixUsing Unix
Using UnixDr.Ravi
 
PHP and COM
PHP and COMPHP and COM
PHP and COM
Wez Furlong
 

Similar to Introduction To Power Shell (20)

SVCC 5 introduction to powershell
SVCC 5 introduction to powershellSVCC 5 introduction to powershell
SVCC 5 introduction to powershell
 
Get-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for EvilGet-Help: An intro to PowerShell and how to Use it for Evil
Get-Help: An intro to PowerShell and how to Use it for Evil
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
The Power of PowerShell: Advanced
The Power of PowerShell: Advanced The Power of PowerShell: Advanced
The Power of PowerShell: Advanced
 
390aLecture05_12sp.ppt
390aLecture05_12sp.ppt390aLecture05_12sp.ppt
390aLecture05_12sp.ppt
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
 
Unit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell scriptUnit 11 configuring the bash shell – shell script
Unit 11 configuring the bash shell – shell script
 
The Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shellThe Unbearable Lightness: Extending the Bash shell
The Unbearable Lightness: Extending the Bash shell
 
Powershell notes
Powershell notesPowershell notes
Powershell notes
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Shellscripting
ShellscriptingShellscripting
Shellscripting
 
PowerShell_LangRef_v3 (1).pdf
PowerShell_LangRef_v3 (1).pdfPowerShell_LangRef_v3 (1).pdf
PowerShell_LangRef_v3 (1).pdf
 
Getting Started With PowerShell Scripting
Getting Started With PowerShell ScriptingGetting Started With PowerShell Scripting
Getting Started With PowerShell Scripting
 
Licão 09 variables and arrays v2
Licão 09 variables and arrays v2Licão 09 variables and arrays v2
Licão 09 variables and arrays v2
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
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
 
PowerShell for SharePoint Developers
PowerShell for SharePoint DevelopersPowerShell for SharePoint Developers
PowerShell for SharePoint Developers
 
Using Unix
Using UnixUsing Unix
Using Unix
 
PHP and COM
PHP and COMPHP and COM
PHP and COM
 

Recently uploaded

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 

Recently uploaded (20)

Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 

Introduction To Power Shell

  • 1. Introduction to PowerShell Ivan Suhinin Senior Software Engineer
  • 2. What is PowerShell? Automation engine Shell environment Scripting language
  • 3. PowerShell as a shell A full replacement for CMD At last something bash-like in Windows Just… feel the power!
  • 4. PowerShell as a language Variables: $a, $name Arrays: $arr = 1,2,3,4,5,6; $sarr=1..6 Hashes: $h = @{“Key1" = 23; “Key2" = 894} Functions: function hi ($name) { echo "Hi, $name!" } Classes:($o = New-Object Object) |Add-Member NoteProperty Name “Bianco"
  • 5. PowerShell as an automation tool Predefined set of commands with lots of extensions Easy batch operations Simple command interconnections (pipelining)
  • 6. Command types Cmdlets – Get-Location Functions User scripts - *.ps1 Native applications (msbuild, csc)
  • 7. Cmdlets Predefined set of commands Form: Verb-Noun: Get-Location Get-ChildItem Set-Location Long, descriptive names for scripts Aliases for daily usage
  • 8. Aliases Creating short names for long cmdlets Get-Alias, Set-Alias Makes scripting more friendly By default has standard UNIX aliases ls, ps, pwd, date, kill, gal, pushd, popd
  • 9. Wiring commands up Pipelining: Get-Location | Get-Member Functional style .NET objects instead of strings (bash) Output becomes input Select – selecting only needed information Where – filtering results Group – grouping results ForEach – processing each input value
  • 10. PowerShell providers Adapters to different subsystems Get-PSProvider, Get-PSDrive Default: WSMan, Alias, Environment, FileSystem, Registry Extended: IIS, SQL, SharePoint, VMWare
  • 11. Using external components Windows Management Instrumentation (WMI) gwmi win32_service gwmi win32_operatingsystem COM (New-Object -ComObjectWScript.Shell).Run("calc.exe")
  • 12. Using .NET Importing assemblies:[Reflection.Assembly]::LoadWithPartialName("System.Messaging") Calling static methods:[System.Messaging.MessageQueue]::GetPrivateQueuesByMachine("localhost") Creating and using objects:$b = New-Object System.Text.StringBuilder$b.Append("Hello!")
  • 13. man Ultimate help system Examples Detailed Full
  • 15. Demo: sorting SQL tables by size
  • 17. Development environment Autocompletion Tab key Wildcards Works for methods PowerShell ISE PowerGUI
  • 18. Q & A