Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all 3333 articles
Browse latest View live

Expert Commentary: 2012 Scripting Games Advanced Event 1

$
0
0

Summary: IT Pro, Trevor Sullivan, provides expert commentary for 2012 Scripting Games Advanced Event 1.

Microsoft Scripting Guy, Ed Wilson, is here. Trevor Sullivan is the expert commentator for Advanced Event 1.

Photo of Trevor Sullivan

Trevor Sullivan is a pursuer of all types of knowledge, and is particularly passionate about technology and technical communities. He has been working primarily with Microsoft solutions since 2004. Trevor has received public recognition from Microsoft for his contributions to the Windows PowerShell community, and he has also written several guest blogs for the Hey, Scripting Guy! Blog. One of his more notable achievements is the release of the PowerEvents module for PowerShell, which is available on CodePlex. 

For the 2012 Scripting Games Advanced Event 1, we have a script that is supposed to monitor whether Notepad is running. Now, you may or may not agree that Notepad is a mission critical app, and if it is, maybe it should not be—but that is not for us to decide unfortunately. It seems that the fictional know-it-all character in our scenario may need some directional advice on his scripting skills.

After analyzing the sample code, we can see that the “notepad” process is being assigned to a variable called $notepad. If the notepad process does not exist, he would receive an error message from the Get-Process cmdlet along the lines of: “Cannot find a process with the name notepad.” When this is done, the code iterates ten times with the following commands: sleep for one (1) second, and echo the value of the $notepad variable to the Windows PowerShell pipeline.

This code appears to be intended to throw an error if the critical process “notepad” does not exist during any of those ten iterations. However, this is not what will occur. Because the $notepad variable is only being assigned once at the beginning, any value that is contained within it will persist even after the notepad process ceases to exist.

To correct this problem, we need to ensure that we are repeatedly checking for the existence of the notepad process. We can achieve this most simply, by moving the line with the call to Get-Process inside the For looping construct.

    for ($i = 1 ; $i -le 10 ; $i++) {

        $notepad = Get-Process notepad;

        start-sleep 1

        $notepad

    }

You might notice that this code will still throw an error when the Get-Process cmdlet is called, if the notepad process does not exist. Because this may be unnecessary for achieving the desired results, we can suppress the error message only for the one command. To do this, we use the ErrorAction parameter of the Get-Process cmdlet, and set it to SilentlyContinue. You can alternatively achieve this by setting the built-in $ErrorActionPreference variable to the same value.

    for ($i = 1 ; $i -le 10 ; $i++)

    {

        $notepad = Get-Process notepad -ErrorAction SilentlyContinue;

        start-sleep 1

        $notepad

    }

This concludes our analysis of the 2012 Scripting Games Advanced Event 1. Thanks for participating in the Microsoft Scripting Games for 2012, and best of luck to you!

~Trevor

Guest Commentator Week will continue tomorrow when we will see what the next guest commentators have to say about Event 2 in the 2012 Scripting Games.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy


Scripting Wife Gives Hints for Beginner Event 9

$
0
0

Summary: Scripting Wife provides hints for 2012 Scripting Games Beginner Event 9.

I was going to write this tomorrow, but then I am going to meet up with some friends for breakfast and shopping, so I will get my hints that I completed today. I was up rather late last night finishing writing all of my entries for all the events, then I got them submitted this morning. I am officially finished with the 2012 Scripting Games. I am looking forward to seeing what the experts did with my events. I liked Dr. Thomas Lee’s write up—probably because his solution looked a lot like the solution I submitted. I guess a big part of learning from the games is seeing what others did and comparing it with your own work.

I did not think that Beginner Event 9 was too complicated. The hardest part of the event occurred if you did not actually have an event 10001 entry on your computer. I did, and therefore I had no problem. Luckily, DavidW posted a comment about Beginner Event 9 that told how to generate a 10001 error message. He said to restart the computer while Notepad was running, and when the computer asks you if you want to save your data, hit Cancel, and then tell the computer to perform a force quit. When you do this, you should get the error message.

Searching an event log for the 10001 event log entry was not too hard. I sent the results to Format-List with a * and the –force parameter so I could look at information that was returned. This helped me find the property that contained the information about applications that are attempting to veto the shutdown.

I hope this helps.

~Scripting Wife

Hints for Beginner Event 10 by the Scripting Wife

Beginner Leaderboard of the 2012 Scripting Games After 6 Days

$
0
0

This is the Beginner leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Beginner Events

User Name

Total Points

Scripts Rated

Total Ratings

Mike F Robbins

29.05

6

19

Charlie Jacobson

28

6

16

Dawn Villejoin

27.88

6

20

Adam Funck

27.75

6

15

NGelotte

27.67

6

13

Sahal Omer

27.67

6

12

wschoier

27.67

6

11

Zak Humphries

27.58

6

15

Chris Manning @pbchris

27.33

6

16

Nathan Mayberry

27.17

6

12

Srikanth

27

6

17

David OBrien

27

6

13

ruskie

26.92

6

15

arnold moreno

26.87

6

15

Andy Bidlen

26.67

6

14

Eric Pankowski

26.5

6

15

ICC_jruff

26.33

6

12

ngebhar2

26.33

6

15

Nadeem Vance

26.33

6

13

yellowscope

26.17

6

17

nyoro2

26

6

11

Michael Moore

26

6

13

Andy Mello

26

6

15

Mark P

26

6

16

clbarnett

26

6

16

Maciej

26

6

16

Carl

25.92

6

19

James McNeil

25.92

6

14

Dave Maldonado

25.92

6

12

JoeTea

25.75

6

13

DrLe

25.75

6

17

SLevenberg

25.67

6

13

JeffWouters

25.63

6

23

andre

25.5

6

15

Mr_Motown

25.42

6

17

ScriptingWife

25.42

6

18

AmandaD

25.42

6

15

qsilverx

25.4

6

17

Paul Hiles

25.33

6

14

Grzegorz Kulikowski

25.33

6

13

Eleftheria Theologou

25.27

6

15

Cliff Harrison

25.25

6

16

Derek Schauland

25.17

6

14

ICC_mworthley

25.17

6

17

NCoppersmith

25.17

6

14

Julie Andreacola

25.08

6

14

Jordan Davis

25.08

6

16

honeybadger

25

6

13

Jhonny Yamaniha

24.92

6

17

Oleg Suchkov

24.9

6

15

Steve Hall

24.83

6

12

Neil Clinch

24.75

5

11

Tim Watson

24.7

6

17

Don Hunt

24.67

6

15

Shevek

24.67

6

13

James Berkenbile

24.67

6

16

Joshua Taylor

24.6

6

17

eklime

24.58

6

15

Vinay Bhandari

24.58

6

14

James White

24.5

6

19

Chris-D

24.5

6

14

SM Yeoh

24.5

6

13

Nathan Lare

24.5

6

13

Brian Bohanon

24.5

6

16

AballahSonDis

24.5

6

14

TechguyTJ

24.5

6

17

emekm

24.5

6

13

MikeHowden

24.42

6

13

Thiyagu

24.33

5

9

Dexter Dhami

24.25

6

13

Lotte

24.17

6

15

Matt benton

24.17

6

13

Daniel Killian

24.17

6

15

tyoung

24

6

16

David Waderich

23.83

6

13

Lido Paglia

23.75

5

13

Duffman

23.75

6

17

James Stallwood

23.75

6

16

Steven Neel

23.67

5

9

CraigJahnke

23.67

6

14

GCaporale

23.58

6

17

Mouton

23.58

6

16

Sigitas Grėbliūnas

23.5

5

11

ckrull

23.5

6

18

Andreas Engkvist

23.5

6

14

Werner

23.42

6

17

Andrew Morgan

23.42

6

15

Max Schnell

23.33

5

11

NakiPS1

23.33

6

17

Brian Sabatini

23.33

6

15

Jason Omar

23.25

6

18

Matt Tilford

23.17

6

16

Fabio Jr

23.17

6

13

Jeremy Cox

23.17

6

14

BradC

23.17

6

15

mark_@_li

23.17

6

12

Gica

23.15

6

16

BTmuney

23.08

6

16

John Grenfell

23.08

6

13

Alexis Ragual

23

5

12

jaydee

23

6

14

BernhardG

23

6

13

Jon McCormick

23

6

16

mvanhorenbeeck

22.92

6

16

Tim Muessig

22.92

6

17

Geathan

22.87

6

15

Ifiok Moses

22.83

6

16

Mathieu Boulard

22.75

5

15

JeremyB

22.75

6

16

cemarsh06

22.67

6

15

L4NM4N

22.67

6

15

Scott Baker

22.58

6

16

dluke001

22.58

6

15

Norman Manoh

22.5

6

13

TSCSG

22.5

6

14

Daniel Thompson

22.33

6

16

SdeDot

22.33

6

16

Chris Seiter

22.33

6

12

Pradeep Rawat

22.17

6

17

John Russell

22.17

6

15

Ken Wilson

22.17

6

18

ICC_RichardEisenberger

22.08

6

17

Matt Swint

22.08

6

16

blahcubed

22

5

9

mtb44

22

6

15

rumart

22

6

17

Yves PASCAULT

22

6

13

Scott Alvarino

22

6

14

DaveyK

21.92

6

17

Dan

21.92

6

14

member2712

21.83

6

14

eribaq

21.77

6

17

jarheadf23

21.75

6

13

Robert B

21.67

6

16

Jess Pomfret

21.67

6

14

aalaminos

21.58

6

15

Daniel Bicho

21.58

6

16

BenJT

21.5

6

16

Xander Solis

21.5

6

17

Tony Rad

21.5

6

17

AnotherPoShBlog

21.4

6

15

Shawn Melton

21.33

5

12

Dennis James

21.33

5

9

Nisha Sridhar

21.33

5

10

Elmerp

21.33

6

12

Chris Keim

21.33

6

14

Mads Hjort Larsen

21.33

6

15

Jason Y.

21.33

6

16

John OHarra

21.32

6

18

Shaun Watts

21.25

6

15

Andrey Zvyagin

21.25

6

14

catremor

21.25

6

14

MarkIsBack

21.17

6

16

Erica Miles

21.17

6

16

real fastcomputer

21

6

12

The Awesome-Machine.NET

21

6

14

Tony Uren

21

6

13

Phill McSherry

20.83

6

17

David Christian

20.83

6

15

Steve Mahoney

20.75

6

14

Sidewinder

20.67

6

15

Tyson J. Hayes

20.67

6

12

Rich Oswald

20.67

6

13

Kieran Walsh

20.67

6

12

John

20.6

5

12

W. Sterling

20.5

6

15

Trevor Watkins

20.5

6

15

something easier to read

20.5

6

15

Matt McAllister

20.5

6

15

shiv

20.42

6

15

Dominic Leonard

20.42

6

13

ICC_KFoley

20.33

6

17

Will Nevis

20.25

6

17

Megha Kuruvilla

20.17

5

11

Aaron Bednar

20

5

13

mrgif1

20

5

8

Daniel Dittenhafer

20

6

14

Kryten-68

20

6

16

BreakDown

20

6

19

Luke Forder

19.92

5

16

Wouter Beens

19.92

6

14

Leon Nell

19.83

6

17

Derrick Michelson

19.83

6

14

Clancy Wendt

19.83

6

15

Zia

19.83

6

15

Marty

19.8

5

13

Marcin Pietras

19.67

4

9

Riwe

19.67

6

15

jones89

19.25

6

16

Stephen Correia

19.17

5

11

HitchHeik

19.17

6

15

Mooseade

18.8

5

14

vNiklas

18.75

5

13

Sai Prasad Vaddepally

18.33

5

11

Clayton McKenzie

18.25

6

17

Daniel Headley

18.17

5

10

toumi walid

18.17

6

18

cphair

18

4

6

NSlearningPS

18

5

10

Joe Keohan

18

6

13

aaron d

18

6

14

Timo Skupin

17.83

6

18

Stephen Brown

17.67

5

10

Nate Shepard

17.67

6

13

John van Leeuwen

17.58

6

14

Andrew Dauncey

17.33

5

10

octavmarius

17.17

4

10

Roy M

17.17

5

12

jbrek

16.83

5

12

therceg

16.67

5

11

Bastien B

16.58

5

15

mand0

16.33

4

9

Shawn bequette

16.33

5

11

Mod10

16.25

6

16

Vern Anderson

16.17

6

14

oki

16

4

7

Emil Eriksson

16

5

12

Pendrag

15.5

4

7

MOW

15.5

5

10

Chuck Lathrope

15.27

5

12

Vinay Thakur

14.83

6

15

266ff21a196fda47d8b035a115fdeb42

14.75

4

10

e46d8dd2e1625c7a6182b82bc012a7e0

14.5

6

16

erunama

14.33

6

15

Colyn1337

14

3

4

Marcos Tsuda

13.92

5

11

Daniel Snowden

13.42

4

11

robert broyles

13.33

4

9

lamaar75

13.33

5

13

ResetSA

13.33

5

11

TheKidd

13

3

4

Niel Fletcher

13

4

9

Brian Fraley

12.92

4

11

Matt Vidrine

12

3

8

Jeff Schulman

12

3

7

Japke

11.5

4

11

Chris Albert

11.33

3

6

Richard Holman

11

3

5

Patrik Lindström

10.5

3

9

Bret Ridenour

10.5

4

12

Hov Arve

10.17

4

9

EDW

10

3

5

Shaun Gibbs

10

4

9

Mckie

9.47

4

12

joeartz

9

2

6

Darren Maspero

9

2

8

Peter Heydon

8.92

2

7

Tim Miller

8.58

3

10

DWS

8.42

2

7

Dennis Jarjosa

8.42

2

7

plindgren

8.42

3

11

Yuri Kutovoy

8.42

3

11

Matt_A_

8.42

3

9

lvimeux

8.33

2

6

Jan R.

8.33

2

6

Arif Ali

8.33

3

10

Anders Wang

8.33

3

6

Jerame Caudill

8

2

6

Thomas Farmer

8

2

6

TomKupka

7.92

3

10

sfibich

7.75

2

7

Francisco Puig Diaz

7.75

3

11

Bryan

7.67

2

4

Mark Amann

7.67

2

6

Forrest Stanley

7.67

2

6

Name

7.6

3

10

Tomek A.

7.5

2

8

MarcoB78

7.42

2

7

TaylorGibb

7.4

2

8

Kevin

7.33

3

8

Michael Odermatt

7.08

2

7

Jeffrey Jacobs

7

2

6

Clinton Merritt

7

2

5

Greg Combs

7

3

7

Sander

6.83

2

7

Scott Button

6.83

2

7

Tom Parker

6.67

2

6

kloinerFeigling83

6.58

3

9

Paul Sweeney

6.5

2

4

u2tb

6.33

2

6

Clayton Firth

6.25

2

7

Jeff Maes

6

2

6

Harshul

6

2

3

ed3c64f9163ea026e949706ee53b2a34

6

2

3

sebuko

5.75

2

6

greeme

5.67

2

6

Apnea

5.67

2

6

Satheesh

5.67

2

7

Timm Brochhaus

5.5

2

6

Jonny Earl Grey Lindbom

5.47

2

8

radek

5.42

2

7

Josh Nylander

5.42

2

7

TheZmann

5.33

2

4

Dave Baird

5.33

2

6

RJSN

5.33

2

4

DisplayName

5.33

2

5

Anthony Rum

5.25

2

7

Mike Lambert

5.25

2

7

vbscripter

5

1

1

Andrew Cameron

5

1

3

Dean Grant

5

1

3

Andy Wyse

5

2

7

Brian Wuchner

5

2

8

Joel Cook

5

2

6

Mallika Gogulamudi

5

2

8

acchong

4.75

1

4

Sudeep Bhaskar

4.5

1

4

Ken King

4.5

1

2

Petter Edin

4.33

2

6

Andrew Gardner

4.25

1

4

Jason Schmidtlein

4.25

1

4

Ryan Youngs

4

1

3

zacd

4

1

3

Claymonster

4

1

3

Francisco osorio

4

1

3

Filip Rejch

4

1

2

James B. Bizzell

4

1

2

Jay Lockard

4

1

3

evidence

4

1

3

Pavan Hotha

4

1

3

PSLearner

4

2

6

peter bishop

4

2

8

Björn

4

2

2

Dominic Daigle

3.85

2

9

Ola Skjeldal

3.67

1

3

Tim Hetzel

3.67

1

3

Brett Chandler

3.67

1

3

Chris Watson

3.67

2

5

Bob__Mule

3.5

1

4

Brendan Erofeev

3.5

1

4

sgatepunk

3.5

1

2

ocongil

3.33

1

3

Jasper van der Heijden

3.33

1

3

Tobias

3.33

1

3

70f53217af68ac357dfc1a46739257a6

3.33

1

3

MonitorMan

3.33

1

3

iTodd

3.33

1

3

Jonathan Birkett

3.33

1

3

redi311

3.33

1

3

Dexter

3.33

2

6

b4d93r

3.33

2

5

jeprus

3.25

1

4

Jakob Bindslet

3

1

3

skynetx

3

1

3

Crystal Diaz

3

1

3

Jude Croyle

3

1

3

Andrew Newman

3

1

3

mitch baker

3

1

3

MrBatchFile

2.67

2

6

Coderaven

2.33

1

3

Jeremy Dunlop

2.33

1

3

a64c64bd8e1fe90b8b024ab272090e32

2.33

1

3

Daed

2.33

1

3

Jay mac

2.33

1

3

Byty

2

1

3

Nico

1.75

1

4

3166f9ba33499b4658123e7b0a84598f

1.67

1

3

Luca Christmann

1.67

1

3

le4ne

1.5

1

4

Sean Massey

1.33

1

3

David Granlund

1.33

1

3

Anjan Chidurala

1.33

1

3

Chris Nakagaki (Zsoldier)

1.33

1

3

2e638c99ea54b4ddb208033083f4ef24

1.33

1

3

Gabriel Tapia

1.33

1

3

Marcin Kowalczyk

1.33

1

3

j.vogt

1.33

1

3

TitleRequired

1.33

1

3

John Main

1.33

1

3

Jason Shaw

1.25

1

4

Eric Ray

1.25

1

4

Gary Jackson

1.25

1

4

gary gray

1.2

1

5

TechJLS3

1

1

5

JMARCH

1

1

1

Benduru

1

1

1

WizardX

1

1

5

Jeremy Kieler

1

1

3

Advanced Leaderboard of the 2012 Scripting Games After 6 Days

$
0
0

