scriptclub2

17
Sean Kearney - MCSE, MCTS

Upload: sean-kearney

Post on 12-Jul-2015

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scriptclub2

Sean Kearney - MCSE, MCTS

Page 2: Scriptclub2

“DA RULEZ, CUZ

WE GOTTA HAVE „EM”

Page 3: Scriptclub2

You always talk about script

club

You always talk about

script club

If someone asks for help, and

you can help, you help

Two people help one person at

one time

Page 4: Scriptclub2

All scripts, all

powershell

Page 5: Scriptclub2

SCRIPTS WILL BE AS

SHORT AS THEY CAN BE

Page 6: Scriptclub2

If THIS IS YOU FIRST TIME AT

SCRIPT CLUB

YOU HAVE TO SCRIPT

Page 7: Scriptclub2

Windows 7 and server2008r2

Powershell I S E

Page 8: Scriptclub2

I S E

Integrated Scripting Environment

Page 9: Scriptclub2

A way to edit AND troubleshoot

Easier way for accessing Help

Better way to see what is THERE

Page 10: Scriptclub2

FOREACH-OBJECT

Allows us to work with INDIVIDUAL parts of a list (Like a Directory)

Page 11: Scriptclub2

READ-HOST

Let’s you READ information from the HOST system (console) and

maybe store it away

Page 12: Scriptclub2

Breakpoints allow you to put “STOPS” in your script for testing

and troubleshooting

Easier way to pull out variables, things don’t just “Run By”

Page 13: Scriptclub2

“LET’S SCRIPT!”

Page 14: Scriptclub2

DEMO

“Powershell ISE!”

Page 15: Scriptclub2

Powershell ISE – Built into Windows 7 and Server 2008R2 part of Powershell V2

RC of Powershell V2 is Downloadable for Windows XP / Server 2003 / Vista / Server 2008

BEFORE you can make Breakpoints, you have to save the script with a name at least once.

F9 or RIGHT CLICKING and choosing “TOGGLE BREAKPOINT” turns a Breakpoint ON or OFF. TURNS LINE SOLID RED

RIGHT CLICKING and choosing “DISABLE BREAKPOINT” leaves a Breakpoint available but ignored

F5 Runs the Script, and Continues past Breakpoinits

You can assign almost ANYTHING to a variable in Powershell just by preceding the name of the variable with a “$”

$BIGPILEOFSTUFF=GET-CHILDITEM, $OTHERTHING=‘MyName’

You can step through most items in a list using FOREACH-OBJECT, Once those items are in your hand you can manipulate and work with them on a much more granular level

GET-MEMBER can tell you a LOT about a Variable or almost ANYTHING in Powershell, Use IT and Abuse IT

The Period “.” allows you to step into smaller pieces of a variable

Page 16: Scriptclub2

Powerscripting Podcast – Weekly Podcast, Free, Live Broadcast weekly

www.powerscripting.net

Powershell Community – Online resources from across the world on Powershell

www.PowershellCommunity.ORG

Powershell on MSDN – Home Page of the Powershell Team

blogs.msdn.com/powershell

BING – Search for Powershell and Free Resources – There’s a LOT

www.bing.com

Page 17: Scriptclub2

Sean Kearney

“The Energized Tech”

EMAIL: [email protected]

TWITTER: TWITTER.COM/YE110WBEARD

www.energizedtech.com

ye110beard.spaces.live.com

www.itprotoronto.ca

“Powershell. It’s so Easy and it’s Free.”

Highway to Powershell