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 in category 'Advanced Event 10'

  • A-10 by Ayo Wu 15 Apr 2011 04:17 PM UTC
    by 3 users

    Advanced Event 10
    2 Comments

  • Out-TempFile by Kazun 15 Apr 2011 05:28 PM UTC
    by 3 users

    Advanced Event 10
    1 Comments

    Advanced Event 10: Use PowerShell to Create a Function to Create Temp Files

  • Add-ContentToTempTextFile.ps1 by Matthew BETTON 15 Apr 2011 09:20 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    The Add-ContentToTempTextFile function adds string content to a temporary random file name.

  • 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

  • Advanced10 by John Lan 16 Apr 2011 05:14 AM UTC
    by 2 users

    Advanced Event 10

    Create a temp file under default temp folder. Path+fileName is returned upon sucessful creation. Except the common switches e.g. -verbose, -debug, and -whatif, all other requirements outlined in the game description are implemented.

  • OutTempFile by Jacques 16 Apr 2011 08:19 AM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    OutTempFile.ps1 creates an advanced function called Out-TempFile that sends output to a temporary file. Out-TempFile accepts an Encoding parameter, a DisplayInNotepad parameter that opens the file in Notepad, as well as the WhatIf, Confirm, Debug and Verbose parameters. You must dot source the script first, and then you can use the function.

  • create-temporarytextfile by David Moisan 16 Apr 2011 01:10 PM UTC
    by 2 users

    Advanced Event 10

    Creates a temporary text file in the user's temporary folder from pipeline input. Optionally produces Unicode output. Optionally opens the text file in Notepad. Supports -debug and -verbose options

  • Advanced10_2011 by Glenn Sizemore 16 Apr 2011 04:32 PM UTC
    by 4 users

    Advanced Event 10
    1 Comments

    Create a new temp file for use later. Not much going on with this event so I chose to just write a real clean and simple solution.

  • Out-TempFile by Jason Hofferle 16 Apr 2011 09:18 PM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    This advanced function creates a uniquely named tmp file in the current user's temporary directory. It accepts any type of object through the pipeline or InputObject parameter. It supports Unicode and ASCII encoding, and includes a parameter for opening the temporary file with notepad.

  • New-TemporaryFile by Daniel Richnak 17 Apr 2011 06:08 PM UTC
    by 2 users

    Advanced Event 10

    Creates a text file in user's TEMP directory. Will write input to this file.

  • Library-TempFile.ps1 by Bartek Bielawski 17 Apr 2011 06:33 PM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    Script with single function to create temporary files from pipeline input. Need to dot-source it in order for it to work, thus name of the script. I tried to use all good things that come with advanced functions. I even managed (finally ;) ) to get proper support for 'Yes to All' and 'Now to All' in process block, usually it was asking regardless option selected... ;) I used -confirm:$false to prevent cmdlets from picking up $ConfirmPreference (they would prompt user again). Was not sure which verb too choose (Out or New) - finally decided to go with New, as we create things rather than redirect stuff to something that is always there (like Host... or Null ;) ).

  • Advanced10_2011.ps1 by Jason Scott 18 Apr 2011 02:12 AM UTC
    by 2 users

    Advanced Event 10

  • Out-TempFile by vbscripter 18 Apr 2011 05:32 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This function saves data to a temporary file and returns path to it. The function accepts piped content and has comment-based Help.

  • bpfinn_adv10.ps1 by 98d0d0c4b2ec3108763ceb1cc9a64141 18 Apr 2011 07:19 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This script creates a temporary text file in the current user's temporary directory. It accepts piped input and places it in this file. If you provide the -OpenInNotepad argument, the script will open the temporary file that has just been created in Notepad.

  • New-TempFile by Peter Rossi 20 Apr 2011 07:50 AM UTC
    by 3 users

    Advanced Event 10
    2 Comments

    Advanced function to create temp files from data piplined or inputted into it. Option to open the file in notepad Option to specify the encoding type

  • AdvancedEvent10 by Nuno Mota 20 Apr 2011 11:28 AM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    - The function accepts piped content; - The function returns the path to the temporary file IF the user does not use the -WhatIf parameter; - The files are created in the TEMP_20110415.txt format, for example, and in C:\Windows\Temp by default. If not possible, then in C:\Temp; - If the user uses the -OpenFile switch, the temporary file will be opened in Notepad at the end of the script; - The user can use the -Encoding parameter to specify ASCII or Unicode to use when writing to the script; - The function also fully supports the WhatTf, Debug, and Verbose parameters.

  • create-tempfile by Thomas Paetzold 20 Apr 2011 04:37 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    create a temp file that contains data from the pipeline. Ii terminates the pipeline and returns the name of the tempfile. The tempfile will be stored in the temp folder of the users profile.

  • advanced10.ps1 by Tim Parkinson 20 Apr 2011 06:01 PM UTC
    by 2 users

    Advanced Event 10

    An advanced function which creates the log file and writes out to it. By default uses temporary folder of the user, and a GUID as the filename with a .txt extension. All of these may be overridden by parameters (including a scriptblock to generate the filename). Supports encoding and whatif, verbose and debug parameters. Allows display of the program in notepad (may be overridden) and returns the filename that is written to.

  • sendto-tempfile.ps1 by Scott A. Alvarino 20 Apr 2011 07:26 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    This function saves the pipeline to a temp file and lets you immediately view if a value of notepad is supplied for -value

  • Set-TempFile by Alex McFarland 20 Apr 2011 07:27 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    Writes data to an automaticly generated temporary file, in either ASCII or Unicode format. Data may come from the pipeline or a command line parameter. Grading Criteria: -Advanced function, complete with comment-based Help. -Accepts piped content. -Returns the path to the temporary file. -The temporary file has a temporary name, and resides in the temporary folder. -Function is appropriately named. -Has a switch that will display the content of the temporary file in Notepad. -Supports an encoding parameter and support ASCII and Unicode as encoding types. -Supports the whatif, debug, and verbose parameters.

  • New-TempTextFile.psm1 by Kerry Boomsliter 21 Apr 2011 06:04 AM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    Creates a temp file on the pipeline and returns the temp file path name. Challenge from the 2011 Scripting Games, the Advanced Event number 10. Will create an empty file if no input is provided. I believe I've hit all of the extra point requirements! Kerry Boomsliter

  • New-TempFile.ps1 by spinlock 21 Apr 2011 07:01 AM UTC
    by 2 users

    Advanced Event 10

    Returns a temporary file name. If the -InputObject parameter is specified (or piped in), the contents are written to the temporary file. Accepts and acts upon -whatif, -encoding, -verbose -debug parameters Allows the user to specify which directory the tempfile is to be created in. Optionally displays the contents of the temporary file in notepad once completed (-ShowInNotepad)

  • Advanced10_2011.ps1 by Albert Fortes 21 Apr 2011 09:57 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    Sends output to a temporary file.

  • New-TempFile by Matthew Painter 21 Apr 2011 12:57 PM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    Advanced Event 10 in the 2011 Scripting Games uses Windows PowerShell to create an advanced function to create temporary files.

  • CreateTempFile.ps1 by Franck RICHARD 21 Apr 2011 02:29 PM UTC
    by 2 users

    Advanced Event 10

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