Getting Started

This guide is the shortest path from install to a verified Dispatch run.

Prerequisites

Install

The primary v1 install path downloads the source installer from GitHub, clones the repository to a temporary folder, builds the current win-x64 executable, installs the PowerShell module, and adds the bundled executable folder to PATH:


irm https://raw.githubusercontent.com/Kmac907/Dispatch/main/packaging/install-from-source.ps1 | iex

Source install requires Git and the .NET 8 SDK because it builds Dispatch before installing it. If the SDK is missing, the installer fails early with a prerequisite message.

After install, both entry points are available:


dispatch --help
Test-Dispatch

PowerShell normally auto-loads the installed module when you run Test-Dispatch or another wrapper command. Use Import-Module Dispatch -Force only when auto-loading is disabled or you need to reload the module in an existing shell.

Build And Run From Source

Use source execution when developing Dispatch or validating a checkout:


git clone https://github.com/Kmac907/Dispatch.git
cd Dispatch
dotnet build .\Dispatch.sln
dotnet test .\Dispatch.sln
dotnet run --project .\src\Dispatch.Cli\Dispatch.Cli.csproj -- --help

The source installer can also build and install from an existing checkout:


.\packaging\install-from-source.ps1 -Scope CurrentUser

Validate Locally From Source


dotnet run --project .\src\Dispatch.Cli\Dispatch.Cli.csproj -- --help
dotnet run --project .\src\Dispatch.Cli\Dispatch.Cli.csproj -- version
dotnet run --project .\src\Dispatch.Cli\Dispatch.Cli.csproj -- doctor

dispatch doctor checks local prerequisites and reports problems. It does not repair endpoint remoting, firewall, delegation, admin-share, or policy settings.

Create A Small Inventory

Use a text file for the simplest target list:


PC001
PC002

Use YAML when you need defaults, groups, credentials, or transport metadata:


defaults:
  transport: psrp
groups:
  kiosks:
    hosts: [KIOSK01, KIOSK02]
hosts:
  SERVER01:
    transport: winrm

Inventory files only select host metadata and credential references. Credential provider details live in the global Dispatch config.

Preview A Run


dispatch run ps .\Fix.ps1 --target PC001 --transport psrp --plan --output json

Planning validates local inputs and produces the execution plan before endpoint work starts.

Run A Script


dispatch run ps .\Fix.ps1 --target PC001,PC002 --transport psrp

Use --transport winrm for raw WS-Management shell execution or --transport psexec where admin-share staging and PsExec policy are available.

Run against an inventory group:


dispatch run ps .\Fix.ps1 --inventory .\hosts.yml --target kiosks --transport psrp

Pass ordinary script arguments after the script path:


dispatch run ps .\Fix.ps1 -Mode Repair -Verbose --target PC001 --transport psrp

Find Results

Runs are written under:


C:\ProgramData\Dispatch\Runs\<run-id>\

Important files:

Inspect previous runs:


dispatch logs list
dispatch logs show latest
dispatch logs tail latest --count 50

If The First Remote Run Fails