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 4'

  • Get-ProcessReport by Milo 14 Apr 2011 07:35 AM UTC
    by 2 users

    Advanced Event 4
    4 Comments

    The 2011 Scripting Games Advanced Event 4: Use PowerShell to Investigate the SvcHost Process

  • Get-SvcHostProc by Kane 14 Apr 2011 05:12 AM UTC
    by 2 users

    Advanced Event 4

    List each instance of the SvcHost process, the amount of committed memory, the number of page faults, and the command line that launched each SvcHost process. Outputs report to HTML

  • Get-ProcessStatistic by Rich Kusak 14 Apr 2011 04:54 AM UTC
    by 2 users

    Advanced Event 4

    The Get-ProcessStatistic function uses the WMI Win32_Process and Win32_Service classes to get statistical information on a process and associated services. The -ShowAsReport parameter outputs the results to a HTML report.

  • ADV-4-svchost-procs by ICC_King, Dan 14 Apr 2011 04:05 AM UTC
    by 2 users

    Advanced Event 4
    1 Comments

    This command will pull all processes that are running under service host and list the path that called them. This script is incomplete.

  • Get-SvcHostServices.ps1 by Matthew Painter 13 Apr 2011 11:01 PM UTC
    by 2 users

    Advanced Event 4
    2 Comments

    Advanced Event 4 of the 2011 Scripting Games uses Windows PowerShell to investigate the SvcHost process.

  • Advanced4_2011.ps1 by Albert Fortes 13 Apr 2011 10:17 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

    Investigate the SvcHost Process.

  • AdvancedEvent4 by Nuno Mota 13 Apr 2011 09:43 PM UTC
    by 2 users

    Advanced Event 4
    2 Comments

    The script will create a CSV or HTML report in a location chosen by the user using a GUI.

  • advanced4_2011.ps1 by Jonathan Z 13 Apr 2011 08:36 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

  • Get-SvcHost by Jacques 13 Apr 2011 07:43 PM UTC
    by 2 users

    Advanced Event 4
    2 Comments

    Gets details on all SvcHost processes currently running on a machine. The script provides two levels of details : one is a basic list of all running SvcHost processes, another is a list of all services that are hosted by each SvcHost process.

  • Advanced4_2011.ps1 by Chris Oswalt 13 Apr 2011 06:47 PM UTC
    by 2 users

    Advanced Event 4
    2 Comments

    I'm sure there is a faster way to do this. I tried to pay attention to comments on my other submisisons and make this more object oriented. The advanced function returns all properties from the process you specify from WMI win32_process and win32_service. After getting the objects and properties from the advanced function it formats the data into a readable format using Format-Table.

  • AdvEvent4.ps1 by Franck RICHARD 13 Apr 2011 06:21 PM UTC
    by 2 users

    Advanced Event 4

    2011 Scripting Games Advanced Event 4: Use PowerShell to Investigate the SvcHost Process

  • Get-SvcHostInfo by Ryan Witschger 13 Apr 2011 05:41 PM UTC
    by 2 users

    Advanced Event 4

    Submitted by Ryan Witschger for Advanced Event 4

  • bpfinn_adv04.ps1 by 98d0d0c4b2ec3108763ceb1cc9a64141 13 Apr 2011 04:02 PM UTC
    by 2 users

    Advanced Event 4

    Retrieves the number of running SVCHOST processes and what services they are providing.

  • Advanced_4_2011.ps1 by Justin Stokes 13 Apr 2011 03:44 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

    This script contains the Get-SvchostInfo function which returns a list of services started by svchost.exe processes. It displays their Name, PID, StartMode, Current State, Page Fautls and Commit Size.

  • Advanced_2011_event4.ps1 by Eddy Steenbergen 13 Apr 2011 02:35 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

    Tried using threads property returned by get-process but don't know how to use its values - look forward to seeing if anyone else worked out how to. BUT found a simple algorithm (so simple I suspect I've missed something obvious :-) Also provided options for automatic print and return of results in collection of objects.

  • Advanced4_2011.ps1 by Micho Janssen 13 Apr 2011 12:00 PM UTC
    by 2 users

    Advanced Event 4

  • get-serviceprocess by Thomas Paetzold 13 Apr 2011 11:36 AM UTC
    by 2 users

    Advanced Event 4
    2 Comments

    This script lists all services that run within the svchost process and returns the result as an object.

  • 2011psa4.ps1 by Polin Yan 13 Apr 2011 02:41 AM UTC
    by 2 users

    Advanced Event 4

    2011 Scripting Games. Advanced Event 4

  • get-SvcHost by spinlock 12 Apr 2011 10:57 PM UTC
    by 2 users

    Advanced Event 4

    Returns an object of the services running under service host and the memory commitment of the hosting process ! Does what it says on the tin !

  • Get-ServiceProcess by Miklos Karasz 12 Apr 2011 10:02 PM UTC
    by 2 users

    Advanced Event 4

    It is intended that i didn't use .PARAMETER in the help because i prefer way i've found in help about_Comment_Based_Help "You can also specify a parameter description by placing a comment in the function or script syntax immediately before the parameter variable name."

  • Advanced4_2011.ps1 by Robert van den Nieuwendijk 12 Apr 2011 08:05 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

    Submission for the 2011 Scripting Games advanced event 4. This script will list each instance of the SvcHost process, the amount of committed memory, the number of page faults, and the command line that launched each SvcHost process. In addition, the script list each service that is running inside each instance of the SvcHost process.

  • AdvancedEvent_4 by dimtdv 12 Apr 2011 01:58 PM UTC
    by 2 users

    Advanced Event 4
    1 Comments

  • Scripting games 2011 - A04 by Pepa ┼átefan (@stejcz) 12 Apr 2011 10:49 AM UTC
    by 2 users

    Advanced Event 4

    The main function is Get-SvcHostsAndServices that returns all the information about svchost process and its services. The output can be stored in a html file if switch -outputPath is used. There are two helper functions that can be used if filtering is needed: Get-SvcHosts and Add-ServicesToSvchosts Example command: Get-SvcHosts | Where-Object { $_.PageFaults -gt 30000 } | Add-ServicesToSvchosts -appendSvchostInfo Returns information about services and its svchosts for every svchost process where PageFaults is more than 30.000

  • psgameadv4.ps1 by Pak Yeung 12 Apr 2011 07:41 AM UTC
    by 2 users

    Advanced Event 4

    useage .\psgameadv4.ps1 -host testmachine and it will export csv output.

  • get-ServiceInSvcHost by Nathan Linley 12 Apr 2011 07:08 AM UTC
    by 2 users

    Advanced Event 4

    This script will list all services in all svchost process on a local or remote machine, along with service and process information for each. All results are returned as an array of PSObjects for easy manipulation and reformating. This is a powershell v1 script using WMI to collect information. The script has one optional argument of a computername. If the argument matches ? or Help, a set of help information is displayed.