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'

  • 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.

  • Out-Temp by Miklos Karasz 21 Apr 2011 09:59 PM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    The Out-Temp function sends output to a temporary file. Displays the content in notepad if -Notepad specified. Character encoding can be altered from the default ASCII. The temporary file will not be deleted if -Keepfile is specified. You can pipe string or objects also.

  • New-TemporaryFile by Boe Prox 22 Apr 2011 02:37 AM UTC
    by 2 users

    Advanced Event 10
    1 Comments

    In at the last minute...kind of like last year. This command takes the original requirements of creating a temp file on the user's temp folder that accepts data from the pipeline if used and supports whatif,verbose and debug. After creation of the file, the file path and name is displayed. An option to open the file can be performed using the -DisplayFile switch. In its default state, you can run the command and it will automatically generate a file and save it to your temp folder. Because I felt that was sort of a limited feature, I added the ability to state your own destination path and file if needed. An additional feature is that if the folder path does not exist at the time, the folders will automatically be created for you. Also added is the option to determine what type of encoding you wish to use using the -Encoding parameter and supplying the proper encoding name. When added to a profile, this function will be visible for use.

  • 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

  • out-tempfile.ps1 by mjolinor 21 Apr 2011 10:53 PM UTC
    by 3 users

    Advanced Event 10
    1 Comments

    Creates a temporary (.tmp) file in the system temp directory, and writes pipeline input to the file. Encoding and newlines can be specified by parameters, and will optionally open the file in Notepad after writing. Checks for interactive user environment before running Notepad, and prompts for verification before opening large files. Includes support for shouldprocess, provided debug and verbose output.

  • adv10.ps1 by Francis D 22 Apr 2011 03:49 AM UTC
    by 2 users

    Advanced Event 10
    2 Comments

    Output to a temporary text file in the temp folder

  • Advanced_10.ps1 by Justin Stokes 21 Apr 2011 08:54 PM UTC
    by 2 users

    Advanced Event 10

    This script contains the New-TempFile function, which is a solution to Advanced event 10. The event called for a function, so this script needs to be dot-sourced to run.

  • 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 ;) ).

  • 2011psa10.ps1 by Polin Yan 22 Apr 2011 01:49 AM UTC
    by 2 users

    Advanced Event 10

    2011 Scripting Games. Advanced Event 10.

  • Out-TempFile.ps1 by Robert van den Nieuwendijk 21 Apr 2011 09:51 PM UTC
    by 3 users

    Advanced Event 10
    1 Comments

    Submission for the 2011 Scripting Games Advanced Event 10. Sends output to a temporary text file. The temporary file gets a temporary name, and it resides in the temporary folder.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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-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.

  • 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

  • Advanced_2011_event10.ps1 by Eddy Steenbergen 21 Apr 2011 04:21 PM UTC
    by 2 users

    Advanced Event 10

    A bit like rewriting [IO.Path]::GetTempFileName() in powershell !?

  • 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.

  • 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.

  • 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

  • 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

  • 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.

  • 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.

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

    Advanced Event 10