Systems Management Samples

The following table lists Windows Server 2008 samples as well as samples new to this release of the Windows SDK that pertain to systems management and scheduling tasks. They are installed by default under the Samples folder in the following path:

\Program Files\Microsoft SDKs\Windows\v6.1\Samples

Sample

Description

Location (under Samples)

Windows  Event Log Configuration Sample

Demonstrates the configuration capabilities of the new Windows Event Log.

SysMgmt\Events\Config

Windows  Event Log Maintenance Sample

Demonstrates the logging capabilities of the new Windows Event Log.

SysMgmt\Events\Logging

Windows  Event Log Publisher Metadata Sample

Demonstrates the publisher and event discovery capabilities of the new Windows Event Log.

SysMgmt\Events\PublisherMetadata

Windows  Event Log Reading Events Sample

Demonstrates the querying and rendering capabilities of the new Windows Event Log.

SysMgmt\Events\Querying

Windows  Event Log Subscribing Sample

Demonstrates the subscription capabilities of the new Windows Event Log.

SysMgmt\Events\Subscribe

Windows  Event Collector Sample

Demonstrates the Windows Event Collector APIs.

SysMgmt\Events\WEC\CPP

Reduce Reboot on Windows Installer Update Sample

Reduces computer restarts by unloading Msi.Dll in all system processes.

SysMgmt\Msi\RebootReduction

Execute Task on System Startup Sample

Creates a task to run an executable at system startup.

SysMgmt\TaskSched\ExeOnBoot

Execute  Task on System Startup Sample

Creates a task that runs an executable at system startup.

SysMgmt\TaskSched\ExeOnBoot

Execute Task on Logon Sample

Creates a task to run an executable on logon.

SysMgmt\TaskSched\ExeOnLogon

Execute Task on Registration Sample

Creates a task to run an executable on registration.

SysMgmt\TaskSched\ExeOnRegistration

Enumerate Registered Tasks Sample

Enumerates registered tasks.

SysMgmt\TaskSched\RegisteredTaskEnum

Windows  Remote Management Sample

Shows how to use Windows Remote Management (WinRM) to change a property value for a hardware component.

SysMgmt\WinRM\HardwareManagement

ADB1: Basic PowerShell provider Sample

Demonstrates a Basic provider

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample01

ADB2: Provider which creates PowerShell Drives Sample

Demonstrates a Provider which creates PowerShell Drives

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample02

ADB03: Provider which creates PowerShell Drives and manipulates items Sample

Demonstrates a Provider which creates PowerShell Drives and manipulates items

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample03

ADB04: Provider with container based manipulation of items Sample

Demonstrates a Provider with container based manipulation of items

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample04

ADB5: Provider with support for levels of navigation Sample

Demonstrates a Provider with support for levels of navigation

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample05

ADB06: Provider with support for content access Sample

Demonstrates a Provider with support for content access

SysMgmt\WindowsPowerShell\CSharp\AccessDBProviderSample06

GPS01: Naming and Declaring a Cmdlet Sample

Basic Cmdlet which is used to display a list of available processes.

SysMgmt\WindowsPowerShell\CSharp\GetProcessSample01

GPS02: Parameter Declaration and Validation Sample

Demonstrates Parameter Declaration and Validation

SysMgmt\WindowsPowerShell\CSharp\GetProcessSample02

GPS03: Taking Input from Pipeline Sample

Demonstrates Taking Input from Pipeline

SysMgmt\WindowsPowerShell\CSharp\GetProcessSample03

GPS04: Error Handling Sample

Demonstrates Error Handling

SysMgmt\WindowsPowerShell\CSharp\GetProcessSample04

GPS05: A completely conforming and reasonably complete get cmdlet Sample

Demonstrates a completely conforming and reasonably complete get cmdlet.

SysMgmt\WindowsPowerShell\CSharp\GetProcessSample05

Basic host implementation Sample

Demonstrates creating a host interface class, mapping exit status, creating a runspace using host implementation, creating and running a script and verify if script returned correct value and the exit process operated correctly

SysMgmt\WindowsPowerShell\CSharp\Host01

Host Interface and Host Raw User Interface Sample

Demonstrates creating a host interface class, a host user interface and a host raw user interface class, creating a runspace using host implementation, setting host culture, creating and running a script and verify if script returned correct value and the exit process operated correctly

SysMgmt\WindowsPowerShell\CSharp\Host02

Completely interactive console based host Sample

Demonstrates a Completely interactive console based host

SysMgmt\WindowsPowerShell\CSharp\Host03

Run a command in the default runspace Sample

Demonstrates how to run a command in the default runspace

SysMgmt\WindowsPowerShell\CSharp\Runspace01

Run scripts in default runspace and show results in WinForm Sample

Demonstrates how to Run scripts in default runspace and show results in WinForm