This is the Advanced leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Advanced Events

User Name

Total Points

Scripts Rated

Total Ratings

KSchulte

23.33

5

8

Sergey Borisovich

22

5

10

Prosvetov Roman

21.83

5

10

Aleksey Shuvalov

21.33

5

9

Mikko

20.17

5

9

BigTeddy

20

5

9

Mike Hammond

19.17

5

8

Ryan Ries

19

5

9

Michał Gajda

18

4

7

Glenn Faustino

17.42

4

9

Igway Jacobs

16.5

4

6

Scott1138

16.5

4

6

Ed Withers

16

4

7

Tomek Izydorczyk

15.83

4

7

Jason Stangroome

15.67

4

8

Serg

15.5

5

10

Jack Chang

15.33

4

8

John Sneddon

15

4

6

Nathan Linley

15

4

8

gbdixg

14.67

4

7

ICC_RyanDennis

14

4

8

vNoob

14

4

9

Albert Fortes

13.33

3

5

Jeremy Caauwe

12.5

3

6

SimonW

12.33

3

7

Rob Campbell

12.33

3

7

aml

12.17

4

7

Francis D

12

3

5

ScripterJT

12

3

5

Paulo J

11.83

4

7

George Kesler

11.75

3

7

EasyMac308

11.75

3

7

Cameron Wilson

11.75

4

8

Serkan Varoglu

11.67

3

6

Matthew Graeber

11.67

4

7

Nuno Mota

11.5

3

5

Lars Seinwill

11.5

3

6

Łukasz Kałużny

11.5

3

5

Ayo Wu

11.5

4

7

Kyle Neier

11

3

4

Matthew BETTON

10.5

3

5

Frederick Duemig

10.5

3

5

Trevor Hayman

10.17

3

6

Martijn Haverhoek

10

2

4

Michael Moore

10

3

5

Vladimir Stepic

10

3

5

Rich Kusak

10

3

4

Vincent Van Hecke

10

3

5

Jason Wood

9.67

3

5

james seatter

9.5

3

8

Rohn Edwards

9

2

3

DamienCharbonnel

9

3

5

Michael Topal

9

3

5

Ken Lin

9

3

5

J Skiba

8.5

2

3

Tim Parkinson

8.5

2

3

Sam

8.5

3

4

Jason Scott

8

2

3

Matthew Painter

8

2

3

Jason Cole

8

2

4

DJ Grijalva

8

2

4

Ryan C

8

2

5

Kevin Hopcroft

7.67

2

5

Kiss Tamás

7.67

2

5

Jaap Brasser

7.67

2

5

Jason Lange

7.5

2

3

Tom_G

7.5

2

3

Daniel Howe

7.5

2

3

Grégory LUCAND

7.5

2

4

Sergey Vorontsov

7.5

2

4

sstranger

7.5

2

4

Jesper Strandberg

7.5

2

3

Billy Angers

7.5

2

3

Wes Stahler

7.5

2

3

Jason Hofferle

7.5

2

3

Peter Heydon

7.5

2

4

AaronHoover

7

2

3

Brent Challis

7

2

3

Max Lindström

7

2

6

marcadamcarter

7

2

3

Thomas Paetzold

7

2

4

_Emin_

7

2

4

Joe D.

7

2

3

Daniel Cruz

7

2

4

Stephanevg

7

2

3

Tom Parker

6.83

2

5

Carlos Nunez

6.67

2

5

PeetersOnlineNL

6.67

2

5

Yves P

6.5

2

3

Alex McFarland

6.5

2

3

Robert Mongold

6.5

2

4

Brian Wilhite

6.5

2

4

Brad Blaylock

6.5

2

4

Jeff Patton

6.25

2

6

ICC_RDurkin

6

2

3

Franck RICHARD

6

2

4

UGSING_MattHitchcock

6

2

4

Sean Decker

6

2

4

Sean Brown Houses

6

2

3

Ken Hamilton

6

2

7

Pete Maan

6

2

4

MattBoren

6

2

3

Robert Eder

6

2

4

Patrik Lindström

5.67

2

6

Paul Cunningham

5.67

2

4

Internal_IT

5.5

2

4

MSFT-AutomationJason

5.5

2

3

Calle E

5.33

2

6

Jon Bryan

5.17

2

5

Dave Griffiths

5

1

2

266ff21a196fda47d8b035a115fdeb42

5

1

1

Mark Weaver

5

1

2

Brian Carr

5

2

4

Joshua Feierman

5

2

4

Yuri Kutovoy

5

2

6

Dan Jakubczak

5

2

3

JeremiahC

5

2

3

Kim Tram

5

2

3

Cesar Mendoza

4.83

2

5

f2b95d1a805fd4f8623b0d70b6ed3a19

4.67

2

5

Ken

4.5

1

2

Brandon Bettle

4.5

2

3

AZPOSH - Brian T Young

4.5

2

3

blindrood

4.5

2

5

Damon Brinkley

4.5

2

4

Anthony Rum

4.33

2

5

ICC_JDyer

4.33

2

4

Anders Wang

4

1

1

Paul Iddon

4

1

2

Anonimista

4

1

2

jillwi

4

1

3

Cameron Ove

4

1

2

T-Bone

4

1

2

Tobias

4

1

2

Scripting Scott Saari

4

1

2

Jose Quinones

4

1

2

Claudiu P

4

1

2

smoshea

4

1

2

Jimmy Mac

4

1

1

Warpig

4

1

2

Justin Sowa

4

1

2

Fredrik Wall

4

2

7

Justin Stokes

4

2

3

Schlauge

4

2

5

Stijn Callebaut

4

2

3

hemanth.damecharla

4

2

3

Pemo

4

2

4

Clinton Merritt

3.67

1

3

Mr grnnnx

3.67

1

3

Dan Richardson

3.67

1

3

MSFTW

3.67

1

3

herschelle

3.67

1

3

jeffrey yao

3.67

1

3

Steelwing

3.67

1

3

Chris Oswalt

3.5

1

2

Wolfgang Kais

3.5

1

2

PeterCS

3.5

1

2

Tony McGee

3.5

1

2

Clint Bergman

3.5

1

2

Joel Reed @J_lR_d {AZPOSH}

3.5

1

2

Wayne Gault

3.5

1

2

Yuriy Prikhodko

3.5

1

2

John Main

3.5

1

2

Matt Gohmann

3.5

1

2

Ryan Schlagel

3.5

1

2

Brian Wuchner

3.5

1

2

resolver101

3.5

1

2

Greg Martin

3.5

1

2

IJuan

3.5

1

2

BurntChimney

3.5

1

2

Claus Søgaard

3.5

1

2

Chris Stewart

3.5

1

2

Oneill Cameron

3.5

1

2

SassDawe

3.5

1

2

Joshua Fuente

3.5

1

2

PatrikL

3.5

1

2

jessekozloski

3.5

1

2

ThoamsBiebl

3.5

1

2

Frank Peter Schultze

3.5

1

2

MarkJohnson

3.5

1

2

Patrick Dorsch

3.5

1

2

Miruu

3.5

1

2

Ryan Shafer

3.5

1

2

redi311

3.5

1

2

Bob__Mule

3.33

1

3

Josh

3.33

1

3

kiran reddy

3

1

3

Kerry Boomsliter

3

1

1

Robert van den Nieuwendijk

3

1

2

Chris Brown

3

1

2

Jacques

3

1

2

Mike Lambert

3

1

2

crownedjitter

3

1

2

Dexter

3

1

2

David Eilers

3

1

2

Kirk Cessac

3

1

2

Robert de Britto

3

1

2

Gregg Britton

3

1

2

ofirey

3

1

2

Erin Huligan

3

1

2

Matthew Vidrine

3

1

2

ginno

3

1

2

Tom Moser

3

1

2

Frank Migacz

3

1

2

Scripting Scott Saari

3

1

2

Greg Shay

3

1

2

Jiri Formacek

3

1

2

Zach M

3

1

2

Jonny Earl Grey Lindbom

3

1

3

Jakob Bindslet

3

1

3

Jason Milczek

3

2

3

David Blackmore

3

2

3

dude9000

2.5

1

2

Dan Lepine

2.5

1

2

James Tryand

2.5

1

2

Perry Harris

2.5

1

2

Claudio Westerik

2.5

1

2

Chris Duck

2.5

1

2

Eddy Steenbergen

2.5

1

2

Will Steele

2

1

4

Nathan Cook - AU

2

1

2

Dave Ackroyd @LearnPowerShell

2

1

4

Franck Malterre

2

1

2

Marcin Kowalczyk

2

1

2

BobMule

2

1

2

Brentos

2

1

2

skynetx

2

1

2

845ebf71ea404155b02971a5b6e8bc8d

2

1

2

jcriswell

2

1

2

WizardX2

2

1

2

Dustin Hedges

2

2

3

Luca Christmann

1.67

1

3

Rob Dowell

1.5

1

2

El Ryan

1.5

1

2

mand0

1.5

1

2

TechJLS3

1.5

1

2

Andrew

1.5

1

2

Filip Rejch

1.5

1

2

Daed

1.5

1

2

Jim Vierra

1.33

1

3

Brian T. Jackett

1

1

2

oki

1

1

1

Ákos Kinczel

1

1

2

Hong

1

1

2

Johan Åkerström

1

1

2

Ken King

1

1

2

Valeriy Aksyonov

1

1

2

Jude Croyle

1

1

2

Chris Nakagaki (Zsoldier)

1

1

2

 

Randomly Drawn Prize Winners: 2012 Scripting Games Day 6

$
0
0

Thank you for entering the 2012 Scripting Games. A special thank you to our wonderful sponsors for making these prizes possible. Please be sure to visit the sponsors page for more information about these awesome companies. We will send the prize winners an email with the pertinent information about their prizes soon.

Kyle Neier

1  ebook from O’Reilly Media (ARV $20.00)

Svartvoff

1  ebook from O’Reilly Media (ARV $20.00)

Vincent Van Hecke

1  ebook from O’Reilly Media (ARV $20.00)

SM Yeoh

1  ebook from O’Reilly Media (ARV $20.00)

NCoppersmith

1  ebook from O’Reilly Media (ARV $20.00)

Matthew Painter

1 ebook from Manning (ARV $40.00)

Daniel Cruz

1 ebook from Manning (ARV $40.00)

Chris Keim

1 ebook from Manning (ARV $40.00)

Clancy Wendt

1 ebook from Manning (ARV $40.00)

Duffman

1 ebook from Manning (ARV $40.00)

BernhardG

1 each Amazon Gift ecard from BeyondTrust (ARV $50.00)

Robert B

1 copy PowerWF from Devfarm Software (ARV $499)

Sean Brown Houses

1 copy PrimalScript 2011 Studio from SAPIEN Technologies (ARV $599)

 
2012 Scripting Games badge

Scripting Wife gives hints for beginner event 8

$
0
0
We just returned home from the SQL Saturday event in Atlanta. It was a great time, but it kept me busy. Just prior to the speakers dinner we met up with a couple of people from the Charlotte PowerShell Users Group. It was really fun going off to another...(read more)

Expert Commentary: 2012 Scripting Games Beginner Event 2

$
0
0

Summary: Windows PowerShell MVP, Shane Hoey, provides expert commentary for 2012 Scripting Games Beginner Event 2.

Microsoft Scripting Guy, Ed Wilson, is here. Shane Hoey is the expert commentator for Beginner Event 2.

Image of Shane Hoey

Shane’s scripting experience started when Windows XP was the new kid on the block, and he soon found himself scripting on a daily basis with VBScript, WMI, and ADSI. Fast forward to the Scripting Games 2009—he finally discovered Windows PowerShell, and he has been hooked ever since. One of the things he likes most about Windows PowerShell is its ability to easily automate tasks.

Twitter: @shanehoey 
Aussie PowerShell Usergroup

I often talk to IT Pros who are starting to learn Windows PowerShell, and one of the first things I always say is, “Don’t overthink Windows PowerShell, it’s a shell first and foremost, so learn to use the shell first and scripting will naturally follow.” In fact, not everything needs to be made a script! And Scripting Games 2012 Beginner Event 2 is a perfect example.

When I first read the event scenario, I thought, did I miss something? There has to be a trick. Let’s break it down to what we need to do…

  1. We only have to find all services that can be stopped, we don’t even need to shut down the computers yet.
  2. No need to have a second computer to run against, which is good because I’m writing this post on the bus. So when I mention LocalHost, you could in fact be running it against a remote machine.
  3. No need to test firewall connections.
  4. Use the simplest command that will work.
  5. Display the output to the screen.
  6. Can use standard aliases.

It’s only Beginner Event 2, and many of you are new to Windows PowerShell, so now is a good time to remind you the importance of using Get-Help, Get-Command, and Get-Member.

The first command I will run is get-help get-service –online to open the Get-Service Help topic. Have a quick read of the topic to familiarize yourself with the cmdlet, and always make sure that you look at the examples because they can help us out.

Remember Windows PowerShell is object-orientated so when a cmdlet returns something, it always returns an object. We can use Get-Member to learn about more these objects, and the methods and properties that relate to the object. So I run the Get-Member cmdlet, and as you can see in the following command output, I quickly find out that I can use the CanStop property.

Image of command output

From running these two cmdlets, we now have all the information to get the results we need, so I run the following command:

Get-service –computername localhost | where-object {$_.canstop}

One of the design points in this event mentions that we can use aliases, so by using the Get-Alias cmdlet, I can determine each cmdlet’s alias. But a word of advice—don’t use aliases in scripts, especially when you are sharing those scripts, because aliases can be changed. If I use aliases, the command and the associated output look like this:

gsv –c localhost | ? {$_.canstop}

Image of command output

Based on the requirements, it looks like we have winner! But what if we want to obtain details on multiple servers? A simple addition to our command is to use parentheses, which will force the command it contains to execute first. An easy way to explain it is think of two maths equations: 5 * 5 +1 = 26 versus 5 * (5 + 1) = 30. Parentheses work exactly the same in Windows PowerShell.

gsv –c (gc servers.txt) | ? {$_.canstop}

For a final step we could format the output into something a bit more readable. For the purposes of this event, I don’t think this is needed; but it’s easy enough, so let’s do it.

gsv –c (gc servers.txt) | ?{$_.canstop} | sort machinename | ft –groupby Machinename

It can’t be this easy, can it? I wonder if the Scripting Guy is trying to trick me! I better check the 2012 Scripting Games Study Guide.

So could we use WMI?  You bet we can! And the Scripting Guy mentions using WMI in his Study Guide. To get the similar results we would need to a command similar to this:

gwmi win32_service –comp localhost –filter “AcceptStop=$true” | FT state,Name,DisplayName

That’s cool, but this really does not meet our design criteria of running the simplest command that works. However, it does prove that there are many ways to do the same thing in Windows PowerShell.

We are almost finished, but before we go I want to make you aware of one last important feature in Windows PowerShell: pipeline parameter binding. From the Help page we opened earlier, you should be able to see that some parameters can accept the input of pipeline attributes ByValue and ByPropertyName. These parameters include ComputerName (ByPropertyName), InputObject (ByValue), and Name (ByPropertyName, ByValue).

Over at the PowerShell with a Purpose Blog by Don Jones, he discusses pipeline parameter binding in more detail, so I recommend that you read these blogs:

I’ve shown you two ways to get the required results for Scripting Games 2012 Beginner Event 2, and hopefully I have shown you why sometimes running a simpler command is best!

~Shane

2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 3.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy 


Expert Commentary: 2012 Scripting Games Advanced Event 2

$
0
0

Summary: Microsoft community contributor, Boe Prox, provides expert commentary for 2012 Scripting Games Advanced Event 2.

Microsoft Scripting Guy, Ed Wilson, is here. Boe Prox is the expert commentator for Advanced Event 2.

Photo of Boe Prox

Boe is currently a senior systems administrator with BAE Systems. He has been in the IT industry since 2003, and he has been working with Windows PowerShell since 2009. Boe looks to script whatever he can, whenever he can. He is also a moderator on the Official Scripting Guys Forum. Check out his current projects published on CodePlex: PoshWSUS and PoshPAIG.

Blog: Learn PowerShell | Achieve More
Guest posts on Hey, Scripting Guy! Blog
Twitter: @proxb

This is an event that relates very nicely to something that would be done in the “real world.” Tracking your services on each server is something that should be done daily to ensure that everything is working normally and to make sure that there are no anomalies occurring.

This event requires us to perform a query against local and/or remote servers to pull back all of the services and write out the data to a CSV file. This is definitely a job for Windows PowerShell!

Requirements

This event is not without requirements to give you more of a challenge, so let’s take a look at the key requirements:

  • You need to present your findings in a spreadsheet that includes the following information: the server name, the service name, the start mode of the service, the user account used to start the service, and the current status of the service.
  • You should use the easiest method possible to display the information in a spreadsheet.
  • You must include the ability to run the script on a local computer and on a remote computer.
  • You must include the ability to run the script with alternate credentials when operating against a remote computer, and you should impersonate the logged on user when running locally.
  • You do not need to add comment-based Help for this scenario, but additional points are awarded if you do include appropriate comment-based Help such as the description, examples, and parameters.
  • If the script requires admin rights to run, you should check to ensure that the script is running with admin rights. If those rights are not present, you should display an appropriate message and exit.
  • For the purposes of this exercise, do not write a module. You should make your script completely standalone and have no external dependencies. Therefore, everything needed should be put in this script. Failure to do so will cost you points.

Now that we know what is required for this script, we can begin to dive into the code and see what is going on. I will take the code apart in chunks to explain what I am doing and point out the areas that meet each requirement in addition to other areas that I feel are worth mentioning. I included some extra features for this script, and I will explain my reasoning behind this when I get to them.

The code

