SlideShare a Scribd company logo
Practical PowerShell Programming
for
Professional People
Ben Ten
(@Ben0xA)
Converge Detroit 2014
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
About Me
Ben Ten (0xA)
@Ben0xA - twitter
Chicago - #burbsec
Vice President
Security Officer
Developer
PoshSec Framework Developer / Creator
Gamer
Geek
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Overview
● Languages and Development
● PowerShell Scripting
● Resources
● Q&A
● PSA: This is mostly live code scripting in
PowerShell. Please code along with me!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Overview
Feel free to interrupt and ask questions!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Before we begin, a bit of a primer!
● Styles of Coding
● Syntax
● Getting Help
● Starting Out
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Styles of Coding/Scripting/Development
● Novice
● Avid Scripter
● Full Time Developer
● Code Monkey
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Styles of Coding/Scripting/Development
● Novice
● Avid Scripter
● Full Time Developer
● Code Monkey
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Syntax
syn•tax (sĭn tăks ) – the rules that governˈ ˌ
how a script, or program, is developed in a
given language.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Syntax
White Space, parens (), commas, periods,
quotes (“ vs '), tabs, braces [], curly
brackets {}, colons :, semi-colons ;, all play
an integral part in the syntax of a
language!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Getting Help!
RTF Manual/Docs/Reference
Often times, the documentation will have
an answer for what you are trying to
accomplish. *NOT ALWAYS THOUGH*
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Getting Help!
Interactive Help
● ?
● F1
● Intellisense (Ctrl+Space)
● Get-Help
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Getting Help!
Search Engines FTW!
Google is not the end all in searches. For
Development I prefer DuckDuckGo!
https://duckduckgo.com
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Languages and Development
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Overview
PowerShell is a task automation and
configuration management framework
from Microsoft, consisting of a command-
line shell and associated scripting
language built on the .NET Framework.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Overview
PowerShell was designed by :
● Jeffrey Snover (@jsnover)
● Bruce Payette (@BrucePayette)
● James Truher
Initial release was November 14, 2006
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Overview
PowerShell is a part of the Windows
Management Framework. WMF 5.0 was
released on April 3, 2014.
For today's scripting we will be using WMF
3.0.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
You will need:
● Windows Management Framework 3.0
● Microsoft .NET Framework 4.5
● Text Editor (your choice)
● Sublime Text http://www.sublimetext.com/
● Komodo Edit http://komodoide.com/komodo-edit/
● PowerShell ISE (comes with WMF)
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
File Name Extensions
.ps1 – Script Files
.psm1 – Script Module Files
.psd1 – Script Manifest Files
.ps1xml – Formatting and Type Files
.dll - Cmdlet and Provider Assemblies
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
File Name Extensions
.ps1 – Script Files
.psm1 – Script Module Files
.psd1 – Script Manifest Files
.ps1xml – Formatting and Type Files
.dll - Cmdlet and Provider Assemblies
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Cmdlets, Functions, and Scripts Oh My!
From a functional standpoint, cmdlets,
functions, and scripts are practically the
same.
They are a way to call a specific block of
code.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Cmdlet:
Written in a compiled .NET language.
Easier to deploy.
Help files are easier to write.
Has support for parameter validation.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Function:
Written in a PowerShell language.
Has to be deployed with a library.
Help is written inside the function.
Parameter validation has to be done in the
function itself.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Script:
Written in a PowerShell language.
Is invoked by calling the .ps1 file.
Deployed by itself or in a manifest file.
Can contain functions.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Set-ExecutionPolicy
Before you can run your custom scripts
you have to set the ExecutionPolicy to
RemoteSigned.
In PowerShell type:
Set-ExecutionPolicy RemoteSigned
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
PowerShell
HelloWorld.ps1
Enough of the primer! Let's get coding!
This is where you code along with me if
you can!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Variable(s):
a symbolic name associated with a value
and whose associated value may be
changed.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Hard-Coded:
Typing the value directly into your script.
Our “Hello World” text was hard-coded.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
PowerShell Variables:
A PowerShell variable is defined with the
dollar sign $ followed by the name of the
variable.
For example: $message is a variable.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
PowerShell Variables:
Let's rewrite our HelloWorld.ps1 to use a
variable $message with our text “Hello
World”.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Quotes! Single vs Double
Double Quotes (“) will attempt to resolve
any variables before anything is printed to
the screen.
Single Quotes (') will print exactly what is
typed between the quotes.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Backtick `
The backtick, or grave accent, is a special
escape character. This means that you
want the next character to be printed and
not interpreted in anyway.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
HelloWorld.ps1
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Getting Input
Write-Output is great. But how do you get
information from a user?
Read-Host
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Getting Input
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Getting Input
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Condition is:
a feature of a programming language
which perform a different set of
computations or actions depending on
whether a programmer-specified boolean
condition evaluates to true or false.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Condition is:
Is the stop light is green? Keep going.
Is the stop light is red? Stop.
Is the stop light is yellow? Floor it!!!!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Condition expressed:
● If - Beginning of the condition.
● Else - Evaluates only if preceding condition(s)
is(are) false.
● ElseIf – Evaluates if preceding condition(s)
is(are) false with a new condition.
● Switch – Multiple conditions for a single
variable or object.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Conditional Operator:
-and = both conditions must be true.
-or = only one of the conditions must be
true.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Conditional Operator:
-eq = Equals
-lt = Less Than
-gt = Greater Than
-ne = Not Equal
-ge = Great Than or Equal
-le = Less Than or Equal
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
A Conditional Operator:
-Like
-NotLike
-Match
-NotMatch
-Contains
-NotContains
-In
-NotIn
-Replace
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Operator Precedence:
When operators have equal precedence,
Windows PowerShell evaluates them from
left to right. The exceptions are the
assignment operators, the cast operators,
and the negation operators (!, -not, -bnot),
which are evaluated from right to left.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Operator Precedence:
You can use enclosures, such as
parentheses, to override the standard
precedence order and force Windows
PowerShell to evaluate the enclosed part
of an expression before an unenclosed
part.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Conditional Logic
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Parameters
A Parameter is:
A variable that allows you to pass an
object to a Cmdlet, Function, or Script.
Get-ChildItem
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Parameters
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Parameters
Get-Help Get-ChildItem
Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Exclude <String[]>
[-Name] [-Recurse] [-UseTransaction [<SwitchParameter>]]
[<CommonParameters>
Get-ChildItem [[-Filter] <String>] [-Exclude <String[]>] [-Force] [-Include
-LiteralPath <String[]> [-UseTransaction [<SwitchParameter>]]
[<CommonParame
Get-ChildItem [-Attributes <FileAttributes]>] [-Directory] [-File] [-Force]
[-UseTransaction] [<CommonParameters>]
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Parameters
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Parameters
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Objects vs Text
PowerShell is Object Based.
Even if you see text on the screen, that
text is actually a “String” object.
You can access the members of the object
using the . operator after the variable
name.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Objects vs Text
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Piping
Piping is:
a way of moving something, unchanged,
from one place to another.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Piping
Piping is represented by the | (pipe)
character.
A pipe takes the object from the left side
and passes it to the right side.
Note: When passing to another cmdlet, $_
is used to reference the passed object.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Piping
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Piping
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Loops
Loops:
A way to perform the same block of code
for a specific number of times, until a
specific condition is met, or while a
specific condition exists.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Loops
Loops:
● ForEach
● ForEach-Object
● For
● While
● Do While
● Do Until
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Loops
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Loops
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Loops
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Comments
Comments are defined by the # symbol.
Block comments are enclosed with <# and
#>.
.SYNOPSIS
.DESCRIPTION
.PARAMETER
.EXAMPLE
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Comments
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Putting it all Together
The final program!
Requirements:
● Search all files.
● Find the ones that were modified in a
specific date range.
● Create a list of those files and display
them.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Pitfalls
Don't overuse the Pipe! Not everything has
to be done in a single line.
It's more important that you understand
the code before you try to condense it to a
single line.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Pitfalls
With Loops, start small then open the
valve all the way!
You can get more than you wanted, or get
stuck in an endless loop.
Especially true when doing File operations!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Resources
Freenode (irc.freenode.net)
#PowerShell, #pssec, #poshsec channels.
Learn Windows PowerShell in a Month of
Lunches ~ Don Jones
Carlos Perez – PowerShell Workshop at
DerbyCon.
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Contact - Q&A
Ben Ten (0xA)
@Ben0xA - twitter
http://ben0xa.com
https://poshsec.org
web@ben0xa.com
Ben0xA – LinkedIn, Github, keybase, etc.
irc.freenode.net
#burbsec, #poshsec, #pssec
QUESTIONS?!
Practical PowerShell Programming for Professional People
Converge Detroit - Ben Ten (@Ben0xA)
Thank You!
Ad

More Related Content

What's hot (20)

De-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQLDe-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQL
Lætitia Avrot
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
John Anderson
 
Php test fest
Php test festPhp test fest
Php test fest
Barry O Sullivan
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
Adam Englander
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHP
Tareq Hasan
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
Adam Culp
 
Mixing Plone and Django for explosive results
Mixing Plone and Django for explosive resultsMixing Plone and Django for explosive results
Mixing Plone and Django for explosive results
Simone Deponti
 
Getting Started With PowerShell Scripting
Getting Started With PowerShell ScriptingGetting Started With PowerShell Scripting
Getting Started With PowerShell Scripting
Ravikanth Chaganti
 
Theory and practice – migrating your legacy code into our modern test drive...
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...
Lars Jankowfsky
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
John Anderson
 
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.jsNetflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Chris Saint-Amant
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLI
Jacques Woodcock
 
HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developers
Peter Hilton
 
Becoming A Php Ninja
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
Mohammad Emran Hasan
 
Take control. write a plugin. part II
Take control. write a plugin. part IITake control. write a plugin. part II
Take control. write a plugin. part II
Baruch Sadogursky
 
PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.
Francesco Fullone
 
Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min. Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min.
David Gómez García
 
Zero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutesZero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutes
Jeremy Kendall
 
Hack language
Hack languageHack language
Hack language
Ravindra Bhadane
 
C# 6
C# 6C# 6
C# 6
Pascal Laurin
 
De-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQLDe-mystifying contributing to PostgreSQL
De-mystifying contributing to PostgreSQL
Lætitia Avrot
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
John Anderson
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
Adam Englander
 
Composer - The missing package manager for PHP
Composer - The missing package manager for PHPComposer - The missing package manager for PHP
Composer - The missing package manager for PHP
Tareq Hasan
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
Adam Culp
 
Mixing Plone and Django for explosive results
Mixing Plone and Django for explosive resultsMixing Plone and Django for explosive results
Mixing Plone and Django for explosive results
Simone Deponti
 
Getting Started With PowerShell Scripting
Getting Started With PowerShell ScriptingGetting Started With PowerShell Scripting
Getting Started With PowerShell Scripting
Ravikanth Chaganti
 
Theory and practice – migrating your legacy code into our modern test drive...
Theory and practice – migrating your  legacy code into our modern test  drive...Theory and practice – migrating your  legacy code into our modern test  drive...
Theory and practice – migrating your legacy code into our modern test drive...
Lars Jankowfsky
 
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.jsNetflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Netflix JavaScript Talks - Scaling A/B Testing on Netflix.com with Node.js
Chris Saint-Amant
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLI
Jacques Woodcock
 
HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developers
Peter Hilton
 
Take control. write a plugin. part II
Take control. write a plugin. part IITake control. write a plugin. part II
Take control. write a plugin. part II
Baruch Sadogursky
 
PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.
Francesco Fullone
 
Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min. Measuring Code Quality in WTF/min.
Measuring Code Quality in WTF/min.
David Gómez García
 
Zero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutesZero to Zend Framework in 10 minutes
Zero to Zend Framework in 10 minutes
Jeremy Kendall
 

Viewers also liked (20)

Powershell training material
Powershell training materialPowershell training material
Powershell training material
Dr. Awase Khirni Syed
 
PowerShell 101 - What is it and Why should YOU Care!
PowerShell 101 - What is it and Why should YOU Care!PowerShell 101 - What is it and Why should YOU Care!
PowerShell 101 - What is it and Why should YOU Care!
Thomas Lee
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
Dale Lane
 
Use Powershell to make your life easy.
Use Powershell to make your life easy.Use Powershell to make your life easy.
Use Powershell to make your life easy.
Aman Dhally
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
ÇözümPARK
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Richard Calderon
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
Roo7break
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
Richard Giles
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
 
Office 365 & PowerShell - A match made in heaven
Office 365 & PowerShell - A match made in heavenOffice 365 & PowerShell - A match made in heaven
Office 365 & PowerShell - A match made in heaven
Sébastien Levert
 
PowerShell from *nix user perspective
PowerShell from *nix user perspectivePowerShell from *nix user perspective
PowerShell from *nix user perspective
Juraj Michálek
 
Managing Virtual Infrastructures With PowerShell
Managing Virtual Infrastructures With PowerShellManaging Virtual Infrastructures With PowerShell
Managing Virtual Infrastructures With PowerShell
guesta849bc8b
 
PowerShell UIAtomation
PowerShell UIAtomationPowerShell UIAtomation
PowerShell UIAtomation
Juraj Michálek
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
Thomas Lee
 
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
jaredhaight
 
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Puppet
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Salaudeen Rajack
 
Geek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerGeek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL Server
IDERA Software
 
Network Mapping with PowerShell
Network Mapping with PowerShellNetwork Mapping with PowerShell
Network Mapping with PowerShell
Costin-Alin Neacsu
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration Testers
Nikhil Mittal
 
PowerShell 101 - What is it and Why should YOU Care!
PowerShell 101 - What is it and Why should YOU Care!PowerShell 101 - What is it and Why should YOU Care!
PowerShell 101 - What is it and Why should YOU Care!
Thomas Lee
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
Dale Lane
 
Use Powershell to make your life easy.
Use Powershell to make your life easy.Use Powershell to make your life easy.
Use Powershell to make your life easy.
Aman Dhally
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
ÇözümPARK
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Richard Calderon
 
Power on, Powershell
Power on, PowershellPower on, Powershell
Power on, Powershell
Roo7break
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
Richard Giles
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
 
Office 365 & PowerShell - A match made in heaven
Office 365 & PowerShell - A match made in heavenOffice 365 & PowerShell - A match made in heaven
Office 365 & PowerShell - A match made in heaven
Sébastien Levert
 
PowerShell from *nix user perspective
PowerShell from *nix user perspectivePowerShell from *nix user perspective
PowerShell from *nix user perspective
Juraj Michálek
 
Managing Virtual Infrastructures With PowerShell
Managing Virtual Infrastructures With PowerShellManaging Virtual Infrastructures With PowerShell
Managing Virtual Infrastructures With PowerShell
guesta849bc8b
 
PowerShell 101
PowerShell 101PowerShell 101
PowerShell 101
Thomas Lee
 
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
jaredhaight
 
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Windows - Having Its Ass Kicked by Puppet and PowerShell Since 2012
Puppet
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Salaudeen Rajack
 
Geek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL ServerGeek Sync | Using PowerShell with Python and SQL Server
Geek Sync | Using PowerShell with Python and SQL Server
IDERA Software
 
Network Mapping with PowerShell
Network Mapping with PowerShellNetwork Mapping with PowerShell
Network Mapping with PowerShell
Costin-Alin Neacsu
 
Workshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration TestersWorkshop: PowerShell for Penetration Testers
Workshop: PowerShell for Penetration Testers
Nikhil Mittal
 
Ad

Similar to Practical PowerShell Programming for Professional People (20)

Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
PHP Annotations: They exist! - JetBrains Webinar
 PHP Annotations: They exist! - JetBrains Webinar PHP Annotations: They exist! - JetBrains Webinar
PHP Annotations: They exist! - JetBrains Webinar
Rafael Dohms
 
Introducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus VoelterIntroducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus Voelter
JAXLondon2014
 
Annotations in PHP, They Exist.
Annotations in PHP, They Exist.Annotations in PHP, They Exist.
Annotations in PHP, They Exist.
Rafael Dohms
 
Collaborative Software Development
Collaborative Software DevelopmentCollaborative Software Development
Collaborative Software Development
Alexander Serebrenik
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
Mattupallipardhu
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
Markus Voelter
 
Govind.ppt.pptx
Govind.ppt.pptxGovind.ppt.pptx
Govind.ppt.pptx
ShivKaushik8
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
Cisco Russia
 
Entrepreneur’s guide to programming
Entrepreneur’s guide to programmingEntrepreneur’s guide to programming
Entrepreneur’s guide to programming
Chris Callahan
 
Python Programming.pptx
Python Programming.pptxPython Programming.pptx
Python Programming.pptx
DineshThakur911173
 
resume-jbarr-linkedin-2016
resume-jbarr-linkedin-2016resume-jbarr-linkedin-2016
resume-jbarr-linkedin-2016
Jason Barr
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
Gabriele Santini
 
Python overview
Python overviewPython overview
Python overview
Haroon Karim
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)
KALAISELVI P
 
How To Be A Better Developer
How To Be A Better DeveloperHow To Be A Better Developer
How To Be A Better Developer
Ahmed Abu Eldahab
 
Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!
Chang W. Doh
 
Clouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
Clouds are Not Free: Guide to Observability-Driven Efficiency OptimizationsClouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
Clouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
ScyllaDB
 
Realizzare un Virtual Assistant con Bot Framework Azure e Unity
Realizzare un Virtual Assistant con Bot Framework Azure e UnityRealizzare un Virtual Assistant con Bot Framework Azure e Unity
Realizzare un Virtual Assistant con Bot Framework Azure e Unity
Marco Parenzan
 
Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)
Eric Johnson
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
PHP Annotations: They exist! - JetBrains Webinar
 PHP Annotations: They exist! - JetBrains Webinar PHP Annotations: They exist! - JetBrains Webinar
PHP Annotations: They exist! - JetBrains Webinar
Rafael Dohms
 
Introducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus VoelterIntroducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus Voelter
JAXLondon2014
 
Annotations in PHP, They Exist.
Annotations in PHP, They Exist.Annotations in PHP, They Exist.
Annotations in PHP, They Exist.
Rafael Dohms
 
Collaborative Software Development
Collaborative Software DevelopmentCollaborative Software Development
Collaborative Software Development
Alexander Serebrenik
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
Markus Voelter
 
Возможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OSВозможности интерпретатора Python в NX-OS
Возможности интерпретатора Python в NX-OS
Cisco Russia
 
Entrepreneur’s guide to programming
Entrepreneur’s guide to programmingEntrepreneur’s guide to programming
Entrepreneur’s guide to programming
Chris Callahan
 
resume-jbarr-linkedin-2016
resume-jbarr-linkedin-2016resume-jbarr-linkedin-2016
resume-jbarr-linkedin-2016
Jason Barr
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
Gabriele Santini
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)
KALAISELVI P
 
How To Be A Better Developer
How To Be A Better DeveloperHow To Be A Better Developer
How To Be A Better Developer
Ahmed Abu Eldahab
 
Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!
Chang W. Doh
 
Clouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
Clouds are Not Free: Guide to Observability-Driven Efficiency OptimizationsClouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
Clouds are Not Free: Guide to Observability-Driven Efficiency Optimizations
ScyllaDB
 
Realizzare un Virtual Assistant con Bot Framework Azure e Unity
Realizzare un Virtual Assistant con Bot Framework Azure e UnityRealizzare un Virtual Assistant con Bot Framework Azure e Unity
Realizzare un Virtual Assistant con Bot Framework Azure e Unity
Marco Parenzan
 
Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)
Eric Johnson
 
Ad

Recently uploaded (20)

TrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
TrsLabs - AI Agents for All - Chatbots to Multi-Agents SystemsTrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
TrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
Trs Labs
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
TrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
TrsLabs - AI Agents for All - Chatbots to Multi-Agents SystemsTrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
TrsLabs - AI Agents for All - Chatbots to Multi-Agents Systems
Trs Labs
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Hybridize Functions: A Tool for Automatically Refactoring Imperative Deep Lea...
Raffi Khatchadourian
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Build 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHSBuild 3D Animated Safety Induction - Tech EHS
Build 3D Animated Safety Induction - Tech EHS
TECH EHS Solution
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Web and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in RajpuraWeb and Graphics Designing Training in Rajpura
Web and Graphics Designing Training in Rajpura
Erginous Technology
 
Connect and Protect: Networks and Network Security
Connect and Protect: Networks and Network SecurityConnect and Protect: Networks and Network Security
Connect and Protect: Networks and Network Security
VICTOR MAESTRE RAMIREZ
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
TrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token ListingTrsLabs Consultants - DeFi, WEb3, Token Listing
TrsLabs Consultants - DeFi, WEb3, Token Listing
Trs Labs
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
Play It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google CertificatePlay It Safe: Manage Security Risks - Google Certificate
Play It Safe: Manage Security Risks - Google Certificate
VICTOR MAESTRE RAMIREZ
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 

Practical PowerShell Programming for Professional People

  • 1. Practical PowerShell Programming for Professional People Ben Ten (@Ben0xA) Converge Detroit 2014
  • 2. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) About Me Ben Ten (0xA) @Ben0xA - twitter Chicago - #burbsec Vice President Security Officer Developer PoshSec Framework Developer / Creator Gamer Geek
  • 3. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Overview ● Languages and Development ● PowerShell Scripting ● Resources ● Q&A ● PSA: This is mostly live code scripting in PowerShell. Please code along with me!
  • 4. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Overview Feel free to interrupt and ask questions!
  • 5. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Before we begin, a bit of a primer! ● Styles of Coding ● Syntax ● Getting Help ● Starting Out
  • 6. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Styles of Coding/Scripting/Development ● Novice ● Avid Scripter ● Full Time Developer ● Code Monkey
  • 7. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Styles of Coding/Scripting/Development ● Novice ● Avid Scripter ● Full Time Developer ● Code Monkey
  • 8. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Syntax syn•tax (sĭn tăks ) – the rules that governˈ ˌ how a script, or program, is developed in a given language.
  • 9. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Syntax White Space, parens (), commas, periods, quotes (“ vs '), tabs, braces [], curly brackets {}, colons :, semi-colons ;, all play an integral part in the syntax of a language!
  • 10. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Getting Help! RTF Manual/Docs/Reference Often times, the documentation will have an answer for what you are trying to accomplish. *NOT ALWAYS THOUGH*
  • 11. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Getting Help! Interactive Help ● ? ● F1 ● Intellisense (Ctrl+Space) ● Get-Help
  • 12. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development Getting Help! Search Engines FTW! Google is not the end all in searches. For Development I prefer DuckDuckGo! https://duckduckgo.com
  • 13. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Languages and Development
  • 14. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Overview PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command- line shell and associated scripting language built on the .NET Framework.
  • 15. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Overview PowerShell was designed by : ● Jeffrey Snover (@jsnover) ● Bruce Payette (@BrucePayette) ● James Truher Initial release was November 14, 2006
  • 16. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Overview PowerShell is a part of the Windows Management Framework. WMF 5.0 was released on April 3, 2014. For today's scripting we will be using WMF 3.0.
  • 17. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell You will need: ● Windows Management Framework 3.0 ● Microsoft .NET Framework 4.5 ● Text Editor (your choice) ● Sublime Text http://www.sublimetext.com/ ● Komodo Edit http://komodoide.com/komodo-edit/ ● PowerShell ISE (comes with WMF)
  • 18. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell File Name Extensions .ps1 – Script Files .psm1 – Script Module Files .psd1 – Script Manifest Files .ps1xml – Formatting and Type Files .dll - Cmdlet and Provider Assemblies
  • 19. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell File Name Extensions .ps1 – Script Files .psm1 – Script Module Files .psd1 – Script Manifest Files .ps1xml – Formatting and Type Files .dll - Cmdlet and Provider Assemblies
  • 20. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Cmdlets, Functions, and Scripts Oh My! From a functional standpoint, cmdlets, functions, and scripts are practically the same. They are a way to call a specific block of code.
  • 21. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Cmdlet: Written in a compiled .NET language. Easier to deploy. Help files are easier to write. Has support for parameter validation.
  • 22. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Function: Written in a PowerShell language. Has to be deployed with a library. Help is written inside the function. Parameter validation has to be done in the function itself.
  • 23. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Script: Written in a PowerShell language. Is invoked by calling the .ps1 file. Deployed by itself or in a manifest file. Can contain functions.
  • 24. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell Set-ExecutionPolicy Before you can run your custom scripts you have to set the ExecutionPolicy to RemoteSigned. In PowerShell type: Set-ExecutionPolicy RemoteSigned
  • 25. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell
  • 26. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) PowerShell HelloWorld.ps1 Enough of the primer! Let's get coding! This is where you code along with me if you can!
  • 27. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 28. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 29. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 30. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 Variable(s): a symbolic name associated with a value and whose associated value may be changed.
  • 31. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 Hard-Coded: Typing the value directly into your script. Our “Hello World” text was hard-coded.
  • 32. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 PowerShell Variables: A PowerShell variable is defined with the dollar sign $ followed by the name of the variable. For example: $message is a variable.
  • 33. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 PowerShell Variables: Let's rewrite our HelloWorld.ps1 to use a variable $message with our text “Hello World”.
  • 34. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 35. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 36. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 37. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 38. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 Quotes! Single vs Double Double Quotes (“) will attempt to resolve any variables before anything is printed to the screen. Single Quotes (') will print exactly what is typed between the quotes.
  • 39. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 40. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 41. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 42. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 43. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1 Backtick ` The backtick, or grave accent, is a special escape character. This means that you want the next character to be printed and not interpreted in anyway.
  • 44. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 45. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 46. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 47. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) HelloWorld.ps1
  • 48. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Getting Input Write-Output is great. But how do you get information from a user? Read-Host
  • 49. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Getting Input
  • 50. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Getting Input
  • 51. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Condition is: a feature of a programming language which perform a different set of computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.
  • 52. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Condition is: Is the stop light is green? Keep going. Is the stop light is red? Stop. Is the stop light is yellow? Floor it!!!!
  • 53. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Condition expressed: ● If - Beginning of the condition. ● Else - Evaluates only if preceding condition(s) is(are) false. ● ElseIf – Evaluates if preceding condition(s) is(are) false with a new condition. ● Switch – Multiple conditions for a single variable or object.
  • 54. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Conditional Operator: -and = both conditions must be true. -or = only one of the conditions must be true.
  • 55. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Conditional Operator: -eq = Equals -lt = Less Than -gt = Greater Than -ne = Not Equal -ge = Great Than or Equal -le = Less Than or Equal
  • 56. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic A Conditional Operator: -Like -NotLike -Match -NotMatch -Contains -NotContains -In -NotIn -Replace
  • 57. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 58. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 59. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic Operator Precedence: When operators have equal precedence, Windows PowerShell evaluates them from left to right. The exceptions are the assignment operators, the cast operators, and the negation operators (!, -not, -bnot), which are evaluated from right to left.
  • 60. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic Operator Precedence: You can use enclosures, such as parentheses, to override the standard precedence order and force Windows PowerShell to evaluate the enclosed part of an expression before an unenclosed part.
  • 61. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 62. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 63. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 64. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Conditional Logic
  • 65. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Parameters A Parameter is: A variable that allows you to pass an object to a Cmdlet, Function, or Script. Get-ChildItem
  • 66. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Parameters
  • 67. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Parameters Get-Help Get-ChildItem Get-ChildItem [[-Path] <String[]>] [[-Filter] <String>] [-Exclude <String[]> [-Name] [-Recurse] [-UseTransaction [<SwitchParameter>]] [<CommonParameters> Get-ChildItem [[-Filter] <String>] [-Exclude <String[]>] [-Force] [-Include -LiteralPath <String[]> [-UseTransaction [<SwitchParameter>]] [<CommonParame Get-ChildItem [-Attributes <FileAttributes]>] [-Directory] [-File] [-Force] [-UseTransaction] [<CommonParameters>]
  • 68. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Parameters
  • 69. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Parameters
  • 70. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Objects vs Text PowerShell is Object Based. Even if you see text on the screen, that text is actually a “String” object. You can access the members of the object using the . operator after the variable name.
  • 71. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Objects vs Text
  • 72. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Piping Piping is: a way of moving something, unchanged, from one place to another.
  • 73. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Piping Piping is represented by the | (pipe) character. A pipe takes the object from the left side and passes it to the right side. Note: When passing to another cmdlet, $_ is used to reference the passed object.
  • 74. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Piping
  • 75. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Piping
  • 76. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Loops Loops: A way to perform the same block of code for a specific number of times, until a specific condition is met, or while a specific condition exists.
  • 77. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Loops Loops: ● ForEach ● ForEach-Object ● For ● While ● Do While ● Do Until
  • 78. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Loops
  • 79. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Loops
  • 80. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Loops
  • 81. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Comments Comments are defined by the # symbol. Block comments are enclosed with <# and #>. .SYNOPSIS .DESCRIPTION .PARAMETER .EXAMPLE
  • 82. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Comments
  • 83. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Putting it all Together The final program! Requirements: ● Search all files. ● Find the ones that were modified in a specific date range. ● Create a list of those files and display them.
  • 84. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Pitfalls Don't overuse the Pipe! Not everything has to be done in a single line. It's more important that you understand the code before you try to condense it to a single line.
  • 85. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Pitfalls With Loops, start small then open the valve all the way! You can get more than you wanted, or get stuck in an endless loop. Especially true when doing File operations!
  • 86. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Resources Freenode (irc.freenode.net) #PowerShell, #pssec, #poshsec channels. Learn Windows PowerShell in a Month of Lunches ~ Don Jones Carlos Perez – PowerShell Workshop at DerbyCon.
  • 87. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Contact - Q&A Ben Ten (0xA) @Ben0xA - twitter http://ben0xa.com https://poshsec.org [email protected] Ben0xA – LinkedIn, Github, keybase, etc. irc.freenode.net #burbsec, #poshsec, #pssec QUESTIONS?!
  • 88. Practical PowerShell Programming for Professional People Converge Detroit - Ben Ten (@Ben0xA) Thank You!