Scripto Bobble-head Games Logo

Welcome to PoshCode and the 2011 Scripting Games!

The Scripting Games are a special event put on by the Microsoft scripting guys. Script submissions, grading, and script archives are hosted by PoshCode.org. You may want to check out the Official Rules, and the Scripting Games Information page for event information and contest details, since this site is purely for submitting your contest entry!

Remember: You will not be able to see other user's scripts until after the deadline for an event has passed, and you will not be able to submit scripts for an event once that event has passed.

Note: If you have any problems logging in, please clear your cookies. If you still have problems, please use the "Contact Us" tab above or post directly on GetSatisfaction.

Searching for Scripts

  • Get-ServiceAccounts.ps1 by Daniel Cruz 13 Apr 2011 08:40 PM UTC
    by 2 users

    Beginner Event 4

    Reports any service using a non-standard account on a single or multiple computers. If the All switch is used, all services and accounts will be returned for the computer specified. Standard accounts are defined as "LocalSystem", "NT AUTHORITY\LocalService" and "NT AUTHORITY\NetworkService".

  • Test-Win7Requirements by Jason Hofferle 09 Apr 2011 10:41 PM UTC
    by 2 users

    Advanced Event 5
    3 Comments

    This script is based on the Test-Win7Requirements function. This function uses WMI to check the processor, memory and free disk space to verify they meet the requirements to run Windows 7. The dxdiag utility is used to determine video card capabilities. The official Windows 7 requirements are used as the default values to check against, but different values can be specified through parameters.

  • Get-BasicComputerInfo by Matt_G 15 Apr 2011 03:15 AM UTC
    by 2 users

    Beginner Event 5
    1 Comments

    Get-BasicComputerInfo

  • Write-Temp by Milo 16 Apr 2011 05:10 AM UTC
    by 2 users

    Advanced Event 10
    5 Comments

    The 2011 Scripting Games Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files

  • Get-UpgradeInfo by Milo 15 Apr 2011 05:15 AM UTC
    by 2 users

    Advanced Event 5
    2 Comments

    The 2011 Scripting Games Advanced Event 5: Use PowerShell to Determine Upgrade to Windows 7 Eligibility

  • Show-Picture by Bartek Bielawski 18 Apr 2011 11:03 AM UTC
    by 2 users

    Advanced Event 8
    3 Comments

    I tried to make this script well.... perfect. ;) * It uses WPK and PSImage Tools from PowerShellPack * If you run it on computer that does not have it - it will give a try and download/ install it from network. * On XP and alike it may fail due to absence of WIA.ImageFile COM Object. It tries to create it early in the script and informs about issue. Gives a link to page where you can get it. * As XP does not support some features of WPF (been there...) it will warn about it if XP is 'detected'. * All controls are transparent, so the picture consumes as much window space as you give to it. It will grow together with window. * Some basic help available inline, more in GUI (press F1 to see it, may fail if network is not available, or at least won't be able to show one picture... ;) * Two parameters -Force (to force it work in MTA powershell.exe and Path to work around the problem of empty pictures folder) - use either. * I know it is huge, but I wanted to cover all scenarios and make it really pretty.... ;) And comment what I do here and there...

  • AdvEvent01 by Robert Robelo 05 Apr 2011 01:42 AM UTC
    by 3 users

    Advanced Event 1
    4 Comments

    One advanced function, Get-ProcessModuleVersion: • completely reusable • has remoting mechanism • emits CSV output (String[]) • complete comment-base help • accepts command-line arguments • accepts piped values: byValue and byPropertyName • advanced function • annotated • shows progress bar on Console • error handling, emits computer name only

  • TimingIsEverything by Joe D. 22 Apr 2011 06:30 AM UTC
    by 4 users

    Beginner Event 10
    2 Comments

    Determine the amount of time a command takes to complete.

  • Get-ComputerInfo by Daniel Cruz 15 Apr 2011 05:00 AM UTC
    by 2 users

    Beginner Event 5

    Collects the user name, computer name, domain name, and the operating system from a number of computers and saves the output to an ASCII encoded text file.

  • New-TempFileContent by Rich Kusak 22 Apr 2011 04:58 AM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    The New-TempFileContent function creates a temporary file in the Windows temp location and saves content in the file. Optionally, the file contents can be shown by use if the -Show parameter.

  • AdvEvent1.ps1 by Bartek Bielawski 05 Apr 2011 07:11 AM UTC
    by 3 users

    Advanced Event 1
    1 Comments

    Because I really don't feel good with strings in the output - I've added -NotFormatted switch to give user option to keep objects in pipe. I'm also not sure if >> will work anyway (encoding issues?). Anyway, I've tried to make it easy to port to a function (advanced) - all you need is Verb-Noun name and couple of curly brackets. ;)

  • Get-LoggedEvent by Jason Hofferle 06 Apr 2011 09:24 PM UTC
    by 3 users

    Advanced Event 3
    2 Comments

    This script is based around the Get-LoggedEvent function. This function was designed with the intent that gathering a list of computer names and formatting output would be done by other cmdlets in the pipeline. These type of tasks gain so much speed through PowerShell remoting that an optional parameter was added that will use fan-out remoting instead of querying each computer individually.

  • Get-DriverInfo by Kazun 04 Apr 2011 12:35 PM UTC
    by 5 users

    Advanced Event 1
    2 Comments

    Advanced Event 1: Finding Process Module Versions by Using PowerShell

  • Beginner1_2011.ps1 by Jason Stangroome 04 Apr 2011 09:11 AM UTC
    by 6 users

    Beginner Event 1
    3 Comments

  • get-systeminfo.ps1 by Tony Richards 15 Apr 2011 01:33 AM UTC
    by 2 users

    Beginner Event 5
    1 Comments

    The script will ping each computer in the array and if the computer is online the script will run several WMI queries and save the results to an ASCII .txt file. If the computers are offline when the script attempts to contact them those results will be stored in a seperate file,dead.txt. When the script is rerun, say the following day, the script deletes the old dead.txt. (I figure administrators are only going to be interested in offline machines the day the script is run)

  • Get-ProcessModule.ps1 by Seán Lillis 11 Apr 2011 03:44 PM UTC
    by 2 users

    Advanced Event 1
    1 Comments

    Gets the version details of a specified Module used by a specified Process.

  • Measure-Average.ps1 by Daniel Cruz 22 Apr 2011 02:07 AM UTC
    by 2 users

    Beginner Event 10
    2 Comments

    Function: Measures the average amount of time it takes to run a specified command.

  • keith's script by ICC_keithm 11 Apr 2011 09:32 PM UTC
    by 2 users

    Beginner Event 1
    1 Comments

    I am a beginner

  • Beginner10.ps1 by Sadie Trest 22 Apr 2011 04:34 AM UTC
    by 3 users

    Beginner Event 10
    1 Comments

    This script creates a reusable function that executes either the default command or a user supplied command a specified number of times, averages the amount of time each command took to run and returns a string containing the result in milliseconds.

  • Joe Keohan by Joe Keohan 11 Apr 2011 02:51 PM UTC
    by 3 users

    Beginner Event 1
    3 Comments

    Script will run against one or more computers and looks for a specified version of an active process and outputs the results as a custom object

  • Get-ProcessVersion by Dave Ackroyd 07 Apr 2011 10:07 PM UTC
    by 3 users

    Beginner Event 1
    4 Comments

    Scripting Games 2011 - Event 01 - Beginners # # Run script or add to profile | use the cmdlet Get-ProcessVersion <process>. Displays Process, NameOfComputer, and Boolean value of if it IS a private build or not. # # The program must be running before querying - Future version of this script will have a check to see if the program is running and if not Open it, get the Process ID, then Close again afterward.# Appologies to the Judges for the incomplete nature of this script. I don't currently have the time to work on finishing.

  • Get-WinEventSummary by Milo 07 Apr 2011 10:50 PM UTC
    by 2 users

    Advanced Event 3
    3 Comments

    The 2011 Scripting Games Advanced Event 3: Use PowerShell to Query Classic Event and ETL Diagnostic Logs

  • PSExifViewer.ps1 by Simon Fuhrer 18 Apr 2011 08:20 PM UTC
    by 3 users

    Advanced Event 8
    2 Comments

    Greets to Marc :-)

  • Pausable Services by Joel Bennett 07 Apr 2011 03:28 PM UTC
    by 4 users

    Beginner Event 2
    3 Comments

  • ResizeImage.ps1 by Franck RICHARD 19 Apr 2011 08:27 PM UTC
    by 2 users

    Advanced Event 8
    1 Comments

    2011 Scripting Games Advanced Event 8: Use PowerShell to Remove Metadata and Resize Images