Submit Search
Upload
The Power of PowerShell: Advanced
•
Download as PPTX, PDF
•
0 likes
•
1,794 views
Microsoft TechNet - Belgium and Luxembourg
Follow
More info on http://techdays.be.
Read less
Read more
Report
Share
Report
Share
1 of 21
Download now
Recommended
Powershell alias
Powershell alias
LearningTech
Introduction To Power Shell
Introduction To Power Shell
Ivan Suhinin
Sunil phani's take on windows powershell
Sunil phani's take on windows powershell
Sunil Phani
Terminal commands ubuntu 2
Terminal commands ubuntu 2
raj upadhyay
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
I Goo Lee
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
Josh Braegger
Common linux ubuntu commands overview
Common linux ubuntu commands overview
Ameer Sameer
Ansible with-junos
Ansible with-junos
Akhmad Zaimi
Recommended
Powershell alias
Powershell alias
LearningTech
Introduction To Power Shell
Introduction To Power Shell
Ivan Suhinin
Sunil phani's take on windows powershell
Sunil phani's take on windows powershell
Sunil Phani
Terminal commands ubuntu 2
Terminal commands ubuntu 2
raj upadhyay
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
I Goo Lee
Docker & CoreOS at Utah Gophers
Docker & CoreOS at Utah Gophers
Josh Braegger
Common linux ubuntu commands overview
Common linux ubuntu commands overview
Ameer Sameer
Ansible with-junos
Ansible with-junos
Akhmad Zaimi
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
SmartTools
Enable https (1) Tibco document
Enable https (1) Tibco document
Eodishaorg Paribaar
PowerShell 2 remoting
PowerShell 2 remoting
jonathanmedd
Ansible for Beginners
Ansible for Beginners
Arie Bregman
Linux class 9 15 oct 2021-5
Linux class 9 15 oct 2021-5
Khawar Nehal khawar.nehal@atrc.net.pk
Linux class 10 15 oct 2021-6
Linux class 10 15 oct 2021-6
Khawar Nehal khawar.nehal@atrc.net.pk
(Practical) linux 101
(Practical) linux 101
Arie Bregman
(Practical) linux 104
(Practical) linux 104
Arie Bregman
Comets notes
Comets notes
Ilija Dukovski
ASM
ASM
Anar Godjaev
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
Taehee Jang
Powershell enum
Powershell enum
LearningTech
Basic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
Tasawr Interactive
Basic command ppt
Basic command ppt
Rohit Kumar
Sahu
Sahu
sahul azzez m.i
Ansible ハンズオン on AWS - DevelopersIO 2017
Ansible ハンズオン on AWS - DevelopersIO 2017
Shuji Watanabe
Linux commd
Linux commd
ragav03
Linux commd
Linux commd
ragav03
Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)
MongoDB
Variables and User Input
Variables and User Input
primeteacher32
Process of science
Process of science
Quanina Quan
Seminar meningitis
Seminar meningitis
bowosaja
More Related Content
What's hot
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
SmartTools
Enable https (1) Tibco document
Enable https (1) Tibco document
Eodishaorg Paribaar
PowerShell 2 remoting
PowerShell 2 remoting
jonathanmedd
Ansible for Beginners
Ansible for Beginners
Arie Bregman
Linux class 9 15 oct 2021-5
Linux class 9 15 oct 2021-5
Khawar Nehal khawar.nehal@atrc.net.pk
Linux class 10 15 oct 2021-6
Linux class 10 15 oct 2021-6
Khawar Nehal khawar.nehal@atrc.net.pk
(Practical) linux 101
(Practical) linux 101
Arie Bregman
(Practical) linux 104
(Practical) linux 104
Arie Bregman
Comets notes
Comets notes
Ilija Dukovski
ASM
ASM
Anar Godjaev
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
Taehee Jang
Powershell enum
Powershell enum
LearningTech
Basic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
Tasawr Interactive
Basic command ppt
Basic command ppt
Rohit Kumar
Sahu
Sahu
sahul azzez m.i
Ansible ハンズオン on AWS - DevelopersIO 2017
Ansible ハンズオン on AWS - DevelopersIO 2017
Shuji Watanabe
Linux commd
Linux commd
ragav03
Linux commd
Linux commd
ragav03
Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)
MongoDB
Variables and User Input
Variables and User Input
primeteacher32
What's hot
(20)
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Enable https (1) Tibco document
Enable https (1) Tibco document
PowerShell 2 remoting
PowerShell 2 remoting
Ansible for Beginners
Ansible for Beginners
Linux class 9 15 oct 2021-5
Linux class 9 15 oct 2021-5
Linux class 10 15 oct 2021-6
Linux class 10 15 oct 2021-6
(Practical) linux 101
(Practical) linux 101
(Practical) linux 104
(Practical) linux 104
Comets notes
Comets notes
ASM
ASM
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
Powershell enum
Powershell enum
Basic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
Basic command ppt
Basic command ppt
Sahu
Sahu
Ansible ハンズオン on AWS - DevelopersIO 2017
Ansible ハンズオン on AWS - DevelopersIO 2017
Linux commd
Linux commd
Linux commd
Linux commd
Replica Sets (NYC NoSQL Meetup)
Replica Sets (NYC NoSQL Meetup)
Variables and User Input
Variables and User Input
Viewers also liked
Process of science
Process of science
Quanina Quan
Seminar meningitis
Seminar meningitis
bowosaja
El fax inés
El fax inés
mgonellgomez
Monopsony market structure
Monopsony market structure
Travis Klein
Virtualization Myths Infographic
Virtualization Myths Infographic
EMC
Mit2 092 f09_lec10
Mit2 092 f09_lec10
Rahman Hakim
Animal power pont
Animal power pont
carloszendejas
Thurs god wills it crusdades
Thurs god wills it crusdades
Travis Klein
BIOENERGY TECHNOLOGY STATUS IN THAILAND: CHALLENGES AND OPPORTUNITIES
BIOENERGY TECHNOLOGY STATUS IN THAILAND: CHALLENGES AND OPPORTUNITIES
Srichattra Chaivongvilan
Jose gafas
Jose gafas
joserobertoayora
Improve Patient Care and Reduce IT Costs with Vendor Neutral Archiving and Cl...
Improve Patient Care and Reduce IT Costs with Vendor Neutral Archiving and Cl...
EMC
Linux kursu-erzurum
Linux kursu-erzurum
sersld67
4 things you_cannot_recover
4 things you_cannot_recover
Chandan Dubey
อังกฤษ
อังกฤษ
jojowhisky
บทที่ 4
บทที่ 4
einscream
Dia de la_democracia
Dia de la_democracia
Lauma1416
Stomp presentation v1.5.1
Stomp presentation v1.5.1
Patrick Cannon
Real process
Real process
siddheshhhh
White Paper: Advanced Cyber Analytics with Greenplum Database
White Paper: Advanced Cyber Analytics with Greenplum Database
EMC
Chapter 5 presentation
Chapter 5 presentation
ayurkosky
Viewers also liked
(20)
Process of science
Process of science
Seminar meningitis
Seminar meningitis
El fax inés
El fax inés
Monopsony market structure
Monopsony market structure
Virtualization Myths Infographic
Virtualization Myths Infographic
Mit2 092 f09_lec10
Mit2 092 f09_lec10
Animal power pont
Animal power pont
Thurs god wills it crusdades
Thurs god wills it crusdades
BIOENERGY TECHNOLOGY STATUS IN THAILAND: CHALLENGES AND OPPORTUNITIES
BIOENERGY TECHNOLOGY STATUS IN THAILAND: CHALLENGES AND OPPORTUNITIES
Jose gafas
Jose gafas
Improve Patient Care and Reduce IT Costs with Vendor Neutral Archiving and Cl...
Improve Patient Care and Reduce IT Costs with Vendor Neutral Archiving and Cl...
Linux kursu-erzurum
Linux kursu-erzurum
4 things you_cannot_recover
4 things you_cannot_recover
อังกฤษ
อังกฤษ
บทที่ 4
บทที่ 4
Dia de la_democracia
Dia de la_democracia
Stomp presentation v1.5.1
Stomp presentation v1.5.1
Real process
Real process
White Paper: Advanced Cyber Analytics with Greenplum Database
White Paper: Advanced Cyber Analytics with Greenplum Database
Chapter 5 presentation
Chapter 5 presentation
Similar to The Power of PowerShell: Advanced
ITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell Toolmaking
Kurt Roggen [BE]
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
Introduction to PowerShell
Introduction to PowerShell
Boulos Dib
PowerShell for SharePoint Developers
PowerShell for SharePoint Developers
Boulos Dib
Power shell training
Power shell training
David Brabant
PowerShell Remoting
PowerShell Remoting
Concentrated Technology
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
Hitesh Mohapatra
Power shell examples_v4
Power shell examples_v4
JoeDinaso
CCI2019 - I've got the Power! I've got the Shell!
CCI2019 - I've got the Power! I've got the Shell!
walk2talk srl
PowerShell 101
PowerShell 101
Thomas Lee
Windows PowerShell
Windows PowerShell
Orbit One - We create coherence
PowerShell-1
PowerShell-1
Saravanan G
Powershell
Powershell
Tingting Wang
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
Matthew Johnson
Web2py Code Lab
Web2py Code Lab
Colin Su
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
Concentrated Technology
PowerShell Workshop Series: Session 2
PowerShell Workshop Series: Session 2
Bryan Cafferky
Powershell Tech Ed2009
Powershell Tech Ed2009
rsnarayanan
PowerShell Fundamentals
PowerShell Fundamentals
mozdzen
NIIT ISAS Q5 Report - Windows PowerShell
NIIT ISAS Q5 Report - Windows PowerShell
Phan Hien
Similar to The Power of PowerShell: Advanced
(20)
ITPROceed 2016 - The Art of PowerShell Toolmaking
ITPROceed 2016 - The Art of PowerShell Toolmaking
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
Introduction to PowerShell
Introduction to PowerShell
PowerShell for SharePoint Developers
PowerShell for SharePoint Developers
Power shell training
Power shell training
PowerShell Remoting
PowerShell Remoting
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
Power shell examples_v4
Power shell examples_v4
CCI2019 - I've got the Power! I've got the Shell!
CCI2019 - I've got the Power! I've got the Shell!
PowerShell 101
PowerShell 101
Windows PowerShell
Windows PowerShell
PowerShell-1
PowerShell-1
Powershell
Powershell
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
Web2py Code Lab
Web2py Code Lab
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
PowerShell Workshop Series: Session 2
PowerShell Workshop Series: Session 2
Powershell Tech Ed2009
Powershell Tech Ed2009
PowerShell Fundamentals
PowerShell Fundamentals
NIIT ISAS Q5 Report - Windows PowerShell
NIIT ISAS Q5 Report - Windows PowerShell
More from Microsoft TechNet - Belgium and Luxembourg
Windows 10: all you need to know!
Windows 10: all you need to know!
Microsoft TechNet - Belgium and Luxembourg
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Microsoft TechNet - Belgium and Luxembourg
Windows 8.1 a closer look
Windows 8.1 a closer look
Microsoft TechNet - Belgium and Luxembourg
So you’ve successfully installed SCOM… Now what.
So you’ve successfully installed SCOM… Now what.
Microsoft TechNet - Belgium and Luxembourg
Data Leakage Prevention
Data Leakage Prevention
Microsoft TechNet - Belgium and Luxembourg
Deploying and managing ConfigMgr Clients
Deploying and managing ConfigMgr Clients
Microsoft TechNet - Belgium and Luxembourg
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Microsoft TechNet - Belgium and Luxembourg
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
Microsoft TechNet - Belgium and Luxembourg
SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012
Microsoft TechNet - Belgium and Luxembourg
Jump start your application monitoring with APM
Jump start your application monitoring with APM
Microsoft TechNet - Belgium and Luxembourg
What’s new in Lync Server 2013: Persistent Chat
What’s new in Lync Server 2013: Persistent Chat
Microsoft TechNet - Belgium and Luxembourg
What's new for Lync 2013 Clients & Devices
What's new for Lync 2013 Clients & Devices
Microsoft TechNet - Belgium and Luxembourg
Office 365 ProPlus: Click-to-run deployment and management
Office 365 ProPlus: Click-to-run deployment and management
Microsoft TechNet - Belgium and Luxembourg
Office 365 Identity Management options
Office 365 Identity Management options
Microsoft TechNet - Belgium and Luxembourg
SharePoint Installation and Upgrade: Untangling Your Options
SharePoint Installation and Upgrade: Untangling Your Options
Microsoft TechNet - Belgium and Luxembourg
The application model in real life
The application model in real life
Microsoft TechNet - Belgium and Luxembourg
Microsoft private cloud with Cisco and Netapp - Flexpod solution
Microsoft private cloud with Cisco and Netapp - Flexpod solution
Microsoft TechNet - Belgium and Luxembourg
Managing Windows RT devices in the Enterprise
Managing Windows RT devices in the Enterprise
Microsoft TechNet - Belgium and Luxembourg
Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management
Microsoft TechNet - Belgium and Luxembourg
Network Management in System Center 2012 SP1 - VMM
Network Management in System Center 2012 SP1 - VMM
Microsoft TechNet - Belgium and Luxembourg
More from Microsoft TechNet - Belgium and Luxembourg
(20)
Windows 10: all you need to know!
Windows 10: all you need to know!
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Windows 8.1 a closer look
Windows 8.1 a closer look
So you’ve successfully installed SCOM… Now what.
So you’ve successfully installed SCOM… Now what.
Data Leakage Prevention
Data Leakage Prevention
Deploying and managing ConfigMgr Clients
Deploying and managing ConfigMgr Clients
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012
Jump start your application monitoring with APM
Jump start your application monitoring with APM
What’s new in Lync Server 2013: Persistent Chat
What’s new in Lync Server 2013: Persistent Chat
What's new for Lync 2013 Clients & Devices
What's new for Lync 2013 Clients & Devices
Office 365 ProPlus: Click-to-run deployment and management
Office 365 ProPlus: Click-to-run deployment and management
Office 365 Identity Management options
Office 365 Identity Management options
SharePoint Installation and Upgrade: Untangling Your Options
SharePoint Installation and Upgrade: Untangling Your Options
The application model in real life
The application model in real life
Microsoft private cloud with Cisco and Netapp - Flexpod solution
Microsoft private cloud with Cisco and Netapp - Flexpod solution
Managing Windows RT devices in the Enterprise
Managing Windows RT devices in the Enterprise
Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management
Network Management in System Center 2012 SP1 - VMM
Network Management in System Center 2012 SP1 - VMM
The Power of PowerShell: Advanced
1.
The Power Of
PowerShell: Advanced Kurt Roggen, Technical Consultant, Devoteam kurt.roggen@devoteam.be
2.
Agenda • PowerShell
Basics • PS Syntax • Pipeline • 3 cmdlets to know/remember • PowerShell Advanced • Functions • Modules • Comment Based Help • Accepting PS Objects from the pipeline • Creating PS Objects
3.
4.
PS Cmdlet Syntax
verb-<ID>SingularNoun Get-Service, New-Mailbox, Get-ADUser, Get-Disk, Get-VM, Start-Process, Stop-Process, New-NALun, Get-AzureVM, ...
5.
3 cmdlets to
know/remember!! PowerShell is self-discoverable using 1. Get-Command 2. Get-Help 3. Get-Member
6.
1. Get-Help Displays
help information Get-Help Get-Help get-service Get-Help get-service -examples Get-Help get-service -detailed Get-Help get-service -full Get-Help get-service -online Get-Help get-service -parameter ComputerName Get-Help * -parameter ComputerName Get-Help about_wildcards Alias: help
7.
2. Get-Command Displays all
commands (cmdlet, function, alias) Get-Command Get-Command -verb get Get-Command -noun service Get-Command -module ActiveDirectory Get-Command -CmdType cmdlet Alias: gcm
8.
3. Get-Member Displays all
MemberTypes (Property,Methods,...) Get-Service | Get-Member Get-Member –InputType (Get-Service) Get-Member –MemberType Method Get-Member –MemberType Property Alias: gm
9.
Modules
10.
Modules Collections of cmdlets Portable Stored
in file system %windir%System32WindowsPoweshell1.0Modules Module Cmdlets: New-Module, Get-Module, Import-Module, Remove-Module Module Manifest Cmdlets: New-ModuleManifest , Test-ModuleManifest
11.
Functions
12.
Creating Functions function
Get-OS { param( [string[]]$ComputerName = $env:COMPUTERNAME ) gwmi Win32_OperatingSystem -ComputerName $ComputerName } PS C:> Get-OS -ComputerName “MyClient1”, ”MyClient2”
13.
Creating Modules Modules Location: %windir%System32WindowsPoweshell1.0Modules Create
a PS module folder (eg: MyModule) Save PS module with extension .PSM1 instead of .PS1 (MyModule.psm1) • PS module folder name must have same name as PS module file basename
14.
Comment Based Help
15.
Comment Based Help
Function Get-OS { <# .SYNOPSIS <toktok> .DESCRIPTION <toktok> .PARAMETER ComputerName <toktok> .EXAMPLE Get-OS .LINK http://mysite.com/get-os/ #> Param ( [string]$ComputerName, [switch]$Details ) }
16.
Accepting Pipeline Input
17.
Accepting Pipeline Input
function Get-OS { param( [Parameter(ValueFromPipeLine=$true)] [string[]]$ComputerName = $env:COMPUTERNAME ) PROCESS { <blabla> } }
18.
Creating PS Objects
19.
Create PS Object $Obj
= New-Object –Type PSObject $Obj | Add-Member –Name ComputerName –Value $ComputerName –Type NoteProperty $Obj | Add-Member –Name OS –Value $OS –Type NoteProperty $Obj | Add-Member –Name ServicePack –Value $ServicePack –Type NoteProperty $Obj | Add-Member –Name Version –Value $ComputerName –Type NoteProperty Return PS Object (to pipeline) $Obj
20.
Conclusion PowerShell is the
future present PowerShell is Self-discoverable Remember 3 basic commands Reuse code using functions in modules It’s easy - Try it, you’ll see!
Editor's Notes
Check out about_Regular_Expressions
Download now