Function Get-ServiceData {

    <#

        .SYNOPSIS

            Command used to find all services with option to write to a CSV File

       

        .DESCRIPTION

            Command used to find all services with option to write to a CSV File

       

        .PARAMETER Computername

            A single or collection of systems to perform the query against

       

        .PARAMETER Credential

            Alternate credentials to use for query of services

       

        .PARAMETER ToCSV

            Name of CSV to write the results of the query to

       

        .PARAMETER Throttle

            Number of asynchronous jobs that will run at a time

           

        .PARAMETER ShowProgress

            Displays the progress of the services query

       

        .NOTES

            Author: Boe Prox

            Created: 14March2012

       

        .EXAMPLE

            Get-ServiceData

           

            Description

            -----------

            Retrieves all services from the local system

           

        .EXAMPLE

            $Servers = 'Server1','Server2','Server3'

            Get-ServiceData -Computername $Servers -ShowProgress

           

            Description

            -----------

            Retrieves all services from the remote servers and displays a progress bar     

           

        .EXAMPLE

            $Servers = Get-Content Servers.txt

            $Servers | Get-ServiceData -ShowProgress -Throttle 10

           

            Description

            -----------

            Retrieves all services from the remote servers while running 10 runspace jobs at a time

            and displays a progress bar to show the status of each runspace job.            

           

        .EXAMPLE

            $Servers = Get-Content Servers.txt

            $Servers | Get-ServiceData -Credential (Get-Credential) -ToCSV (Join-Path $pwd report.csv)

           

            Description

            -----------

            Retrieves all services for each system in the Servers.txt file while using the supplied

            alternate credentials and outputs the data to a CSV file.           

    #>

    #Requires -Version 2.0

    [cmdletbinding(

        DefaultParameterSetName = 'NonCSV'

    )]

    Param (

        [parameter(ValueFromPipeline = $True,ValueFromPipeLineByPropertyName = $True)]

        [Alias('CN','__Server')]

        [string[]]$Computername = $Env:Computername,

       

        [parameter()]

        [System.Management.Automation.PSCredential]$Credential,

       

        [parameter(ParameterSetName = 'CSV')]

        [ValidateNotNullOrEmpty()]

        [String]$ToCSV,

       

        [parameter()]

        [int]$Throttle = 5,

       

        [parameter()]

        [switch]$ShowProgress

    )

If you are going to create an advanced function, you definitely have to have inline Help within that function. This does not mean that you write your own Help function and offer that. It means that you use the Help in Windows PowerShell to accomplish this task. I included examples about how to use this function so others can reference it when trying to run the command.

Also included is [cmdletbinding()], which makes this advanced function advanced by adding extra parameters such as –Verbose and –WhatIf. I also make sure that I add a default parameter value for my ComputerName parameter to point to the local machine if nothing is given. Also, if no file name is given with ToCSV, it will throw an error until a file name is specified.

    Begin {

        #Function that will be used to process runspace jobs

        Function Get-RunspaceData {

            [cmdletbinding()]

            param(

                [switch]$Wait,

                [switch]$ShowProgress

            )

            Do {

                $more = $false        

                Foreach($runspace in $runspaces) {

                    If ($runspace.Runspace.isCompleted) {

                        $Script:Report += $runspace.powershell.EndInvoke($runspace.Runspace) |

                            Select SystemName,Name,State,StartMode,StartName

                        $runspace.powershell.dispose()

                        $runspace.Runspace = $null

                        $runspace.powershell = $null

                        $Script:i++ 

                        If ($PSBoundParameters['ShowProgress']) {

                            Write-Progress -Activity 'Services Query' -Status ("Processing Runspace: {0}" -f $runspace.computer) `

                            -PercentComplete (($i/$totalcount)*100)             

                        }                  

                    } ElseIf ($runspace.Runspace -ne $null) {

                        $more = $true

                    }

                }

                If ($more -AND $PSBoundParameters['Wait']) {

                    Start-Sleep -Milliseconds 100

                }  

                #Clean out unused runspace jobs

                $temphash = $runspaces.clone()

                $temphash | Where {

                    $_.runspace -eq $Null

                } | ForEach {

                    Write-Verbose ("Removing {0}" -f $_.computer)

                    $Runspaces.remove($_)

                }            

            } while ($more -AND $PSBoundParameters['Wait'])

        }

           

        Write-Verbose ("Performing inital Administrator check")

        $usercontext = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()

        $IsAdmin = $usercontext.IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")    

          

        #Counter for Write-Progress

        $Script:i = 0     

       

        #Main collection to hold all data returned from runspace jobs

        $Script:report = @()   

       

        Write-Verbose ("Building hash table for WMI parameters")

        $wmihash = @{

            Query = "SELECT SystemName,Name,StartMode,State,Startname FROM Win32_Service"

            ErrorAction = "Stop"

        }

       

        #Supplied Alternate Credentials?

        If ($PSBoundParameters['Credential']) {

            $wmihash.credential = $Credential

        }

       

        #Define hash table for Get-RunspaceData function

        $runspacehash = @{}

        If ($PSBoundParameters['ShowProgress']) {

            $runspacehash.ShowProgress = $True

        }

        #Define Scriptblock for runspaces

        $scriptblock = {

            Param (

                $Computer,

                $wmihash

            )          

            Write-Verbose ("{0}: Checking network connection" -f $Computer)

            If (Test-Connection -ComputerName $Computer -Count 1 -Quiet) {

                #Check if running against local system and perform necessary actions

                Write-Verbose ("Checking for local system")

                If ($Computer -eq $Env:Computername) {

                    $wmihash.remove('Credential')

                } Else {

                    $wmihash.Computername = $Computer

                }

                Try {

                    Get-WmiObject @wmihash

                    } Catch {

                        Write-Warning ("{0}: {1}" -f $Computer,$_.Exception.Message)

                        Break

                }

            } Else {

                Write-Warning ("{0}: Unavailable!" -f $Computer)

                Break

            }       

        }

       

        Write-Verbose ("Creating runspace pool and session states")

        $sessionstate = [system.management.automation.runspaces.initialsessionstate]::CreateDefault()

        $runspacepool = [runspacefactory]::CreateRunspacePool(1, $Throttle, $sessionstate, $Host)

        $runspacepool.Open() 

       

        Write-Verbose ("Creating empty collection to hold runspace jobs")

        $Script:runspaces = New-Object System.Collections.ArrayList

        $totalcount = $computername.count

    }

The Begin block is pretty meaty but it sets up a lot of the code that will be processed later in the function.

A few of the requirements are covered here with an initial check for Administrator rights and allowing the code to run on a local or a remote system. A gotcha is also presented here because the use of alternate credentials will not work against a local system.

Image of command output

If a local system is included with other remote systems, the alternate credentials are simply removed from the runspace.

Although I do not have time to dive into everything here, I will say that this is where I set up a script block that handles each client computer, use two hash tables for splatting parameters (one for the Get-WMIObject cmdlet and another for a function that will be defined later). I also make use of the [runspacefactory] accelerator that allows me to set up some background runspace jobs and also allows throttling those runspaces, which allows for quicker processing of the queries. I chose this over using the *-Job cmdlets because there is not an easy way to throttle jobs, and this is more of a lightweight method to run jobs in a background runspace.

To quickly jump into an example, the following screenshots show the amount of time it took to run this function by using the background runspaces versus using a more synchronous command, ForEach, against 132 systems.

Get-ServiceData Function

Image of command output

Using ForEach

Image of command output

As you can see, the difference is about 220 seconds. While not a massive amount of time, it is still a nice improvement over the synchronous way using ForEach. Credit for the throttling technique goes to Windows PowerShell MVP, Dr. Tobias Weltner, for his webcast, Speeding Up PowerShell: Multithreading, which explained the use of [runspacefactory] to provide throttling.

        Process {       

        Write-Verbose ("Validating that current user is Administrator or supplied alternate credentials")       

        If (-Not ($Computername.count -eq 1 -AND $Computername[0] -eq $Env:Computername)) {

            #Now check that user is either an Administrator or supplied Alternate Credentials

            If (-Not ($IsAdmin -OR $PSBoundParameters['Credential'])) {

                Write-Warning ("You must be an Administrator to perform this action against remote systems!")

                Break

            }

        }

        ForEach ($Computer in $Computername) {

           #Create the powershell instance and supply the scriptblock with the other parameters

           $powershell = [powershell]::Create().AddScript($ScriptBlock).AddArgument($computer).AddArgument($wmihash)

          

           #Add the runspace into the powershell instance

           $powershell.RunspacePool = $runspacepool

          

           #Create a temporary collection for each runspace

           $temp = "" | Select-Object PowerShell,Runspace,Computer

           $Temp.Computer = $Computer

           $temp.PowerShell = $powershell

          

           #Save the handle output when calling BeginInvoke() that will be used later to end the runspace

           $temp.Runspace = $powershell.BeginInvoke()

           Write-Verbose ("Adding {0} collection" -f $temp.Computer)

           $runspaces.Add($temp) | Out-Null

          

           Write-Verbose ("Checking status of runspace jobs")

           Get-RunspaceData @runspacehash

        }                        

    }

The Process block does just that: processes all of the computers and assigns each computer as a background runspace. More requirements are met here, including the finishing check of Administrator rights if running against remote systems. If there is only a local system and it is the only system in the collection, alternate credentials are not required nor are Administrator rights because any local user can perform a query against WMI. 

    End {                    

        Write-Verbose ("Finish processing the remaining runspace jobs: {0}" -f (@(($runspaces | Where {$_.Runspace -ne $Null}).Count)))

        $runspacehash.Wait = $true

        Get-RunspaceData @runspacehash

       

        Write-Verbose ("Closing the runspace pool")

        $runspacepool.close()       

        If ($PSBoundParameters['ShowProgress']) {

            #Close the Write-Progress bar so it does not affect the displaying of data when completed.       

            Write-Progress -Activity 'Services Query' -Status 'Completed' -Completed           

        }

       

        If ($PSBoundParameters['ToCSV']) {

            Write-Verbose ("Writing report to CSV: {0}" -f $ToCSV)

            $Report | Export-Csv -Path $ToCSV -NoTypeInformation

        } Else {

            Write-Verbose ("Displaying Report")

            Write-Output $Report

        }

    }

}

The End block finishes up the remaining runspace jobs, and depending on what the user chose for output (CSV or no CSV), the function will output the data to the console or write all of the data to a specified CSV file (meeting an important requirement). I chose to use Export-CSV because it meets the requirement for the easiest method possible to create a CSV file. If I was using Windows PowerShell 3.0, I could have thrown this in with the runspace script block and used the –Append parameter to further increase the performance of this function instead of holding all of the data until the end and writing out to the CSV file.

Let’s give it a quick run to see it in action and view the final output.

$Servers = Get-Content .\servers.txt

Get-ServiceStartMode -Computername $servers -ShowProgress -ToCSV "C:\users\boe\desktop\report.csv"

 Image of command output

 

As you can see, all of the data that was required is on the spreadsheet to view.

The script is available to download from the Script Center Repository.

~Boe

2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 3.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy

Advanced Leaderboard of the 2012 Scripting Games After 7 Days

$
0
0

This is the Advanced leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Advanced Events

User Name

Total Points

Scripts Rated

Total Ratings

KSchulte

23.33

5

9

Michał Gajda

23

5

8

Sergey Borisovich

22

5

10

Prosvetov Roman

21.83

5

10

Aleksey Shuvalov

21.33

5

9

Mikko

20.17

5

9

Ed Withers

20

5

8

John Sneddon

20

5

7

BigTeddy

20

5

9

Mike Hammond

19.17

5

8

Ryan Ries

19

5

9

gbdixg

18.67

5

8

Albert Fortes

18.33

4

7

Jeremy Caauwe

17.5

4

7

Glenn Faustino

17.42

4

9

SimonW

17.33

4

8

Nathan Linley

17

5

9

George Kesler

16.75

4

8

Serkan Varoglu

16.67

4

7

Matthew Graeber

16.67

5

8

Scott1138

16.5

4

6

Igway Jacobs

16.5

4

6

Tomek Izydorczyk

15.83

4

7

EasyMac308

15.75

4

8

Jason Stangroome

15.67

4

8

Łukasz Kałużny

15.5

4

6

Lars Seinwill

15.5

4

7

Serg

15.5

5

10

Jack Chang

15.33

4

8

Michael Moore

15

4

6

ICC_RyanDennis

15

5

9

vNoob

15

5

10

Frederick Duemig

14.5

4

6

Martijn Haverhoek

14

3

5

Trevor Hayman

13.17

4

7

Matthew Painter

13

3

4

Kevin Hopcroft

12.67

3

6

Rob Campbell

12.33

3

7

aml

12.17

4

7

Francis D

12

3

5

ScripterJT

12

3

5

DamienCharbonnel

12

4

6

Paulo J

11.83

4

7

Cameron Wilson

11.75

4

8

Nuno Mota

11.5

3

5

Ayo Wu

11.5

4

7

Jeff Patton

11.25

3

7

_Emin_

11

3

5

Kyle Neier

11

3

4

Ryan C

11

3

6

Paul Cunningham

10.67

3

5

Daniel Howe

10.5

3

4

Robert Mongold

10.5

3

5

Matthew BETTON

10.5

3

5

Rich Kusak

10

3

4

Vladimir Stepic

10

3

5

Vincent Van Hecke

10

3

5

Cesar Mendoza

9.83

3

6

Jason Wood

9.67

3

5

james seatter

9.5

3

8

Rohn Edwards

9

2

3

Michael Topal

9

3

5

Ken Lin

9

3

5

J Skiba

8.5

2

3

Tim Parkinson

8.5

2

3

Sam

8.5

3

4

Robert van den Nieuwendijk

8

2

3

Jason Scott

8

2

3

Jason Cole

8

2

4

DJ Grijalva

8

2

4

Ken Hamilton

8

3

8

Jaap Brasser

7.67

2

5

Kiss Tamás

7.67

2

5

Jesper Strandberg

7.5

2

3

Wes Stahler

7.5

2

3

Jason Hofferle

7.5

2

3

Ken

7.5

2

3

Peter Heydon

7.5

2

4

Billy Angers

7.5

2

3

Jason Lange

7.5

2

3

Tom_G

7.5

2

3

Sergey Vorontsov

7.5

2

4

sstranger

7.5

2

4

Grégory LUCAND

7.5

2

4

Joel Reed @J_lR_d {AZPOSH}

7.5

2

3

Daniel Cruz

7

2

4

Joe D.

7

2

3

Stephanevg

7

2

3

marcadamcarter

7

2

3

Thomas Paetzold

7

2

4

AaronHoover

7

2

3

Brent Challis

7

2

3

Max Lindström

7

2

6

Tom Parker

6.83

2

5

Carlos Nunez

6.67

2

5

PeetersOnlineNL

6.67

2

5

Frank Peter Schultze

6.5

2

3

Alex McFarland

6.5

2

3

Yves P

6.5

2

3

Matt Gohmann

6.5

2

3

Brian Wilhite

6.5

2

4

Brad Blaylock

6.5

2

4

Sean Decker

6

2

4

Sean Brown Houses

6

2

3

Pete Maan

6

2

4

Franck RICHARD

6

2

4

UGSING_MattHitchcock

6

2

4

ICC_RDurkin

6

2

3

MattBoren

6

2

3

Robert Eder

6

2

4

Brentos

6

2

3

Patrik Lindström

5.67

2

6

Internal_IT

5.5

2

4

MSFT-AutomationJason

5.5

2

3

Calle E

5.33

2

6

Jon Bryan

5.17

2

5

Dave Griffiths

5

1

2

266ff21a196fda47d8b035a115fdeb42

5

1

1

Lido Paglia

5

1

1

Mark Weaver

5

1

2

Yuri Kutovoy

5

2

6

Joshua Feierman

5

2

4

Brian Carr

5

2

4

Dan Jakubczak

5

2

3

JeremiahC

5

2

3

Kim Tram

5

2

3

f2b95d1a805fd4f8623b0d70b6ed3a19

4.67

2

5

Brandon Bettle

4.5

2

3

AZPOSH - Brian T Young

4.5

2

3

Damon Brinkley

4.5

2

4

blindrood

4.5

2

5

Anthony Rum

4.33

2

5

ICC_JDyer

4.33

2

4

Paul Iddon

4

1

2

Anders Wang

4

1

1

Anonimista

4

1

2

jillwi

4

1

3

Cameron Ove

4

1

2

T-Bone

4

1

2

Tobias

4

1

2

Jose Quinones

4

1

2

Claudiu P

4

1

2

smoshea

4

1

2

Scripting Scott Saari

4

1

2

Jimmy Mac

4

1

1

Warpig

4

1

2

Justin Sowa

4

1

2

Fredrik Wall

4

2

7

Justin Stokes

4

2

3

Schlauge

4

2

5

Stijn Callebaut

4

2

3

hemanth.damecharla

4

2

3

Pemo

4

2

4

Clinton Merritt

3.67

1

3

Mr grnnnx

3.67

1

3

Dan Richardson

3.67

1

3

MSFTW

3.67

1

3

herschelle

3.67

1

3

jeffrey yao

3.67

1

3

Steelwing

3.67

1

3

Chris Oswalt

3.5

1

2

Wolfgang Kais

3.5

1

2

PeterCS

3.5

1

2

Tony McGee

3.5

1

2

Clint Bergman

3.5

1

2

Wayne Gault

3.5

1

2

John Main

3.5

1

2

Yuriy Prikhodko

3.5

1

2

Ryan Schlagel

3.5

1

2

Brian Wuchner

3.5

1

2

resolver101

3.5

1

2

Greg Martin

3.5

1

2

Chris Stewart

3.5

1

2

Oneill Cameron

3.5

1

2

Claus Søgaard

3.5

1

2

SassDawe

3.5

1

2

Joshua Fuente

3.5

1

2

PatrikL

3.5

1

2

jessekozloski

3.5

1

2

IJuan

3.5

1

2

BurntChimney

3.5

1

2

Miruu

3.5

1

2

Ryan Shafer

3.5

1

2

ThoamsBiebl

3.5

1

2

MarkJohnson

3.5

1

2

Patrick Dorsch

3.5

1

2

redi311

3.5

1

2

Bob__Mule

3.33

1

3

Josh

3.33

1

3

kiran reddy

3

1

3

Kerry Boomsliter

3

1

1

Jacques

3

1

2

Mike Lambert

3

1

2

Chris Brown

3

1

2

crownedjitter

3

1

2

Dexter

3

1

2

Kirk Cessac

3

1

2

David Eilers

3

1

2

ofirey

3

1

2

Erin Huligan

3

1

2

Robert de Britto

3

1

2

Gregg Britton

3

1

2

Frank Migacz

3

1

2

Scripting Scott Saari

3

1

2

Matthew Vidrine

3

1

2

cphair

3

1

1

Tom Moser

3

1

2

ginno

3

1

2

Greg Shay

3

1

2

Zach M

3

1

2

Jiri Formacek

3

1

2

Jonny Earl Grey Lindbom

3

1

3

Jakob Bindslet

3

1

3

David Blackmore

3

2

3

Jason Milczek

3

2

3

dude9000

2.5

1

2

Dan Lepine

2.5

1

2

James Tryand

2.5

1

2

Claudio Westerik

2.5

1

2

Perry Harris

2.5

1

2

Chris Duck

2.5

1

2

Eddy Steenbergen

2.5

1

2

Will Steele

2

1

4

Nathan Cook - AU

2

1

2

Dave Ackroyd @LearnPowerShell

2

1

4

Franck Malterre

2

1

2

Marcin Kowalczyk

2

1

2

BobMule

2

1

2

skynetx

2

1

2

845ebf71ea404155b02971a5b6e8bc8d

2

1

2

jcriswell

2

1

2

WizardX2

2

1

2

Dustin Hedges

2

2

3

Luca Christmann

1.67

1

3

Rob Dowell

1.5

1

2

El Ryan

1.5

1

2

mand0

1.5

1

2

TechJLS3

1.5

1

2

Andrew

1.5

1

2

Filip Rejch

1.5

1

2

Daed

1.5

1

2

Jim Vierra

1.33

1

3

Brian T. Jackett

1

1

2

oki

1

1

1

Ákos Kinczel

1

1

2

Hong

1

1

2

Johan Åkerström

1

1

2

Ken King

1

1

2

Valeriy Aksyonov

1

1

2

Jude Croyle

1

1

2

Chris Nakagaki (Zsoldier)

1

1

2

 


Beginner Leaderboard of the 2012 Scripting Games After 7 Days

$
0
0

This is the Beginner leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Beginner Events

User Name

Total Points

Scripts Rated

Total Ratings

Mike F Robbins

34.05

7

21

Adam Funck

32.75

7

17

Dawn Villejoin

32.73

7

23

Sahal Omer

32.67

7

15

wschoier

32.67

7

13

Chris Manning @pbchris

32.33

7

18

Charlie Jacobson

32

7

18

arnold moreno

31.87

7

18

Andy Bidlen

31.67

7

15

Srikanth

31.5

7

19

Eric Pankowski

31.5

7

17

yellowscope

31.17

7

18

Nathan Mayberry

31.17

7

13

James McNeil

30.92

7

16

Nadeem Vance

30.83

7

16

DrLe

30.75

7

19

qsilverx

30.4

7

18

ngebhar2

30.33

7

18

Paul Hiles

30.33

7

16

Cliff Harrison

30.25

7

17

JeffWouters

30.13

7

26

Julie Andreacola

30.08

7

17

Jordan Davis

30.08

7

17

honeybadger

30

7

14

Michael Moore

30

7

16

Andy Mello

30

7

17

Maciej

30

7

18

David OBrien

30

7

14

nyoro2

30

7

13

Mr_Motown

29.92

7

20

JoeTea

29.75

7

14

Don Hunt

29.67

7

16

Shevek

29.67

7

14

Vinay Bhandari

29.58

7

16

James White

29.5

7

20

Brian Bohanon

29.5

7

18

ScriptingWife

29.42

7

20

Grzegorz Kulikowski

29.33

7

15

Eleftheria Theologou

29.27

7

18

Tim Watson

29.2

7

20

Matt benton

29.17

7

16

Derek Schauland

29.17

7

16

Daniel Killian

29.17

7

17

NCoppersmith

29.17

7

16

Joshua Taylor

29.1

7

19

Carl

28.92

7

20

AmandaD

28.92

7

17

Thiyagu

28.83

6

11

Steve Hall

28.83

7

14

Neil Clinch

28.75

6

12

Lido Paglia

28.75

6

15

SLevenberg

28.67

7

14

CraigJahnke

28.67

7

15

James Berkenbile

28.67

7

18

eklime

28.58

7

16

GCaporale

28.58

7

19

Zak Humphries

28.58

7

17

andre

28.5

7

17

clbarnett

28.5

7

18

Chris-D

28.5

7

17

MikeHowden

28.42

7

14

Werner

28.42

7

19

Max Schnell

28.33

6

13

Lotte

28.17

7

16

Fabio Jr

28.17

7

14

ICC_mworthley

28.17

7

19

mark_@_li

28.17

7

15

BTmuney

28.08

7

18

John Grenfell

28.08

7

14

Alexis Ragual

28

6

13

AballahSonDis

28

7

16

jaydee

28

7

16

tyoung

28

7

18

ckrull

28

7

20

Tim Muessig

27.92

7

19

David Waderich

27.83

7

14

NGelotte

27.67

6

13

Sigitas Grėbliūnas

27.5

6

12

Andreas Engkvist

27.5

7

15

Jon McCormick

27.5

7

19

Andrew Morgan

27.42

7

18

Chris Seiter

27.33

7

14

NakiPS1

27.33

7

18

Brian Sabatini

27.33

7

16

Duffman

27.25

7

19

Jeremy Cox

27.17

7

16

Gica

27.15

7

18

mtb44

27

7

17

rumart

27

7

19

Oleg Suchkov

26.9

7

17

Geathan

26.87

7

16

Steven Neel

26.67

6

12

cemarsh06

26.67

7

16

Jess Pomfret

26.67

7

15

Matt Tilford

26.67

7

18

dluke001

26.58

7

16

Mouton

26.58

7

17

TSCSG

26.5

7

16

SM Yeoh

26.5

7

16

BernhardG

26.5

7

15

Xander Solis

26.5

7

20

Norman Manoh

26.5

7

14

ruskie

26.42

6

16

mvanhorenbeeck

26.42

7

18

AnotherPoShBlog

26.4

7

17

Nisha Sridhar

26.33

6

11

Daniel Thompson

26.33

7

17

eribaq

26.27

7

19

Andrey Zvyagin

26.25

7

15

L4NM4N

26.17

7

17

John Russell

26.17

7

16

BradC

26.17

7

16

Pradeep Rawat

26.17

7

18

Ken Wilson

26.17

7

20

Erica Miles

26.17

7

17

Daniel Bicho

26.08

7

19

Mark P

26

6

16

blahcubed

26

6

10

The Awesome-Machine.NET

26

7

16

Dave Maldonado

25.92

6

13

DaveyK

25.92

7

18

Dan

25.92

7

16

ICC_jruff

25.83

6

13

Phill McSherry

25.83

7

19

Ifiok Moses

25.83

7

18

Jason Y.

25.83

7

18

Mads Hjort Larsen

25.83

7

17

Rich Oswald

25.67

7

15

ICC_RichardEisenberger

25.58

7

19

Matt Swint

25.58

7

18

Scott Baker

25.58

7

17

aalaminos

25.58

7

16

BenJT

25.5

7

17

Yves PASCAULT

25.5

7

16

Dennis James

25.33

6

10

SdeDot

25.33

7

18

John OHarra

25.32

7

19

Shaun Watts

25.25

7

16

catremor

25.25

7

16

real fastcomputer

25

7

14

Jhonny Yamaniha

24.92

6

17

member2712

24.83

7

17

David Christian

24.83

7

16

Will Nevis

24.75

7

19

Tyson J. Hayes

24.67

7

14

John

24.6

6

15

Nathan Lare

24.5

6

13

emekm

24.5

6

14

TechguyTJ

24.5

6

17

something easier to read

24.5

7

17

Matt McAllister

24.5

7

16

shiv

24.42

7

18

Dominic Leonard

24.42

7

14

Dexter Dhami

24.25

6

14

Robert B

24.17

7

18

Riwe

24.17

7

17

Daniel Dittenhafer

24

7

15

Wouter Beens

23.92

7

15

Leon Nell

23.83

7

19

Zia

23.83

7

16

Marty

23.8

6

16

James Stallwood

23.75

6

16

Marcin Pietras

23.67

5

11

Tony Rad

23.5

7

19

W. Sterling

23.5

7

16

Jason Omar

23.25

6

18

jones89

23.25

7

17

Aaron Bednar

23

6

15

BreakDown

23

7

21

Scott Alvarino

23

7

15

Derrick Michelson

22.83

7

16

Mathieu Boulard

22.75

5

15

JeremyB

22.75

6

16

Steve Mahoney

22.75

7

16

Kieran Walsh

22.67

7

14

aaron d

22.5

7

16

Timo Skupin

22.33

7

20

Clancy Wendt

22.33

7

17

Clayton McKenzie

22.25

7

19

octavmarius

22.17

5

12

cphair

22

5

9

jarheadf23

21.75

6

13

Roy M

21.67

6

15

Stephen Brown

21.67

6

11

Nate Shepard

21.67

7

15

Trevor Watkins

21.5

7

17

Shawn Melton

21.33

5

12

Chris Keim

21.33

6

14

MarkIsBack

21.17

6

16

Tony Uren

21

6

13

NSlearningPS

21

6

11

Joe Keohan

21

7

14

Elmerp

20.83

6

13

Sidewinder

20.67

6

15

Sai Prasad Vaddepally

20.33

6

13

ICC_KFoley

20.33

6

17

Mod10

20.25

7

18

Stephen Correia

20.17

6

13

oki

20

5

8

mrgif1

20

5

9

Kryten-68

20

6

16

Luke Forder

19.92

5

16

Megha Kuruvilla

19.67

5

12

therceg

19.67

6

13

Vern Anderson

19.67

7

16

Pendrag

19.5

5

8

MOW

19.5

6

11

mand0

19.33

5

11

HitchHeik

19.17

6

15

Emil Eriksson

19

6

13

Mooseade

18.8

5

14

Chuck Lathrope

18.77

6

15

vNiklas

18.75

5

13

erunama

18.33

7

16

Daniel Headley

18.17

5

10

toumi walid

18.17

6

18

ResetSA

18.17

6

14

Vinay Thakur

17.83

7

17

John van Leeuwen

17.58

6

14

Daniel Snowden

17.42

5

12

Andrew Dauncey

17.33

5

10

TheKidd

17

4

5

robert broyles

16.83

5

11

jbrek

16.83

5

12

266ff21a196fda47d8b035a115fdeb42

16.75

5

11

Bastien B

16.58

5

15

Japke

16.5

5

12

e46d8dd2e1625c7a6182b82bc012a7e0

16.5

7

17

Brian Fraley

16.42

5

13

Shawn bequette

16.33

5

11

Jeff Schulman

15

4

10

Richard Holman

14.5

4

7

Colyn1337

14

3

4

Marcos Tsuda

13.92

5

11

lamaar75

13.33

5

13

Niel Fletcher

13

4

9

Matt Vidrine

12

3

8

EDW

12

4

7

kloinerFeigling83

11.58

5

12

Chris Albert

11.33

3

6

Patrik Lindström

10.5

3

9

Bret Ridenour

10.5

4

12

Hov Arve

10.17

4

9

ed3c64f9163ea026e949706ee53b2a34

10

3

4

Shaun Gibbs

10

4

9

Mckie

9.47

4

12

joeartz

9

2

6

Darren Maspero

9

2

8

Peter Heydon

8.92

2

7

Tim Miller

8.58

3

10

DWS

8.42

2

7

Dennis Jarjosa

8.42

2

7

plindgren

8.42

3

11

Yuri Kutovoy

8.42

3

11

Matt_A_

8.42

3

9

lvimeux

8.33

2

6

Jan R.

8.33

2

6

Arif Ali

8.33

3

10

Anders Wang

8.33

3

6

Jerame Caudill

8

2

6

Thomas Farmer

8

2

6

vbscripter

8

2

2

TomKupka

7.92

3

10

sfibich

7.75

2

7

Francisco Puig Diaz

7.75

3

11

Bryan

7.67

2

4

Mark Amann

7.67

2

6

Forrest Stanley

7.67

2

6

Name

7.6

3

10

Tomek A.

7.5

2

8

MarcoB78

7.42

2

7

TaylorGibb

7.4

2

8

Kevin

7.33

3

8

Michael Odermatt

7.08

2

7

Jeffrey Jacobs

7

2

6

Clinton Merritt

7

2

5

Greg Combs

7

3

7

Sander

6.83

2

7

Scott Button

6.83

2

7

Tom Parker

6.67

2

6

Paul Sweeney

6.5

2

4

Coderaven

6.33

2

4

u2tb

6.33

2

6

Clayton Firth

6.25

2

7

Jeff Maes

6

2

6

Harshul

6

2

3

sebuko

5.75

2

6

greeme

5.67

2

6

Apnea

5.67

2

6

Satheesh

5.67

2

7

Timm Brochhaus

5.5

2

6

Jonny Earl Grey Lindbom

5.47

2

8

radek

5.42

2

7

Josh Nylander

5.42

2

7

TheZmann

5.33

2

4

Dave Baird

5.33

2

6

RJSN

5.33

2

4

DisplayName

5.33

2

5

Anthony Rum

5.25

2

7

Mike Lambert

5.25

2

7

Andrew Cameron

5

1

3

Dean Grant

5

1

3

Andy Wyse

5

2

7

Brian Wuchner

5

2

8

Joel Cook

5

2

6

Mallika Gogulamudi

5

2

8

acchong

4.75

1

4

Ken King

4.5

1

2

Sudeep Bhaskar

4.5

1

4

Petter Edin

4.33

2

6

Andrew Gardner

4.25

1

4

Jason Schmidtlein

4.25

1

4

Ryan Youngs

4

1

3

zacd

4

1

3

Francisco osorio

4

1

3

Claymonster

4

1

3

Filip Rejch

4

1

2

James B. Bizzell

4

1

2

Jay Lockard

4

1

3

evidence

4

1

3

Pavan Hotha

4

1

3

PSLearner

4

2

6

peter bishop

4

2

8

Björn

4

2

2

Benduru

4

2

2

Dominic Daigle

3.85

2

9

Ola Skjeldal

3.67

1

3

Tim Hetzel

3.67

1

3

Brett Chandler

3.67

1

3

Chris Watson

3.67

2

5

Bob__Mule

3.5

1

4

Brendan Erofeev

3.5

1

4

sgatepunk

3.5

1

2

ocongil

3.33

1

3

Jasper van der Heijden

3.33

1

3

Tobias

3.33

1

3

70f53217af68ac357dfc1a46739257a6

3.33

1

3

MonitorMan

3.33

1

3

iTodd

3.33

1

3

Jonathan Birkett

3.33

1

3

redi311

3.33

1

3

Dexter

3.33

2

6

b4d93r

3.33

2

5

jeprus

3.25

1

4

skynetx

3

1

3

Jude Croyle

3

1

3

Jakob Bindslet

3

1

3

Andrew Newman

3

1

3

mitch baker

3

1

3

Crystal Diaz

3

1

3

miramar_unna

3

1

1

MrBatchFile

2.67

2

6

Jeremy Dunlop

2.33

1

3

a64c64bd8e1fe90b8b024ab272090e32

2.33

1

3

Daed

2.33

1

3

Jay mac

2.33

1

3

Byty

2

1

3

Nico

1.75

1

4

3166f9ba33499b4658123e7b0a84598f

1.67

1

3

Luca Christmann

1.67

1

3

le4ne

1.5

1

4

Sean Massey

1.33

1

3

David Granlund

1.33

1

3

Anjan Chidurala

1.33

1

3

2e638c99ea54b4ddb208033083f4ef24

1.33

1

3

Chris Nakagaki (Zsoldier)

1.33

1

3

Gabriel Tapia

1.33

1

3

Marcin Kowalczyk

1.33

1

3

j.vogt

1.33

1

3

TitleRequired

1.33

1

3

John Main

1.33

1

3

Jason Shaw

1.25

1

4

Gary Jackson

1.25

1

4

Eric Ray

1.25

1

4

gary gray

1.2

1

5

Jeremy Kieler

1

1

3

TechJLS3

1

1

5

JMARCH

1

1

1

WizardX

1

1

5

 


Randomly Drawn Prize Winners: 2012 Scripting Games Day 7

$
0
0

Thank you for entering the 2012 Scripting Games. A special thank you to our wonderful sponsors for making these prizes possible. Please be sure to visit the sponsors page for more information about these awesome companies. We will send the prize winners an email with the pertinent information about their prizes soon.

vNoob

1 ebook from Manning (ARV $40.00)

Jason Cole

1 ebook from Manning (ARV $40.00)

Dave Maldonado

1 ebook from Manning (ARV $40.00)

Daniel Snowden

1 ebook from Manning (ARV $40.00)

SLevenberg

1 ebook from Manning (ARV $40.00)

Emil Eriksson

1  ebook from O’Reilly Media (ARV $20.00)

SdeDot

1  ebook from O’Reilly Media (ARV $20.00)

Prosvetov Roman

1  ebook from O’Reilly Media (ARV $20.00)

Dustin Hedges

1  ebook from O’Reilly Media (ARV $20.00)

Rich Kusak

1  ebook from O’Reilly Media (ARV $20.00)

Mr grnnnx

1 each Amazon Gift ecard from BeyondTrust (ARV $50.00)

Stephen Correia

1 copy PrimalScript 2011 Universal from SAPIEN Technologies (ARV $999)

Jason Hofferle

1 Voucher toward in-class training of 3 or more days with up to 12 students, or toward a 1-day online class with up to 8 students from Don Jones and Concentrated Technology (ARV $750 )


2012 Scripting Games badge

Expert Commentary: 2012 Scripting Games Beginner Event 3

$
0
0

Summary: Windows PowerShell MVP, Kirk Munro, provides expert commentary for 2012 Scripting Games Beginner Event 3.

Microsoft Scripting Guy, Ed Wilson, is here. Kirk Munro is the expert commentator for 2012 Scripting Games Beginner Event 3.

Photo of Kirk Munro

Kirk is a five-time recipient of the Microsoft Most Valuable Professional (MVP) award for his deep involvement with the Windows PowerShell community. He has worked in the IT industry for more than 15 years, with the last five years focused 100% on Windows PowerShell and software solutions that use Windows PowerShell. He currently works at Devfarm Software as Product Manager for the PowerWF and PowerSE products.

When he's not working on PowerWF and PowerSE, Kirk spends his time working with Windows PowerShell in the community. He is the president of the PowerShellCommunity.org site, a central hub for all things PowerShell. He is also a frequent blogger, and he presents at conferences, launch events, and user group events whenever he gets the opportunity.

Blog: Poshoholic: Totally addicted to PowerShell 
Twitter: http://twitter.com/Poshoholic 
Linked-in profile: http://www.linkedin.com/in/kirkmunro 
Facebook profile: http://www.facebook.com/kirk.munro
Personal profile: http://poshoholic.com/about

Now that spring is here, it is time to get back into shape, and what better way to start than some mental exercises with the 2012 Scripting Games! OK, so maybe the mental exercises will not get you back into top physical shape, but the Scripting Games are always a lot of fun and definitely worth participating in. Every year I like to offer up some of my time with an expert commentary for one of the events so that others can learn from my Windows PowerShell scripting experience, and this year is no exception.

This year, Ed asked me if I would be willing to provide a solution to Event 3 in the Beginner category. This blog will show you how I solved the problem. It is important to note that this is only one of many possible ways to complete this event. Scripting comes with a certain amount of style preference, and this solution reflects how I like to style my scripts, but you may like to style yours differently. With that said, let us get to the solution!

Beginner Event 3 is pretty straightforward. All you need to do is write a Windows PowerShell script that writes local process information (name and ID) to a file in a folder that may or may not exist. It is always important when creating a script that is based on a set of predetermined rules to clearly identify what those rules are. Based on the description and the list of design points, here are the rules that I identified as a required part of this event:

  1. The file that is created must be called process3.txt.
  2. The file must contain a list of processes on the local system, showing the name and ID of each process.
  3. The process3.txt file must be in a nested folder hierarchy, ending with 2012sg\event3.
  4. By default, the script must create the file on the system (root) drive.
  5. If the 2012sg\event3 folder does not exist on the system drive, and if the user does not have permission to create that folder hierarchy there, the folder hierarchy must be created in a location where the user does have permission.
  6. If the script generates errors, they must be terminating errors (that is to say, make sure that no errors appear when the script runs if they are handled by the script itself).
  7. Additional points are given if the script accepts command-line parameters to provide additional functionality (for example, being able to specify a different location where you want the file to be created). Note that if you include command-line parameters, you must also include comment-based Help describing those parameters, and include examples showing how they are used.

Now that we have identified the rules for the event, we can create the script while adding our own personal style to the script. In terms of style, following are two best practices that I always apply to my scripts:

  1. Include a header comment at the top, which identifies I that created the script. That way, if someone finds it later and has questions, they know where the script came from.
  2. Use #region statements to identify business logic in the script. This best practice has two benefits. First, it provides comments so that someone looking at the script later can see what is going on. Second, in modern editors such as PowerSE (my editor of choice) and in the Windows PowerShell ISE in version 3 (currently in Windows 8 Consumer Preview and Window Server “8” Beta), you can use code folding to collapse regions so that all you see is the business logic. The code folding is really useful because it makes it much easier to focus on the most important portion of a script at the time that you are working on it.

Before showing you the script that I created, I should break down each step in the script by using the rules identified above.

Rule 1: The file that is created must be called process3.txt.

This rule tells us two things: that we are creating a file and what the name of that file will be. Windows PowerShell has a cmdlet called Out-File that allows you to write a collection of objects to a file. The -FilePath parameter is used to specify the path to the file that is being created. If you want to overwrite a file if it exists, even if it is read-only, you can use the -Force parameter. With that knowledge, somewhere in our script we’re going to pipe our collection of processes to the Out-File cmdlet, something like this:

… | Out-File -FilePath $Path\process3.txt -Force

You may prefer to prevent overwriting read-only files; however, because this script is something that I expect to run regularly to update the contents of a file, I think the contents should be overwritten, so I’m going to use -Force. Also the $Path variable that is identified here isn’t defined yet. But because we have different possible paths to write to, we can get ready by using a $Path variable now.

Rule 2: The file must contain a list of processes on the local system, showing the name and ID of each process.

It’s great that we’re creating a file, but what good is a file without contents? This rule identifies that the file must contain a list of processes on the local system, and that it must show the name and ID of each process. Get-Process is a Windows PowerShell cmdlet that allows you to retrieve all processes from a computer. You don’t even have to use any parameters; just call Get-Process and you’ll have the data you need. Get-Process returns a lot of information about processes though, and we only want to see the name and ID in a table. Format-Table is a cmdlet that is designed to allow you to define what properties of an object you want to see when it is shown in tabular format. It takes a -Property parameter, where you can name the properties you care about. It also accepts pipeline input, and it will show a table that contains all the objects that it receives from the pipeline. In addition, it has a convenient -AutoSize parameter that allows you to create a table with the least width possible. This is important because there are a lot of programs where you can run Windows PowerShell scripts, and depending on which program you run your script in, your table may have a different default width. Using -AutoSize will ensure that the table is always narrow so that you see the data you care about easily when you open the file and view the contents. With that information, we can put the two cmdlets together in a pipeline and get our formatted table like this:

Get-Process | Format-Table -Property Name,Id -AutoSize

Rule 3: The process3.txt file must be in a nested folder hierarchy, ending with 2012sg\event3.

This rule is interesting. There is a firm requirement that the process3.txt file must be in a nested folder hierarchy that ends with 2012sg\event3. To do that, we need to be able to inspect the path and see if it ends with 2012sg\event3 or only event3. Windows PowerShell has regular expression support that makes this really easy. The logic is simple. If the path doesn’t end with 2012sg\event3 and if the path doesn’t end with event3, then add 2012sg\event3 to the path. Otherwise, if the path ends with 2012sg, then add event3 to the path. If the path already has 2012sg\event3 at the end, we want to leave it alone. For regular expression comparisons, Windows PowerShell has -Match and -NotMatch operators. These operators allow you to perform the comparisons needed here when inspecting the path you’re working with.

When it comes to extending paths, there’s nothing like the Join-Path cmdlet. This cmdlet allows you to append additional portions to a path that you already have in a variable. The -Path parameter identifies the path you’re starting with, and the -ChildPath parameter identifies the extension you want to add to the path. It doesn’t matter if the path you’re starting with ends with a backslash or not; this cmdlet will do the right thing when extending the path.

With all of that knowledge, here is a piece of script that can make sure our $Path variable ends with 2012sg\event3:

if ($Path -notmatch '\\2012SG\\event3$') {

            if ($Path -notmatch '\\2012SG$') {

                        $Path = Join-Path -Path $Path -ChildPath '2012SG\event3'

            } else {

                        $Path = Join-Path -Path $Path -ChildPath 'event3'

            }

}

Rule 4: By default, the script must create the file on the system (root) drive.

Most people set up Windows such that the system on drive C. But not all people choose to configure their systems this way. We have a firm requirement that the script must create the file on the system root drive. We also know from our previous rule, that by default, the path must be in a 2012sg\event3 folder on that drive. Now all we need to do is assign the default value for our path.

To determine which drive is the system drive, we can use environment variables. Environment variables are very easy to access in Windows PowerShell. You simply use the syntax ${env:EnvironmentVariableName} to get the value of any environment variable. In our case, we want the value of the SystemDrive environment variable, so we’ll get that using this syntax: ${env:SystemDrive}. The beauty of this syntax is that you can use it directly inside of a double-quoted string, and Windows PowerShell is smart enough to insert the value you’re referring to directly into that string. Putting that together with the 2012sg\event3 folder requirement, we can set the default value of our $Path variable like this:

$Path = "${env:SystemDrive}\2012SG\event3"

Rule 5: If the 2012sg\event3 folder does not exist on the system drive, and if the user does not have permission to create that folder hierarchy there, then the folder hierarchy must be created in a location where the user does have permission.

With this rule, we’re starting to get a little more complex. First, this rule and the previous rule identify that we must create the folder hierarchy if it does not exist. Second, if we cannot create that folder in the location that is provided (the default location or the location the user provides), we must default to a location where the user does have permission to create folders. It makes sense to use the current user’s My Documents folder as the fallback location when they cannot create the folder hierarchy elsewhere, because it’s going to be possible there…unless something is really, really wrong with the system.

Breaking this down, there are a few things we need to do:

  • Check if the path provided (default or user specified) exists, and try to create it if it does not exist.
  • If the creation of the path did not work (that is, if the path still does not exist), default to using the My Documents folder, and create the hierarchy there.
  • If the path still doesn’t exist (that is, if it couldn’t be created in the My Documents folder), notify the user of the error and stop.

To check for the existence of a file or folder, use Test-Path. Test-Path allows you to test paths by using wildcards (with the -Path parameter). You can also test literal paths and skip wildcard matching (with the -LiteralPath parameter). In our case, we’re working with a literal path so we’ll use the appropriate parameter for that. If you test for the existence of the path and you determine it does not exist, you need to create it.

New-Item allows you to create items on Windows PowerShell drives. The FileSystem provider includes default drives for each drive letter, and we can use New-Item to create the folders required on that drive. When you use New-Item, -Path identifies the path that you want to create, -ItemType identifies the type of item you want to create (in our case, we want to create folders, so we’ll specify an item type of Directory), and the ­-Force parameter tells New-Item to create the entire hierarchy if it doesn’t exist. -Force is really important because you don’t really care what portion of the path doesn’t exist, and you simply want to make sure that the entire path does exist when you create your output file.

Another parameter that is important to mention when working out the details of this rule is a common parameter called -ErrorAction. The -ErrorAction parameter allows you to instruct Windows PowerShell when an error should be ignored (optionally silently), or when an error should cause a script to stop executing. By default if New-Item fails to create something, the error will be reported and the script will continue to run. This may not be desirable, such as in our case. We want to make sure our script doesn’t report an error if it can’t create a path on the system drive, and we want the script to fail if it can’t create the fallback My Documents folder path, so we can use ­-ErrorAction to control the handling in this case.

Now with all of that knowledge, we can complete this portion of the script. First, test to see if the path exists, and if not, try to create it while silently ignoring any errors that come up (due to permissions, for example).

if (-not (Test-Path -LiteralPath $Path)) {

            New-Item -Path $Path -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null

}

Note the important things at play here: -Force to make sure that the entire hierarchy is created if it doesn’t exist, -ErrorAction SilentlyContinue to ensure that any errors that occur don’t prevent the script from continuing and are hidden from the user, and the pipe at the end to Out-Null. Out-Null allows us to mask any output from a command. We don’t want to see any output here, so we pass it to Out-Null to hide it.

Next, check again to see if the path exists. If not, set the path to the fallback location. Remember, the fallback location is the My Documents folder. To get the location of the My Documents folder on any system, you need to use a little bit of the .NET Framework. The System.Environment class has a method called GetFolderPath that allows you to look up common folder paths. For My Documents, the path is identified by the [System.Environment+SpecialFolder]::MyDocuments static member, or ‘MyDocuments’ for short. You can get the location by using this syntax:

$myDocumentsFolder = [System.Environment]::GetFolderPath('MyDocuments')

Then you can use Join-Path again to join that root folder to the required 2012sg\event3 subfolder hierarchy. Put those pieces together, and you add this to your script logic:

if (-not (Test-Path -LiteralPath $Path)) {

            $myDocumentsFolder = [System.Environment]::GetFolderPath('MyDocuments')

            $Path = Join-Path -Path $myDocumentsFolder -ChildPath 2012SG\event3

}

Lastly, we need to check one more time if the path exists because, at this point, if the script failed to create a path, we just assigned the path variable to the backup location in My Documents, we haven’t tested for the existence of that path yet, and we tried to create it. We do that like this:

if (-not (Test-Path -LiteralPath $Path)) {

            New-Item -Path $Path -ItemType Directory -Force -ErrorAction Stop | Out-Null

}

However, if the path was properly created, this logic will simply pass through because the path will exist at that point. Note the important use of -ErrorAction Stop in the call to New-Item here. This tells Windows PowerShell that it should stop executing the script if an error occurs at this point. It is important because you don’t want a series of errors showing up if the folder couldn’t be created, which would make it more difficult to troubleshoot. You only want one error, and the error would come from this command.

Rule 6: If the script generates errors, they must be terminating errors (that is to say, make sure no errors appear when the script runs if they are handled by the script itself).

Meeting the requirements for this rule are pretty easy. We already used -ErrorAction in our logic to create the path. Now we need to add -ErrorAction in one other location: our call to Out-File that we wrote earlier. This is only necessary if you want to do anything extra when you create the file. I want to show the contents of the file on the screen when I create it, so in my script I use the extra handling to make sure I only show the file if everything worked well. With that, we can modify the Out-File call we made earlier to this:

... | Out-File -FilePath $Path\process3.txt -Force -ErrorAction Stop

When that’s in place, we can take the extra step and show the file at the end. To do this we can use the Invoke-Item cmdlet to invoke the text file we create. This will show the text file by using the default editor according to the .txt file association on the system. This will likely be Notepad, but it could be something else. We’re going to use Invoke-Item instead of calling Notepad directly, so that we respect that not all systems are configured alike.

Invoke-Item -LiteralPath $Path\process3.txt

Rule 7: Additional points are given if the script accepts command-line parameters to provide additional functionality (like being able to specify a different location where you want the file to be created). Note that if you include command-line parameters, you must also include comment-based Help that describes those parameters, and include examples that show how they are used.

Last, but definitely not least, is to configure the script so that it can work with any path. For this to work, we’re going to put a $Path parameter at the top of the script. We already have the default $Path value assignment, so we just need to expand that by converting it into a parameter. We can also be smart and add a few safeguards, tell Windows PowerShell that the parameter can be invoked using the -Path name or the first position, and make sure that Windows PowerShell checks the value and raises an error if a null or empty path is used. Here is what the $Path parameter definition looks like in our script:

[CmdletBinding()]

param(

            [Parameter(Position=0)]

            [ValidateNotNullOrEmpty()]

            [System.String]

            $Path = "${env:SystemDrive}\2012SG\event3"

)

The CmdletBinding attribute indicates that we’re using the Advanced Function syntax for our script, which enables support for parameter attributes and validators, and also enables support for comment-based Help. We’re adding a parameter, so we need to add comment-based Help too. That’s a large block comment that is part of the script, and due to the size, I’ll let you look at the syntax in the following script that is listed in its entirety.

Putting it all together

Now we have gone through all of the required steps to solve this event, including any options for bonus points. Things to watch for are anything that may vary from system to system, such as the System drive, the location of MyDocuments, and the default text editor if you choose to show the file when it’s created. Also be careful about and overwriting read-only files intentionally if you want to, and leverage the -ErrorAction common parameter and the Out-Null cmdlet to ensure that you don’t output anything at the wrong time. Add to that your style preferences like the ones mentioned previously, and you may end up with a solution that looks something like this:

<#

            File   = Get-ProcessList.ps1

            Author  = Kirk "Poshoholic" Munro

            Blog   = http://www.poshoholic.com

#>

 

<#

            .SYNOPSIS

                        Gets the processes that are running on the local computer and writes the name and id for each process to a process3.txt file.

 

            .DESCRIPTION

                        Gets the processes that are running on the local computer and writes the name and id for each process to a process3.txt file. Once the file is created, it will be opened in the default text editor.

 

            .PARAMETER Path

                        The path where the file will be created. By default this will be on the system drive in a 2012SG\event3 folder. If the path does not exist and cannot be created, the script will create the process3.txt file in a 2012SG\event3 folder in the current user's My Documents folder instead. If a path is provided that does not include a 2012SG\event3 subdirectory, the missing portions of that subdirectory will be added to the path automatically.

 

            .EXAMPLE

                        PS C:\> Get-ProcessList

                       

                        Get the process list from the local computer and write it to a process3.txt file in the default path. Once the file is created, show it in the default text editor.

 

            .EXAMPLE

                        PS C:\> Get-ProcessList -Path C:\TestPath

                       

                        Get the process list from the local computer and write it to C:\TestPath\2012SG\event3\process3.txt. Once the file is created, show it in the default text editor.

 

            .EXAMPLE

                        PS C:\> Get-ProcessList -Path C:\TestPath\2012SG

                       

                        Get the process list from the local computer and write it to C:\TestPath\2012SG\event3\process3.txt. Once the file is created, show it in the default text editor.

 

            .EXAMPLE

                        PS C:\> Get-ProcessList -Path C:\TestPath\2012SG\event3

                       

                        Get the process list from the local computer and write it to C:\TestPath\2012SG\event3\process3.txt. Once the file is created, show it in the default text editor.

 

            .INPUTS

                        System.String

 

            .OUTPUTS

                        None

 

            .LINK

                        about_functions_advanced

 

            .LINK

                        about_comment_based_help

 

            .LINK

                        Get-Process

 

            .LINK

                        Test-Path

 

            .LINK

                        Join-Path

 

            .LINK

                        New-Item

 

            .LINK

                        Invoke-Item

 

            .LINK

                        Format-Table

 

            .LINK

                        Out-File

 

            .LINK

                        Out-Null

#>

[CmdletBinding()]

param(

            [Parameter(Position=0)]

            [ValidateNotNullOrEmpty()]

            [System.String]

            $Path = "${env:SystemDrive}\2012SG\event3"

)

 

#region Append the portions of the 2012SG\event3 subdirectory to the path if they are not present.

 

if ($Path -notmatch '\\2012SG\\event3$') {

            if ($Path -notmatch '\\2012SG$') {

                        $Path = Join-Path -Path $Path -ChildPath '2012SG\event3'

            } else {

                        $Path = Join-Path -Path $Path -ChildPath 'event3'

            }

}

 

#endregion

 

#region If the path does not exist, try to create it, but ignore any errors.

 

if (-not (Test-Path -LiteralPath $Path)) {

            New-Item -Path $Path -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null

}

 

#endregion

 

#region If the path still does not exist, default to using the My Documents folder instead.

 

if (-not (Test-Path -LiteralPath $Path)) {

            $myDocumentsFolder = [System.Environment]::GetFolderPath('MyDocuments')

            $Path = Join-Path -Path $myDocumentsFolder -ChildPath 2012SG\event3

}

 

#endregion

 

#region Check one more time to see if the path exists. If it does not, try to create it, and stop processing the script if it cannot be created.

 

if (-not (Test-Path -LiteralPath $Path)) {

            New-Item -Path $Path -ItemType Directory -Force -ErrorAction Stop | Out-Null

}

 

#endregion

 

#region Now that we know the path exists, get the processes, show the name and id properties in a fixed width table, and write them to the process3.txt file in the path.

 

Get-Process | Format-Table -Property Name,Id -AutoSize | Out-File -FilePath $Path\process3.txt -Force -ErrorAction Stop

 

#endregion

 

#region Lastly, once we have a process3.txt file that we created, show it in the default text editor.

 

Invoke-Item -LiteralPath $Path\process3.txt

 

#endregion

If you open a file with these contents in PowerSE, and then collapse the comment-based Help, you end up with a view with the regions collapsed that is very easy to read and understand. This collapsed view also allows you to identify the portion of the script that may be causing you problems when you are troubleshooting it later. This is why I think the #region statement is very important when writing Windows PowerShell scripts.

That pretty much wraps up this event. As usual, I have been pretty detailed in my solution, but I provide this detail in hopes that you will understand all of the intricacies that are involved in a Windows PowerShell script so that you will be better armed when creating your own scripts in the future. Good luck with the rest of the competition, and happy scripting!

~Kirk out.

The 2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 4.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy 

Expert Commentary: 2012 Scripting Games Advanced Event 3

$
0
0

Summary: Microsoft PFE, Gary Siepser, provides expert commentary for 2012 Scripting Games Advanced Event 3.

Microsoft Scripting Guy, Ed Wilson, is here. Gary Siepser is the expert commentator for 2012 Scripting Games Advanced Event 3.

Photo of Gary Siepser

Gary is a premier field engineer (PFE) in Customer Services and Support (CSS) at Microsoft. He works with customers that have a limited technology focus, and he helps premier support customers get the most from their Microsoft infrastructure. He used to be a messaging PFE, supporting Exchange Server, and he is a Microsoft Certified Master in Exchange 2007. But he has morphed to 100% Windows PowerShell support engagements.

He delivers premier workshops and provides services such as custom-scoped onsite Windows PowerShell knowledge transfer and sample solutions to help customers solve their needs. He is the Windows PowerShell tech lead within his PFE organization, and he focuses on IP development, internal readiness, and Train-the-Trainer (TTT); recruits instructors; and promotes Windows PowerShell throughout PFE and by proxy to customers. 

Blog: Gary's $this and that about PowerShell and Exchange 
Microsoft Services Premier Support site

When looking at the scenario for this event, it reminded me of "the old days" in my career when I was a system admin, and this sort of thing was something we really did do. This jumped right out at me as a Group Policy or even "old school" account-based log-in script. With all the client machines running Windows 7 or Windows 8 Consumer Preview, utilizing the newer Windows PowerShell scripts in Group Policy is also an option. Bottom line, I think this solution should be a single script that is run and creates the log file. I am only covering the actual script in this solution because this is the Scripting Games and not the "Group Policy Games.” I will assume that getting the policy set up and any possible boot-strapper type of script (for older style log-in scripts) is just plain boring and not script-like.

Whenever I come up against a solution begging for a script, I start with the "If?", and then move on to the "How?" In this case, the question of "if" is really about where to get the required data. WMI jumped out as the likely first choice, and in the end, it was my final choice. Right away, I knew where several of the items of information were, but I had a play around a find a few others. I was able to retrieve enough info to satisfy me from four WMI classes: 

  • win32_computersystem
  • win32_Operatingsystem
  • win32_logicaldisk
  • win32_printer

I say "enough to satisfy" because I made some sacrifices. For example, I noticed during testing that mapped drives when disconnected don’t show up as instances at all from Win32_logicaldisk. This bugged me a little, because as a sys-admin I might want to know if someone actually does have a persistent mapping—it just happens to be disconnected right now. Thus the dilemma: to use a simple solution that is perhaps not as robust, or to spend more time trying to determine if there is a better solution. As I have heard from the Microsoft product groups on a few occasions, "To ship is to choose." In this case, I decided to go with the clean WMI solution and not spend more time than needed on this script. In the end, I am happy enough with the data I am retrieving to submit this solution for this esteemed audience.

After I determined that I knew where to get the data, the next challenge was the "How?" For me, this is typically the easier part, because when I have that secret sauce (the WMI part), I find wrapping some automation around it easy (after doing it for enough years, it seems easy, but it was not always so). I already knew Windows PowerShell has a few ways to append to a text file, so I went with the Out-File cmdlet and its Append switch. Keep reading to see how I decided to parameterize the use of this switch in the solution.

We all should strive to write self-helping and reusable code when we can, so I tried to follow that principle in this solution. I provided script-level comment-based Help and function-level Help. Also, where it made sense, I parameterized settings to make things more flexible and modular. I created parameters at the script level for the file path (with a default value as called for in the event) and for log file overwrite/append behavior.

My dirty little secret is that the overwrite option was really there for testing the code, so I could more easily clean the file out and run it many times. I decided it could be a cool feature, and I left it in there to share. I do think the way I implemented it was sort of cool. I realized that I wanted opposite behavior of the append switch, so I used the "!" (the bang or not operator) to negate the value of my switch parameter. Then, when calling Out-File, I used the notation where I follow the parameter name with a colon and the value (rather than a space, because a switch won’t work with a space and argument). Mostly switches are used without a value, but they optionally can have it, so that part looks like this:

-Append:(!$OverwriteFile)

Another aspect in my solution that you will notice is that the function I wrote to actually do the data collection outputs a raw custom object. Whenever you pass information from one place to another (in this case from a function to the calling code), you should try to pass real, usable objects that have properties to hold the info you want to pass on.

Generally, you are passing out an array of objects that are of the same type. When you do this, it makes working with those objects far easier and effective. It’s "the Windows PowerShell way." To create the custom object and populate properties at the same time, I simply used the New-Object cmdlet with the Property parameter coupled with a hash table of the values. You'll see it right in the middle of the solution, inside the function. Here is a snippet of just that part:

  $outputObject = New-Object PSObject -Property @{
            TimeStampofLogEntry        = (Get-Date)
            UserName             = $rawWMIComputer.UserName
            ComputerFullName         = "$($rawWMIComputer.Name).$($rawWMIComputer.Domain)"
            OperatingSystemVersion      = $rawWMIOS.Version
            OperatingSystemServicePackVersion = $rawWMIOS.ServicePackMajorVersion
            DefaultPrinterName        = $DefaultPrinter.Name
            NetworkDrives           = $NetworkDrives
            ComputerLastBootTime       = $rawWMIOS.ConvertToDateTime($rawWMIOS.LastBootUpTime)
            LastBootState           = $rawWMIComputer.BootupState
          }

There was one other challenge that I think is worth mentioning, and that was how to output and ultimately display the drive mappings. Looking carefully at the example of acceptable output for the event, I decided that I could match it exactly by burying a new custom object inside the property that holds the drive mappings on the main custom object. That is a lot think about, but if you examine the solution, you'll see that I created a pretty simple loop through the drive mapping instances from WMI and populated a custom object. When rendered during the formatting for Out-File, a custom object flattens into a nice hash table structure that is a little odd looking, yet very readable in text. The pertinent snippet from the solution is here: 

$NetworkDrives = $rawWMINetDrive | ForEach-Object {New-Object PSObject -Property @{"DriveLetter" = $_.DeviceID ; "Path" = $_.ProviderName} | Select-Object DriveLetter,Path}

Select-Object at the end of the pipe simply controls the order of the properties because, by nature, a hash-table (used to populate the properties) does not preserve an ordered entry.

Most of the remaining script is pretty self-explanatory between the comment-based Help, and the line comments throughout the code. I hope you can pick up a trick or two from this solution—but most of all, I cannot wait to see all the solutions that are submitted by contestants to see new and completely creative solutions for this event. Here is a screenshot of the log file that my snippet creates:

Image of command output

Here is the actual solution:

<#

  .Synopsis

    This script creates a log file with diagnostic related information.

  .Description

    This script uses a function to collect various pieces of information

    from WMI in order to create an ongoing log file for diagnostic

    purposes.

   

    The following details are collected and logged:

            - Time Stamp of Log Entry

            - User Name

            - Computer Full Name

            - Operating System Version

            - Operating System Service Pack Version

            - Default Printer Name

            - Network Drives

            - Computer Last Boot Time

            - Last Boot State

           

  .PARAMETER OutputFile

    The OutputFile parameter allows the specification of the log file

    name to which the log information is written. By default log

    information is appended, though the file can be overwritten

    using the OverwriteFile parmater. If any part of the folder path

    is missing, it will be created (assuming it has permission).

      Default File Locaiton: $Env:SystemDrive\Logonlog\logonstatus.txt

  .PARAMETER OverwriteFile

    The OverwriteFile paramter allows the log file to be overwritten,

    thus clearing it out. The default behavior is the append to the

    end of the file

  .Example

    PS C:\> c:\scriptfile.ps1

   

    This example runs the script with default settings which will append

    to the log file and write in the default location, in this case that

    would be c:\Logonlog\logonstatus.txt. The folder Logonlog will be

    created if not present.

  .EXAMPLE

    PS C:\> c:\scriptfile.ps1 -outputfile c:\logs\logfile.txt -overwritefile

   

    This example uses a specified path to the log file and overwrites the file

    if present (and not read-only, hidder or system).

#>

 

[CmdletBinding()]

 

Param(

  [string]$OutputFile = "$Env:SystemDrive\Logonlog\logonstatus.txt",

  [switch]$OverwriteFile

  )

 

Function Get-LogonInfo

{

  <#

  .Synopsis

    The Get-LogonInfo function collects and outputs diagnostic information

  .Description

    The Get-LogonInfo function collects and outputs diagnostic information

    about a system. The function was designed with the intent of this

    information being written to a log file, but as it outputs a custom

    object, the output could be used for any purpose.

   

        The following details are collected and output:

            - Time Stamp of Log Entry

            - User Name

            - Computer Full Name

            - Operating System Version

            - Operating System Service Pack Version

            - Default Printer Name

            - Network Drives

            - Computer Last Boot Time

            - Last Boot State

  .PARAMETER Computername

    The computername paramter allows the specification of a computername

    for this function. The default value is the local computer. Since

    all information is collected thorugh WMI, it easily can be collected

    from a remote machine, though this isnt neccessarily in line with its

    inteneded purpose when created.

  .Example

    PS C:\> Get-LogonInfo

   

    When called in its default form, the function simply outputs a custom object

    with all related information

  .EXAMPLE

    PS C:\> Get-LogonInfo -computername SERVER01

   

    The function is called and will return a custom object with information from

    a remote machine, in this case SERVER01

  #>

 

  [CmdletBinding()]

 

  Param([string]$Computername = ".")

    

 

  #Collect WMI classes for log information

  $rawWMIComputer = Get-WmiObject win32_computersystem -Property UserName,Name,Domain,BootupState -ComputerName $computername

  $rawWMIOS = Get-WmiObject win32_Operatingsystem -Property Version,LastBootUpTime,ServicePackMajorVersion -ComputerName $computername

  $rawWMINetDrive = Get-WmiObject win32_logicaldisk -Property deviceid,providername -Filter 'drivetype=4' -ComputerName $computername

  $rawWMIDefaultPrinter = Get-WmiObject win32_printer -filter 'default=True' -Property name -ComputerName $computername

 

  #Handle output for no default printer found

  If ($rawWMIDefaultPrinter -eq $null)

  {

    $DefaultPrinter = New-Object PSObject -Property @{Name="No Default Printer Found"}

  }

  Else

  {

    $DefaultPrinter = $rawWMIDefaultPrinter

  }

 

  #Handle No Mapped Drives and creating array of custom objects for found mapped drives

  If ($rawWMINetDrive -eq $null)

  {

    $NetworkDrives = "No Mapped Drives Found"

  }

  Else

  {

    $NetworkDrives = $rawWMINetDrive | ForEach-Object {New-Object PSObject -Property @{"DriveLetter" = $_.DeviceID ; "Path" = $_.ProviderName} | Select-Object DriveLetter,Path}

  }

 

 

  #Create custom object for function output of collected data

  $outputObject = New-Object PSObject -Property @{

            TimeStampofLogEntry        = (Get-Date)

            UserName             = $rawWMIComputer.UserName

            ComputerFullName         = "$($rawWMIComputer.Name).$($rawWMIComputer.Domain)"

            OperatingSystemVersion      = $rawWMIOS.Version

            OperatingSystemServicePackVersion = $rawWMIOS.ServicePackMajorVersion

            DefaultPrinterName        = $DefaultPrinter.Name

            NetworkDrives           = $NetworkDrives

            ComputerLastBootTime       = $rawWMIOS.ConvertToDateTime($rawWMIOS.LastBootUpTime)

            LastBootState           = $rawWMIComputer.BootupState

          }

         

  #Create simple array of property names to control ordering on the custom object

  $PropertyNamesOrdered = @(

                'TimeStampofLogEntry'

                'UserName'

                'ComputerFullName'

                'OperatingSystemVersion'

                'OperatingSystemServicePackVersion'

                'DefaultPrinterName'

                'NetworkDrives'

                'ComputerLastBootTime'

                'LastBootState'

               )

 

  #Apply the ordering to the custom object output

  $outputObject = $outputObject | Select-Object $PropertyNamesOrdered

 

  #Return from function and explicity pass the custom object

  Return $outputObject

 

} #End Function Get-LogonInfo

 

#Ensure that we have the leading folders for the path specific from the param

$Folderpath = Split-Path $OutputFile

If ((Test-Path $Folderpath) -eq $false) {md $Folderpath | Out-Null}

 

#Finally, run the function to output the custom object, and then use out-file to write the log file

Get-LogonInfo | Out-File $OutputFile -Append:(!$OverwriteFile) -Force -Width 120

Good luck, and most of all, have fun!

~Gary Siepser

The 2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 4.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy 

Beginner Leaderboard of the 2012 Scripting Games After 8 Days

$
0
0

This is the Beginner leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Beginner Events

User Name

Total Points

Scripts Rated

Total Ratings

Mike F Robbins

38.8

8

24

Dawn Villejoin

37.4

8

25

Eric Pankowski

36

8

20

Paul Hiles

35.33

8

19

Cliff Harrison

35.25

8

21

yellowscope

35.17

8

21

Andy Mello

35

8

18

Maciej

35

8

20

Mr_Motown

34.92

8

21

Don Hunt

34.67

8

18

qsilverx

34.4

8

20

ngebhar2

34.33

8

19

Grzegorz Kulikowski

34.33

8

16

JeffWouters

34.13

8

27

Lido Paglia

33.75

7

16

Chris-D

33.5

8

18

ScriptingWife

33.42

8

22

CraigJahnke

33.17

8

17

Alexis Ragual

33

7

15

AballahSonDis

33

8

17

ckrull

32.92

8

22

Tim Muessig

32.92

8

20

David Waderich

32.83

8

16

Adam Funck

32.75

7

17

Sahal Omer

32.67

7

16

wschoier

32.67

7

14

James Berkenbile

32.67

8

19

Sigitas Grėbliūnas

32.5

7

14

Chris Manning @pbchris

32.33

7

18

Werner

32.25

8

21

Derek Schauland

32.17

8

18

Charlie Jacobson

32

7

18

Duffman

32

8

21

Jhonny Yamaniha

31.92

8

19

arnold moreno

31.87

7

18

Thiyagu

31.83

7

14

NakiPS1

31.83

8

20

Lotte

31.67

8

18

cemarsh06

31.67

8

18

Joshua Taylor

31.6

8

21

John Grenfell

31.58

8

16

Srikanth

31.5

7

19

Xander Solis

31.5

8

21

Andy Bidlen

31.17

7

16

Nathan Mayberry

31.17

7

14

mtb44

31

8

19

ICC_mworthley

31

8

21

L4NM4N

31

8

19

rumart

31

8

20

James McNeil

30.92

7

16

Nadeem Vance

30.83

7

16

Brian Sabatini

30.83

8

19

Andreas Engkvist

30.83

8

18

BTmuney

30.83

8

20

DrLe

30.75

7

19

tyoung

30.75

8

20

andre

30.5

8

18

SM Yeoh

30.5

8

18

Matt Tilford

30.5

8

20

ruskie

30.42

7

17

mvanhorenbeeck

30.42

8

19

Ken Wilson

30.17

8

21

Julie Andreacola

30.08

7

17

Michael Moore

30

7

16

nyoro2

30

7

13

David OBrien

30

7

15

Dave Maldonado

29.92

7

14

Jordan Davis

29.83

7

19

JoeTea

29.75

7

14

Shevek

29.67

7

15

Pradeep Rawat

29.67

8

20

John Russell

29.67

8

18

Vinay Bhandari

29.58

7

16

Matt Swint

29.58

8

19

James White

29.5

7

20

honeybadger

29.5

7

15

Norman Manoh

29.5

8

15

SdeDot

29.33

8

19

David Christian

29.33

8

18

Eleftheria Theologou

29.27

7

18

Brian Bohanon

29.25

7

19

Tim Watson

29.2

7

20

Matt benton

29.17

7

16

NCoppersmith

29.17

7

16

Robert B

29.17

8

19

blahcubed

29

7

12

Daniel Killian

29

7

18

AmandaD

28.92

7

17

ICC_jruff

28.83

7

14

Steve Hall

28.83

7

14

Neil Clinch

28.75

6

13

ICC_RichardEisenberger

28.75

8

21

SLevenberg

28.67

7

14

Zak Humphries

28.58

7

17

eklime

28.58

7

17

dluke001

28.58

8

18

GCaporale

28.5

7

21

clbarnett

28.5

7

18

Carl

28.42

7

21

Wouter Beens

28.42

8

17

Geathan

28.37

8

18

Max Schnell

28.33

6

13

John OHarra

28.32

8

21

mark_@_li

28.17

7

15

Riwe

28.17

8

18

jaydee

28

7

16

Daniel Dittenhafer

28

8

17

MikeHowden

27.92

7

15

DaveyK

27.92

8

20

Nisha Sridhar

27.83

7

13

Mads Hjort Larsen

27.83

8

18

Leon Nell

27.83

8

20

NGelotte

27.67

6

13

Marcin Pietras

27.67

6

12

Fabio Jr

27.67

7

15

emekm

27.5

7

15

Andrew Morgan

27.42

7

18

Jon McCormick

27.42

7

20

Chris Seiter

27.33

7

14

Timo Skupin

27.33

8

21

Jeremy Cox

27.17

7

17

Gica

27.15

7

18

Aaron Bednar

27

7

16

Matt McAllister

27

8

18

BreakDown

27

8

22

Oleg Suchkov

26.9

7

17

Marty

26.8

7

17

Steven Neel

26.67

6

12

Stephen Brown

26.67

7

13

Nate Shepard

26.67

8

16

BernhardG

26.5

7

15

TSCSG

26.5

7

16

aaron d

26.5

8

17

AnotherPoShBlog

26.4

7

17

Daniel Thompson

26.33

7

18

eribaq

26.27

7

19

Andrey Zvyagin

26.25

7

15

BradC

26.17

7

17

Daniel Bicho

26.08

7

19

Mouton

26.08

7

18

The Awesome-Machine.NET

26

7

16

Jess Pomfret

26

7

17

Mark P

25.92

6

17

Dan

25.92

7

16

Phill McSherry

25.83

7

19

Ifiok Moses

25.83

7

18

Jason Y.

25.83

7

18

Rich Oswald

25.67

7

15

Erica Miles

25.67

7

18

Sidewinder

25.5

7

17

Yves PASCAULT

25.5

7

16

aalaminos

25.42

7

18

catremor

25.25

7

16

Shaun Watts

25.25

7

16

Scott Baker

25.08

7

18

TheKidd

25

6

8

cphair

25

6

10

NSlearningPS

25

7

12

real fastcomputer

25

7

14

Elmerp

24.83

7

14

member2712

24.83

7

17

Will Nevis

24.75

7

19

Tyson J. Hayes

24.67

7

14

John

24.6

6

15

Nathan Lare

24.5

6

13

TechguyTJ

24.5

6

17

BenJT

24.5

7

18

JeremyB

24.42

7

18

shiv

24.42

7

18

Dominic Leonard

24.42

7

14

Dennis James

24.33

6

11

something easier to read

24.33

7

18

Clancy Wendt

24.33

8

18

Dexter Dhami

24.25

6

14

Stephen Correia

24.17

7

14

mrgif1

24

6

10

Chuck Lathrope

23.77

7

16

James Stallwood

23.75

6

16

W. Sterling

23.5

7

17

MOW

23.5

7

13

Tony Rad

23.5

7

19

Zia

23.33

7

18

Mod10

23.33

8

20

Jason Omar

23.25

6

18

ICC_KFoley

23.17

7

19

ResetSA

23.17

7

15

Pendrag

23

6

10

Emil Eriksson

23

7

15

Scott Alvarino

23

7

15

Kryten-68

23

7

17

Derrick Michelson

22.83

7

16

Mathieu Boulard

22.75

5

15

Steve Mahoney

22.75

7

16

Kieran Walsh

22.67

7

14

Vern Anderson

22.67

8

18

Clayton McKenzie

22.25

7

19

erunama

22.25

8

19

octavmarius

22.17

5

12

jones89

22.17

7

19

jarheadf23

21.75

6

13

Roy M

21.67

6

15

oki

21.5

6

10

Trevor Watkins

21.5

7

17

Shawn Melton

21.33

5

12

Chris Keim

21.33

6

14

MarkIsBack

21.17

6

16

Tony Uren

21

6

13

Daniel Snowden

20.42

6

13

Sai Prasad Vaddepally

20.33

6

13

Joe Keohan

20

7

15

Luke Forder

19.92

5

16

jbrek

19.83

6

13

Vinay Thakur

19.83

8

18

Megha Kuruvilla

19.67

5

12

therceg

19.67

6

13

Brian Fraley

19.42

6

14

mand0

19.33

5

11

HitchHeik

19.17

6

15

Mooseade

18.8

5

14

vNiklas

18.75

5

13

Daniel Headley

18.17

5

10

toumi walid

18.17

6

18

John van Leeuwen

17.58

6

14

Andrew Dauncey

17.33

5

10

robert broyles

16.83

5

11

mnadobnik

16.75

5

11

Japke

16.5

5

12

Bastien B

16.5

5

16

e46d8dd2e1625c7a6182b82bc012a7e0

16.5

7

18

Shawn bequette

16.33

5

11

EDW

16

5

8

kloinerFeigling83

15.58

6

13

Jeff Schulman

15

4

10

Richard Holman

14.5

4

8

Colyn1337

14

3

4

Marcos Tsuda

13.92

5

11

Mckie

13.47

5

13

lamaar75

13.33

5

13

Niel Fletcher

13

4

9

Matt Vidrine

12

3

8

Shaun Gibbs

12

5

10

ed3c64f9163ea026e949706ee53b2a34

11.5

4

6

Chris Albert

11.33

3

6

Patrik Lindström

10.5

3

9

Bret Ridenour

10.5

4

12

Hov Arve

10.17

4

9

joeartz

9

2

6

Darren Maspero

9

2

8

Peter Heydon

8.92

2

7

Tim Miller

8.67

3

11

DWS

8.42

2

7

Dennis Jarjosa

8.42

2

7

plindgren

8.42

3

11

Yuri Kutovoy

8.42

3

11

Matt_A_

8.42

3

9

lvimeux

8.33

2

6

Jan R.

8.33

2

6

Arif Ali

8.33

3

10

Anders Wang

8.33

3

6

Jerame Caudill

8

2

6

vbscripter

8

2

2

Thomas Farmer

8

2

6

TomKupka

7.83

3

11

sfibich

7.75

2

7

Francisco Puig Diaz

7.75

3

11

Bryan

7.67

2

4

Mark Amann

7.67

2

6

Forrest Stanley

7.67

2

6

Name

7.6

3

10

Tomek A.

7.5

2

8

MarcoB78

7.42

2

7

TaylorGibb

7.4

2

8

Kevin

7.33

3

8

Michael Odermatt

7.08

2

7

Jeffrey Jacobs

7

2

6

Clinton Merritt

7

2

5

Greg Combs

7

3

7

Sander

6.83

2

7

Scott Button

6.83

2

7

Tom Parker

6.67

2

6

Paul Sweeney

6.5

2

4

Coderaven

6.33

2

5

u2tb

6.33

2

6

Clayton Firth

6.25

2

7

Jeff Maes

6

2

6

Harshul

6

2

3

Benduru

6

3

4

sebuko

5.75

2

6

greeme

5.67

2

6

Apnea

5.67

2

6

Satheesh

5.67

2

7

Timm Brochhaus

5.5

2

6

Jonny Earl Grey Lindbom

5.47

2

8

radek

5.42

2

7

Josh Nylander

5.42

2

7

TheZmann

5.33

2

4

Dave Baird

5.33

2

6

RJSN

5.33

2

4

DisplayName

5.33

2

5

Anthony Rum

5.25

2

7

Mike Lambert

5.25

2

7

Andrew Cameron

5

1

3

Dean Grant

5

1

3

Andy Wyse

5

2

7

Brian Wuchner

5

2

8

Joel Cook

5

2

6

Mallika Gogulamudi

5

2

8

acchong

4.75

1

4

Ken King

4.5

1

2

Sudeep Bhaskar

4.5

1

4

Petter Edin

4.33

2

6

Andrew Gardner

4.25

1

4

Jason Schmidtlein

4.25

1

4

Ryan Youngs

4

1

3

zacd

4

1

3

Claymonster

4

1

3

Francisco osorio

4

1

3

Filip Rejch

4

1

2

James B. Bizzell

4

1

2

Jay Lockard

4

1

3

evidence

4

1

3

Pavan Hotha

4

1

3

PSLearner

4

2

6

peter bishop

4

2

8

Björn

4

2

2

Dominic Daigle

3.85

2

9

Ola Skjeldal

3.67

1

3

Tim Hetzel

3.67

1

3

Brett Chandler

3.67

1

3

Chris Watson

3.67

2

5

Bob__Mule

3.5

1

4

Brendan Erofeev

3.5

1

4

sgatepunk

3.5

1

2

ocongil

3.33

1

3

Jasper van der Heijden

3.33

1

3

Tobias

3.33

1

3

70f53217af68ac357dfc1a46739257a6

3.33

1

3

MonitorMan

3.33

1

3

iTodd

3.33

1

3

Jonathan Birkett

3.33

1

3

redi311

3.33

1

3

Dexter

3.33

2

6

b4d93r

3.33

2

5

jeprus

3.25

1

4

skynetx

3

1

3

Jude Croyle

3

1

3

Jakob Bindslet

3

1

3

Andrew Newman

3

1

3

mitch baker

3

1

3

Crystal Diaz

3

1

3

miramar_unna

3

1

1

MrBatchFile

2.67

2

6

Jeremy Dunlop

2.33

1

3

a64c64bd8e1fe90b8b024ab272090e32

2.33

1

3

Daed

2.33

1

3

Jay mac

2.33

1

3

Byty

2

1

3

Nico

1.75

1

4

3166f9ba33499b4658123e7b0a84598f

1.67

1

3

Luca Christmann

1.67

1

3

le4ne

1.5

1

4

Sean Massey

1.33

1

3

David Granlund

1.33

1

3

Anjan Chidurala

1.33

1

3

2e638c99ea54b4ddb208033083f4ef24

1.33

1

3

Chris Nakagaki (Zsoldier)

1.33

1

3

Gabriel Tapia

1.33

1

3

Marcin Kowalczyk

1.33

1

3

j.vogt

1.33

1

3

TitleRequired

1.33

1

3

John Main

1.33

1

3

Jason Shaw

1.25

1

4

Gary Jackson

1.25

1

4

Eric Ray

1.25

1

4

gary gray

1.2

1

5

Jeremy Kieler

1

1

3

TechJLS3

1

1

5

JMARCH

1

1

1

WizardX

1

1

5

 



Advanced Leaderboard of the 2012 Scripting Games After 8 Days

$
0
0

This is the Advanced leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Advanced Events

User Name

Total Points

Scripts Rated

Total Ratings

Michał Gajda

23

5

10

KSchulte

22.83

5

10

Glenn Faustino

22.42

5

10

Sergey Borisovich

22

5

10

Prosvetov Roman

21.83

5

10

Aleksey Shuvalov

21.33

5

10

Jason Stangroome

20.67

5

9

Jack Chang

20.33

5

9

Mikko

20.17

5

9

Ed Withers

20

5

9

John Sneddon

20

5

7

BigTeddy

20

5

9

Mike Hammond

19.17

5

9

Ryan Ries

19

5

9

gbdixg

18.67

5

8

Igway Jacobs

18.5

5

7

Albert Fortes

18.33

4

7

Jeremy Caauwe

17.5

4

7

SimonW

17.33

4

8

ICC_RyanDennis

17

5

9

Nathan Linley

17

5

9

George Kesler

16.75

4

8

Serkan Varoglu

16.67

4

7

Matthew Graeber

16.67

5

8

Scott1138

16.5

4

6

Ayo Wu

16.5

5

8

Kyle Neier

16

4

5

Tomek Izydorczyk

15.83

4

8

EasyMac308

15.75

4

9

Lars Seinwill

15.5

4

8

Nuno Mota

15.5

4

6

Łukasz Kałużny

15.5

4

6

Serg

15.5

5

10

Michael Moore

15

4

7

vNoob

15

5

10

Matthew BETTON

14.5

4

6

Frederick Duemig

14.5

4

6

Martijn Haverhoek

14

3

5

Matthew Painter

13.5

3

5

Trevor Hayman

13.17

4

7

Vincent Van Hecke

13

4

6

Kevin Hopcroft

12.67

3

6

Rob Campbell

12.33

3

7

aml

12.17

4

8

Thomas Paetzold

12

3

5

Jason Scott

12

3

4

Francis D

12

3

5

Jason Cole

12

3

5

DamienCharbonnel

12

4

6

Paulo J

11.83

4

8

Cameron Wilson

11.75

4

9

ScripterJT

11.5

3

6

Brian Wilhite

11.5

3

5

Alex McFarland

11.5

3

5

_Emin_

11

3

5

Franck RICHARD

11

3

5

UGSING_MattHitchcock

11

3

5

Jason Hofferle

11

3

5

Brent Challis

11

3

5

Ryan C

11

3

7

Jeff Patton

10.75

3

8

Paul Cunningham

10.67

3

6

Daniel Howe

10.5

3

4

Robert Mongold

10.5

3

5

sstranger

10.5

3

5

Grégory LUCAND

10.5

3

5

Jesper Strandberg

10.5

3

4

Robert Eder

10

3

5

Vladimir Stepic

10

3

5

Rich Kusak

10

3

4

Sean Decker

10

3

5

Cesar Mendoza

9.83

3

6

Jason Wood

9.67

3

5

james seatter

9.5

3

8

Rohn Edwards

9

2

3

Michael Topal

9

3

5

Ken Lin

9

3

5

J Skiba

8.5

2

3

Tim Parkinson

8.5

2

3

Sam

8.5

3

4

Robert van den Nieuwendijk

8

2

3

DJ Grijalva

8

2

4

Ken Hamilton

8

3

8

hemanth.damecharla

8

3

4

Kiss Tamás

7.67

2

5

Jaap Brasser

7.67

2

5

Jason Lange

7.5

2

3

Tom_G

7.5

2

3

Sergey Vorontsov

7.5

2

4

Joel Reed @J_lR_d {AZPOSH}

7.5

2

3

Billy Angers

7.5

2

4

Wes Stahler

7.5

2

3

Peter Heydon

7.5

2

4

Ken

7.5

2

3

AaronHoover

7

2

3

Max Lindström

7

2

6

Daniel Cruz

7

2

4

Joe D.

7

2

3

Stephanevg

7

2

3

marcadamcarter

7

2

3

Tom Parker

6.83

2

5

Carlos Nunez

6.67

2

5

PeetersOnlineNL

6.67

2

5

Frank Peter Schultze

6.5

2

3

Yves P

6.5

2

3

Matt Gohmann

6.5

2

3

Brad Blaylock

6.5

2

4

Sean Brown Houses

6

2

3

Pete Maan

6

2

4

ICC_RDurkin

6

2

3

MattBoren

6

2

3

Brentos

6

2

3

Patrik Lindström

5.67

2

6

Internal_IT

5.5

2

4

MSFT-AutomationJason

5.5

2

3

Calle E

5.33

2

6

Jon Bryan

5.17

2

5

Dave Griffiths

5

1

2

mnadobnik

5

1

1

Mark Weaver

5

1

2

Yuri Kutovoy

5

2

6

Joshua Feierman

5

2

4

Brian Carr

5

2

4

Dan Jakubczak

5

2

3

JeremiahC

5

2

3

Kim Tram

5

2

3

f2b95d1a805fd4f8623b0d70b6ed3a19

4.67

2

5

Brandon Bettle

4.5

2

4

AZPOSH - Brian T Young

4.5

2

3

Damon Brinkley

4.5

2

4

blindrood

4.5

2

5

Anthony Rum

4.33

2

5

ICC_JDyer

4.33

2

4

Anders Wang

4

1

1

Paul Iddon

4

1

2

Anonimista

4

1

2

jillwi

4

1

3

Cameron Ove

4

1

2

T-Bone

4

1

2

Tobias

4

1

2

Scripting Scott Saari

4

1

2

Jose Quinones

4

1

2

Claudiu P

4

1

2

smoshea

4

1

2

Warpig

4

1

2

Justin Sowa

4

1

2

Jimmy Mac

4

1

1

Fredrik Wall

4

2

7

Justin Stokes

4

2

3

Schlauge

4

2

5

Stijn Callebaut

4

2

3

Pemo

4

2

4

Clinton Merritt

3.67

1

3

Mr grnnnx

3.67

1

3

Dan Richardson

3.67

1

3

MSFTW

3.67

1

3

herschelle

3.67

1

3

jeffrey yao

3.67

1

3

Steelwing

3.67

1

3

Chris Oswalt

3.5

1

2

Wolfgang Kais

3.5

1

2

PeterCS

3.5

1

2

Tony McGee

3.5

1

2

Clint Bergman

3.5

1

2

Wayne Gault

3.5

1

2

John Main

3.5

1

2

Yuriy Prikhodko

3.5

1

2

Ryan Schlagel

3.5

1

2

Brian Wuchner

3.5

1

2

resolver101

3.5

1

2

Greg Martin

3.5

1

2

IJuan

3.5

1

2

BurntChimney

3.5

1

2

Claus Søgaard

3.5

1

2

Chris Stewart

3.5

1

2

Oneill Cameron

3.5

1

2

SassDawe

3.5

1

2

Joshua Fuente

3.5

1

2

PatrikL

3.5

1

2

jessekozloski

3.5

1

2

Miruu

3.5

1

2

ThoamsBiebl

3.5

1

2

MarkJohnson

3.5

1

2

Patrick Dorsch

3.5

1

2

Ryan Shafer

3.5

1

2

redi311

3.5

1

2

Bob__Mule

3.33

1

3

Josh

3.33

1

3

kiran reddy

3

1

3

Kerry Boomsliter

3

1

1

Chris Brown

3

1

2

Jacques

3

1

2

Mike Lambert

3

1

2

crownedjitter

3

1

2

Dexter

3

1

2

Kirk Cessac

3

1

2

David Eilers

3

1

2

Robert de Britto

3

1

2

Gregg Britton

3

1

2

ofirey

3

1

2

Erin Huligan

3

1

2

Matthew Vidrine

3

1

2

ginno

3

1

2

Tom Moser

3

1

2

Frank Migacz

3

1

2

Scripting Scott Saari

3

1

2

Greg Shay

3

1

2

Jiri Formacek

3

1

2

Zach M

3

1

2

Jonny Earl Grey Lindbom

3

1

3

Jakob Bindslet

3

1

3

Jason Milczek

3

2

3

David Blackmore

3

2

3

dude9000

2.5

1

2

Dan Lepine

2.5

1

2

James Tryand

2.5

1

2

Claudio Westerik

2.5

1

2

Perry Harris

2.5

1

2

Chris Duck

2.5

1

2

Eddy Steenbergen

2.5

1

2

Will Steele

2

1

4

Nathan Cook - AU

2

1

2

Dave Ackroyd @LearnPowerShell

2

1

4

Franck Malterre

2

1

2

Marcin Kowalczyk

2

1

2

BobMule

2

1

2

skynetx

2

1

2

845ebf71ea404155b02971a5b6e8bc8d

2

1

2

jcriswell

2

1

2

WizardX2

2

1

2

Dustin Hedges

2

2

3

Luca Christmann

1.67

1

3

Rob Dowell

1.5

1

2

El Ryan

1.5

1

2

mand0

1.5

1

2

TechJLS3

1.5

1

2

Andrew

1.5

1

2

Filip Rejch

1.5

1

2

Daed

1.5

1

2

Jim Vierra

1.33

1

3

Brian T. Jackett

1

1

2

oki

1

1

1

Ákos Kinczel

1

1

2

Hong

1

1

2

Johan Åkerström

1

1

2

Ken King

1

1

2

Valeriy Aksyonov

1

1

2

Jude Croyle

1

1

2

Chris Nakagaki (Zsoldier)

1

1

2

 

Randomly Drawn Prize Winners: 2012 Scripting Games Day 8

$
0
0

Thank you for entering the 2012 Scripting Games. A special thank you to our wonderful sponsors for making these prizes possible. Please be sure to visit the sponsors page for more information about these awesome companies. We will send the prize winners an email with the pertinent information about their prizes soon.

The Awesome-Machine.NET

1  ebook from O’Reilly Media (ARV $20.00)

Vinay Thakur

1  ebook from O’Reilly Media (ARV $20.00)

hemanth.damecharla

1  ebook from O’Reilly Media (ARV $20.00)

Ken Lin

1  ebook from O’Reilly Media (ARV $20.00)

Mike Hammond

1  ebook from O’Reilly Media (ARV $20.00)

Paul Hiles

1 ebook from Manning (ARV $40.00)

Daniel Thompson

1  ebook from Manning (ARV $40.00)

Mark P

1  ebook from Manning (ARV $40.00)

Joel Reed @J_lR_d {AZPOSH}

1  ebook from Manning (ARV $40.00)

Paulo J

1  ebook from Manning (ARV $40.00)

Cliff Harrison

1 each Amazon Gift ecard from BeyondTrust (ARV $50.00)

Norman Manoh

1 copy PowerShell Video Training Set from SAPIEN Technologies (ARV $99)

AZPOSH - Brian T Young

1 copy PowerShell Plus Professional Edition version 4.0 from Idera (ARV $199)

2012 Scripting Games badge

Expert Commentary: 2012 Scripting Games Beginner Event 4

$
0
0

Summary: Windows PowerShell MVP, Dr. Tobias Weltner, provides expert commentary for 2012 Scripting Games Beginner Event 4.

Microsoft Scripting Guy, Ed Wilson, is here. Dr. Tobias Weltner is the expert commentator for Beginner Event 4.

Photo of Tobias Weltner

Dr. Tobias Weltner is Germany’s first Windows PowerShell MVP. Tobias trains and coaches enterprises throughout Europe and helps IT Pros and administrators understand, leverage, and love the Power of PowerShell. He also shares his knowledge on PowerShell.com, and he regularly airs webcasts about exciting Windows PowerShell topics such as multithreading and performance.

As a software developer, he created scripting IDEs to make scripting easier, such as Systemscripter (VBScript), the first graphical IDE for PowerShell (PowerShellIDE), and the award-winning PowerShellPlus, which is now part of Idera, Inc. He provides consultant services to enterprises (Windows PowerShell-enabled applications and solutions). As a Rotarian, Tobias is the youth exchange officer, and he enjoys organizing the world-wide youth exchange. He also likes diving and climbing and is curious to discover new things.

Email: tobias.weltner@email.de
PowerShell.com

The objective is to compare the contents of two file system folders. So the first step is to use Get-ChildItem to read the contents of both folders:

PS> $original = Get-Childitem -Path c:\1
PS> $copy = Get-Childitem -Path c:\2

Next, you'd like to find out which files are different in both folders. Use Compare-Object to only list the objects that are different in both sets, and include the parameter -PassThru to receive the original file objects:

PS> Compare-Object -ReferenceObject $original  -DifferenceObject $copy  -Property Name -PassThru

Compare-Object takes the property (column) that you specify in -Property to distinguish different objects. So we used the -Property Name (the file name) to find files that are not present in the other set. By default, Compare-Object returns only objects that are different and excludes all equal objects.

The Windows PowerShell formatter groups files by directory, so the result is a pretty list of files that are present in only the first or the second folder.

To automatically check whether a backup operation was successful, you could evaluate the result provided by Compare-Object. If Compare-Object returns nothing, you know that there are no differences (both folders contain the same files), and thus the backup operation was successful.

Note the following two special tactics in the final script:

First, it uses @(...) to make sure Compare-Object returns an array. This way, even when Compare-Object does not return anything, the result will be an empty array, which then can be checked by using its Count property.

Second, both sets of files are sorted by the very same property that later is used to compare the sets. This adds more robustness. Because Compare-Object has a so-called "sync window" and can get confused when a large number of differences are encountered, sorting by the comparison property ensures that the number of consecutive difference objects is as small as possible.

So, here's the backup validation script:

$original = Get-Childitem -Path c:\1 | Sort-Object -Property Name

$copy = Get-Childitem -Path c:\2 | Sort-Object -Property Name

 

$difference = @(Compare-Object -ReferenceObject $original -DifferenceObject $copy  -Property Name -PassThru)

 

if ($difference.Count -eq 0) {

    Write-Host -ForegroundColor Green 'Content is equal'

} else {

    Write-Host -ForegroundColor Red 'Content is different. Differences:'

    $difference

}

This returns a green message, which indicates that both folders contain the same files, or a red message, which indicates backup errors and lists the orphan files it found.

~Tobias

The 2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 5.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy

Expert Commentary: 2012 Scripting Games Advanced Event 4

$
0
0

Summary: Microsoft MVP, Chad Miller, provides expert commentary for 2012 Scripting Games Advanced Event 4.

Microsoft Scripting Guy, Ed Wilson, is here. Chad Miller is the expert commentator for Advanced Event 4.

Chad is a senior manager of database administration at Raymond James Financial. Chad has worked with Microsoft SQL Server since 1999, and he has been automating administration tasks by using Windows PowerShell since 2007. Chad is a Windows PowerShell MVP and the project coordinator and developer of the Windows PowerShell-based CodePlex project, SQL Server PowerShell Extensions (SQLPSX). Chad leads the Tampa PowerShell User Group, and he is a frequent speaker at users groups, SQL Saturdays, and Code Camps.

Blog: Sev17—SQL Server, PowerShell, and so on
Twitter: @cmille19

The function Get-FolderSize reports the folder size of the specified folder and all subfolders. A path (folder) must be provided to the Get-FolderSize function.

To display the folder size for the current directory, use:

Get-FolderSize

Image of command output

To display folder size information for a list of folders, use:

Get-FolderSize Desktop,Downloads,DropBox

or

Get-Content folders.txt | Get-FolderSize

The code for this script is shown here:

#######################

<#

.SYNOPSIS

Gets folder size.

.DESCRIPTION

The Get-FolderSize function gets the folder size at the specified location.

.EXAMPLE

Get-FolderSize .

This command gets the folder size of the current directory. The dot (.) represents the item at the current location.

.EXAMPLE

Get-FolderSize C:\Windows

This command the folder size of the Windows directory.

.INPUTS

    System.String

        You can pipe a string that contains a path to Get-FolderSize.

.OUTPUTS

    Selected.System.Management.Automation.PSCustomObject

.NOTES

Version History

v1.0   - Chad Miller - Initial release

#>

function Get-FolderSize

{

    [CmdletBinding()]

    param(

    [Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]

    [ValidateNotNullorEmpty()]

    [string[]]$Path

    )

    BEGIN {

        function Format-FolderSize

        {

            param($Size)

 

            if ($Size -ge 1GB) {

                "{0:N2} Gigabytes" -f $($Size/1GB)

            }

            elseif ($Size -ge 1MB) {

                "{0:N2} Megabytes" -f $($Size/1MB)

            }

            else {

                "{0:N2} Bytes" -f $Size

            }

 

        } #Format-FolderSize

    }

    PROCESS {

        Get-Item $Path |  Foreach-Object {$_; $_ | Get-Childitem -Recurse} |

        Where-Object {$_.PSIsContainer}  |

        Select-Object FullName, @{name='Size';expression={$(Get-ChildItem $_.FullName -Recurse | Measure-Object -Sum -Property Length).Sum}} |

        Sort-Object Size -Descending |

        Select-Object @{name="Folder";expression={$_.FullName}}, @{name='Size of Folder';expression={$(Format-FolderSize -Size $_.Size)}}

    }

    END {}

 

 

} #Get-FolderSize

The main section of script is shown here:

The approach I took to solve this problem follows the structures of the PROCESS block of the script. I would start with step one and proceed to the next steps only when the results from the previous steps have been achieved.

  1. Use the Get-Item cmdlet to retrieve information about the specified path. The ForEach-Object cmdlet returns the item, and Get-ChildItem is called recursively to retrieve all child items.
  2. Apply a filter using Where-Object, which tests whether the PSIsContainer property is true, which means the item is of type directory.
  3. After we have the specified directory and all subdirectories, use select-object to retrieve the FullName property, and add a Size property by using a hash table with name and expression keys. The expression uses the Measure-Object cmdlet, summing on the Length property.
  4. Now sort the object by the newly added Size property.
  5. Finally, use the Select-Object cmdlet to emit a custom object with Folder and Size of Folder properties. The Size of Folder property makes use of the function Format-FolderSize, which is defined in the BEGIN block of Get-FolderSize. The Format-FolderSize handles formatting the folder size in the appropriate unit of measurement (gigabytes, megabytes, or bytes). By defining the Format-Folder function in the BEGIN block, the function is private and not visible outside of the Get-FolderSize function.

~Chad

The 2012 Scripting Games Guest Commentator Week will continue tomorrow when we will present the scenario for Event 5.

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. See you tomorrow. Until then, peace.

Ed Wilson, Microsoft Scripting Guy 

Advanced Leaderboard of the 2012 Scripting Games After 9 Days

$
0
0

This is the Advanced leaderboard of the 2012 Scripting Games. Keep in mind that the rankings are constantly changing throughout the day, as event submissions are graded by the judges. All entries will continue to be graded by judges until 12:01 A.M. Pacific Time (UTC-8) on April 23, 2012. At that time, no more scripts will be evaluated, and the leaderboard will be finalized.

How are scripts scored? Learn more about judging criteria.

 2012 Scripting Games badge

Top Submitters for the Advanced Events

User Name

Total Points

Scripts Rated

Total Ratings

Michał Gajda

27

6

11

Sergey Borisovich

26

6

11

Prosvetov Roman

25.83

6

11

Jason Stangroome

25.67

6

10

Aleksey Shuvalov

25.33

6

11

Ed Withers

25

6

11

John Sneddon

24

6

8

gbdixg

23.67

6

9

Ryan Ries

23

6

10

KSchulte

22.83

5

10

Igway Jacobs

22.5

6

8

Glenn Faustino

22.42

5

10

Mike Hammond

22.17

6

10

ICC_RyanDennis

22

6

10

Jeremy Caauwe

21.5

5

8

Matthew Graeber

20.67

6

9

Scott1138

20.5

5

7

Nuno Mota

20.5

5

7

Serg

20.5

6

11

Jack Chang

20.33

5

9

Mikko

20.17

5

9

BigTeddy

20

5

9

EasyMac308

19.75

5

10

Serkan Varoglu

19.67

5

8

Matthew BETTON

19.5

5

7

Vladimir Stepic

19

5

7

vNoob

19

6

11

Albert Fortes

18.33

4

7

Frederick Duemig

17.5

5

7

SimonW

17.33

4

8

Thomas Paetzold

17

4

6

Nathan Linley

17

5

9

Vincent Van Hecke

17

5

7

Paulo J

16.83

5

9

George Kesler

16.75

4

8

Ayo Wu

16.5

5

8

Rob Campbell

16.33

4

8

aml

16.17

5

9

Ryan C

16

4

8

_Emin_

16

4

6

Kyle Neier

16

4

5

Tomek Izydorczyk

15.83

4

8

Jeff Patton

15.75

4

10

Cameron Wilson

15.75

5

10

Lars Seinwill

15.5

4

8

Grégory LUCAND

15.5

4

6

Łukasz Kałużny

15.5

4

6

Michael Moore

15

4

7

Martijn Haverhoek

14

3

5

Rohn Edwards

14

3

4

Robert Eder

14

4

6

Matthew Painter

13.5

3

5

Trevor Hayman

13.17

4

7

Robert van den Nieuwendijk

13

3

4

Kevin Hopcroft

12.67

3

6

Wes Stahler

12.5

3

4

Billy Angers

12.5

3

5

Tim Parkinson

12.5

3

4

Tom_G

12.5

3

4

Sergey Vorontsov

12.5

3

5

james seatter

12.5

4

9

Jason Cole

12

3

5

Francis D

12

3

5

Jason Scott

12

3

4

DamienCharbonnel

12

4

6

Michael Topal

12

4

6

Pemo

12

4

6

Tom Parker

11.83

3

6

Alex McFarland

11.5

3

5

ScripterJT

11.5

3

6

Brian Wilhite

11.5

3

5

Matt Gohmann

11.5

3

4

Pete Maan

11

3

5

Franck RICHARD

11

3

5

UGSING_MattHitchcock

11

3

5

Jason Hofferle

11

3

5

Brent Challis

11

3

5

Paul Cunningham

10.67

3

6

Daniel Howe

10.5

3

4

Robert Mongold

10.5

3

5

sstranger

10.5

3

5

Jesper Strandberg

10.5

3

4

MSFT-AutomationJason

10.5

3

4

Calle E

10.33

3

7

Sean Decker

10

3

5

Rich Kusak

10

3

4

Cesar Mendoza

9.83

3

6

Jason Wood

9.67

3

5

blindrood

9.5

3

6

ICC_JDyer

9.33

3

5

Ken Lin

9

3

5

J Skiba

8.5

2

3

Internal_IT

8.5

3

5

Sam

8.5

3

4

DJ Grijalva

8

2

4

Ken Hamilton

8

3

8

hemanth.damecharla

8

3

4

Brentos

8

3

4

Kiss Tamás

7.67

2

5

Jaap Brasser

7.67

2

5

Jason Lange

7.5

2

3

Joel Reed @J_lR_d {AZPOSH}

7.5

2

3

Ken

7.5

2

3

Peter Heydon

7.5

2

4

AaronHoover

7

2

3

Max Lindström

7

2

6

Stephanevg

7

2

3

Daniel Cruz

7

2

4

Joe D.

7

2

3

marcadamcarter

7

2

3

Dustin Hedges

7

3

4

PeetersOnlineNL

6.67

2

5

Carlos Nunez

6.67

2

5

Frank Peter Schultze

6.5

2

3

Brad Blaylock

6.5

2

4

Yves P

6.5

2

3

ICC_RDurkin

6

2

3

Sean Brown Houses

6

2

3

MattBoren

6

2

3

Patrik Lindström

5.67

2

6

Jon Bryan

5.17

2

5

Dave Griffiths

5

1

2

Mark Weaver

5

1

2

mnadobnik

5

1

1

Yuri Kutovoy

5

2

6

Joshua Feierman

5

2

4

Brian Carr

5

2

4

Dan Jakubczak

5

2

3

Kim Tram

5

2

3

JeremiahC

5

2

3

f2b95d1a805fd4f8623b0d70b6ed3a19

4.67

2

5

Brandon Bettle

4.5

2

4

AZPOSH - Brian T Young

4.5

2

3

Damon Brinkley

4.5

2

4

Anthony Rum

4.33

2

5

Cameron Ove

4

1

2

Clayton Firth

4

1

1

Tobias

4

1

2

T-Bone

4

1

2

Jose Quinones

4

1

2

smoshea

4

1

2

Scripting Scott Saari

4

1

2

Warpig

4

1

2

Justin Sowa

4

1

2

Claudiu P

4

1

2

Jimmy Mac

4

1

1

Anonimista

4

1

2

jillwi

4

1

3

Paul Iddon

4

1

2

Anders Wang

4

1

1

Stijn Callebaut

4

2

3

Schlauge

4

2

5

Fredrik Wall

4

2

7

Justin Stokes

4

2

3

Steelwing

3.67

1

3

MSFTW

3.67

1

3

jeffrey yao

3.67

1

3

Clinton Merritt

3.67

1

3

herschelle

3.67

1

3

Mr grnnnx

3.67

1

3

Dan Richardson

3.67

1

3

Greg Martin

3.5

1

2

Chris Stewart

3.5

1

2

Claus Søgaard

3.5

1

2

SassDawe

3.5

1

2

Joshua Fuente

3.5

1

2

PatrikL

3.5

1

2

jessekozloski

3.5

1

2

IJuan

3.5

1

2

BurntChimney

3.5

1

2

Miruu

3.5

1

2

ThoamsBiebl

3.5

1

2

MarkJohnson

3.5

1

2

Patrick Dorsch

3.5

1

2

Ryan Shafer

3.5

1

2

Oneill Cameron

3.5

1

2

redi311

3.5

1

2

Yuriy Prikhodko

3.5

1

2

Ryan Schlagel

3.5

1

2

John Main

3.5

1

2

Brian Wuchner

3.5

1

2

resolver101

3.5

1

2

Chris Oswalt

3.5

1

2

Wolfgang Kais

3.5

1

2

PeterCS

3.5

1

2

Tony McGee

3.5

1

2

Clint Bergman

3.5

1

2

Wayne Gault

3.5

1

2

Josh

3.33

1

3

Bob__Mule

3.33

1

3

Jonny Earl Grey Lindbom

3

1

3

Jiri Formacek

3

1

2

Jakob Bindslet

3

1

3

Zach M

3

1

2

Tom Moser

3

1

2

Greg Shay

3

1

2

ginno

3

1

2

ofirey

3

1

2

Erin Huligan

3

1

2

Frank Migacz

3

1

2

Scripting Scott Saari

3

1

2

Robert de Britto

3

1

2

Gregg Britton

3

1

2

Matthew Vidrine

3

1

2

Kerry Boomsliter

3

1

1

Chris Brown

3

1

2

kiran reddy

3

1

3

Jacques

3

1

2

Mike Lambert

3

1

2

Dexter

3

1

2

crownedjitter

3

1

2

Kirk Cessac

3

1

2

David Eilers

3

1

2

David Blackmore

3

2

3

Jason Milczek

3

2

3

Claudio Westerik

2.5

1

2

Perry Harris

2.5

1

2

Chris Duck

2.5

1

2

Eddy Steenbergen

2.5

1

2

James Tryand

2.5

1

2

Dan Lepine

2.5

1

2

dude9000

2.5

1

2

skynetx

2

1

2

845ebf71ea404155b02971a5b6e8bc8d

2

1

2

WizardX2

2

1

2

jcriswell

2

1

2

Nathan Cook - AU

2

1

2

Will Steele

2

1

4

Dave Ackroyd @LearnPowerShell

2

1

4

Marcin Kowalczyk

2

1

2

Franck Malterre

2

1

2

BobMule

2

1

2

Luca Christmann

1.67

1

3

Rob Dowell

1.5

1

2

El Ryan

1.5

1

2

mand0

1.5

1

2

TechJLS3

1.5

1

2

Andrew

1.5

1

2

Filip Rejch

1.5

1

2

Daed

1.5

1

2

Jim Vierra

1.33

1

3

oki

1

1

1

Brian T. Jackett

1

1

2

Ákos Kinczel

1

1

2

Hong

1

1

2

Johan Åkerström

1

1

2

Ken King

1

1

2

Valeriy Aksyonov

1

1

2

Jude Croyle

1

1

2

Paul Sweeney

1

1

1

Chris Nakagaki (Zsoldier)

1

1

2

 


Viewing all 3333 articles
Browse latest View live