SysMgmt\WindowsPowerShell\CSharp\Runspace02

Run scripts in default runspace handling input and errors Sample

Demonstrates how to Run scripts in default runspace handling input and errors

SysMgmt\WindowsPowerShell\CSharp\Runspace03

Run scripts in default runspace handling input and exceptions Sample

Demonstrates how to Run scripts in default runspace handling input and exceptions

SysMgmt\WindowsPowerShell\CSharp\Runspace04

Using specific consolefiles to invoke commands Sample

Demonstrates how to use specific consolefiles to invoke commands

SysMgmt\WindowsPowerShell\CSharp\Runspace05

Adding snap-in to a Runspace configuration and using it to invoke commands Sample

Demonstrates adding snap-in to a Runspace configuration and using it to invoke commands

SysMgmt\WindowsPowerShell\CSharp\Runspace06

Adding Command and Scripts directly to Pipeline Sample

Demonstrates adding Command and Scripts directly to Pipeline

SysMgmt\WindowsPowerShell\CSharp\Runspace07

Adding parameters to commands in Pipeline Sample

Demonstrates adding parameters to commands in Pipeline

SysMgmt\WindowsPowerShell\CSharp\Runspace08

Asynchronous Invocation of Commands from Pipeline Sample

Demonstrates Asynchronous Invocation of Commands from Pipeline

SysMgmt\WindowsPowerShell\CSharp\Runspace09

Add specific Cmdlet to RunspaceConfiguration and use modified configuration for invoking Cmdlets Sample

Demonstrates Adding specific Cmdlet to RunspaceConfiguration and use modified configuration for invoking Cmdlets

SysMgmt\WindowsPowerShell\CSharp\Runspace10

SObj: Creating Advanced Cmdlets Sample

Demonstrates Creating Advanced Cmdlets

SysMgmt\WindowsPowerShell\CSharp\SelectObject

SStr: Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\CSharp\SelectString

SPS01: ShouldProcess, ShouldContinue, Force and PassThru support Sample

Demonstrates ShouldProcess, ShouldContinue, Force and PassThru support

SysMgmt\WindowsPowerShell\CSharp\StopProcessSample01

SPS02: User Notifications Sample

Demonstrates User Notifications (WriteWarning, WriteVerbose, WriteDebug)

SysMgmt\WindowsPowerShell\CSharp\StopProcessSample02

SPS03: Aliases, Wildcards and Help messages Sample

Demonstrates Aliases, Wildcards and HelpMessage

SysMgmt\WindowsPowerShell\CSharp\StopProcessSample03

SPS04: InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\CSharp\StopProcessSample04

Template for Provider Sample

Shows a Template for a Provider that hooks into the Windows PowerShell namespaces

SysMgmt\WindowsPowerShell\CSharp\TemplateProvider

MCPP: Run scripts in default runspace handling input and errors Sample

Demonstrates how to Run scripts in default runspace handling input and errors

SysMgmt\WindowsPowerShell\MCPP\Runspace03

MCPP: Run scripts in default runspace handling input and exceptions Sample

Demonstrates how to Run scripts in default runspace handling input and exceptions

SysMgmt\WindowsPowerShell\MCPP\Runspace04

MCPP: SStr: Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\MCPP\SelectString

MCPP: InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\MCPP\StopProcessSample

Formats and Types Sample XML

Demonstrates formats and types XML

SysMgmt\WindowsPowerShell\SCHEMAS

VB: GPS05: A completely conforming and reasonably complete get cmdlet Sample

Demonstrates a completely conforming and reasonably complete get cmdlet.

SysMgmt\WindowsPowerShell\VB\GetProcessSample05

VB: Run a command in the default runspace Sample

Demonstrates how to run a command in the default runspace

SysMgmt\WindowsPowerShell\VB\Runspace01

VB: Run scripts in default runspace and show results in WinForm Sample

Demonstrates how to Run scripts in default runspace and show results in WinForm

SysMgmt\WindowsPowerShell\VB\Runspace02

VB: Run scripts in default runspace handling input and errors Sample

Demonstrates how to Run scripts in default runspace handling input and errors

SysMgmt\WindowsPowerShell\VB\Runspace03

VB: Run scripts in default runspace handling input and exceptions Sample

Demonstrates how to Run scripts in default runspace handling input and exceptions

SysMgmt\WindowsPowerShell\VB\Runspace04

VB: Creating Advanced Cmdlets Sample

Demonstrates Creating Advanced Cmdlets

SysMgmt\WindowsPowerShell\VB\SelectObject

VB: Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates Cmdlet that uses InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\VB\SelectString

VB: InputObject, ParameterSets, PSCmdlet derivation Sample

Demonstrates InputObject, ParameterSets, PSCmdlet derivation

SysMgmt\WindowsPowerShell\VB\StopProcessSample04

Community Additions

ADD
Show: