# pluralsight/ps-autolab-env architecture

> Architecture diagram of the GitHub repository pluralsight/ps-autolab-env, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pluralsight/ps-autolab-env
- Repository: https://github.com/pluralsight/ps-autolab-env

## Overview

PSAutoLab provides PowerShell wrapper commands for creating and managing Windows virtual-machine labs on a Hyper-V host. The documented flow is to use its commands and configuration sets to define a DSC-based lab, which is deployed through Lability. The graph preserves the documented host, lab lifecycle, validation, and inspection capabilities. Source excerpts were not provided, so relationships are limited to those explicitly stated in the README; configuration internals and command-level call details are not inferred.

Main entry points: [`functions`](https://github.com/pluralsight/ps-autolab-env/tree/master/functions) (PSAutoLab commands), [`Configurations`](https://github.com/pluralsight/ps-autolab-env/tree/master/Configurations) (Lab configurations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host preparation"]
  node_hostsetup["Host setup"]
  node_hostrefresh["Host refresh"]
end

subgraph group_lab["Lab lifecycle"]
  node_commands["PSAutoLab commands"]
  node_labsetup["Lab setup"]
  node_labrun["Run lab<br/>[Invoke-RunLab.ps1]"]
  node_labrefresh["Refresh lab"]
  node_labshutdown["Shutdown lab"]
  node_labsnapshot["Snapshot lab"]
  node_labwipe["Wipe lab<br/>[Invoke-WipeLab.ps1]"]
  node_internet["Internet access"]
  node_unattend["Unattended setup"]
end

subgraph group_config["Lab definitions"]
  node_configs["Lab configurations"]
end

subgraph group_inspect["Validation and inspection"]
  node_validate["Validate lab"]
  node_summary["Lab summary<br/>[Get-LabSummary.ps1]"]
  node_snapquery["Snapshot query"]
  node_settings["Module settings"]
end

node_user(("PowerShell user"))
node_lability["Lability"]
node_hyperv["Hyper-V host"]

node_user -->|"runs"| node_commands
node_commands -->|"wraps"| node_lability
node_configs -->|"DSC deployment"| node_lability
node_lability -->|"creates labs"| node_hyperv

click node_commands "https://github.com/pluralsight/ps-autolab-env/tree/master/functions"
click node_hostsetup "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SetupHost.ps1"
click node_hostrefresh "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RefreshHost.ps1"
click node_labsetup "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SetupLab.ps1"
click node_labrun "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RunLab.ps1"
click node_labrefresh "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RefreshLab.ps1"
click node_labshutdown "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-ShutdownLab.ps1"
click node_labsnapshot "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SnapshotLab.ps1"
click node_labwipe "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-WipeLab.ps1"
click node_internet "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Enable-Internet.ps1"
click node_unattend "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-UnattendLab.ps1"
click node_configs "https://github.com/pluralsight/ps-autolab-env/tree/master/Configurations"
click node_validate "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-ValidateLab.ps1"
click node_summary "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-LabSummary.ps1"
click node_snapquery "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-LabSnapshot.ps1"
click node_settings "https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-PSAutoLabSetting.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hostsetup,node_hostrefresh,node_user toneBlue
class node_commands,node_labsetup,node_labrun,node_labrefresh,node_labshutdown,node_labsnapshot,node_labwipe,node_internet,node_unattend toneAmber
class node_configs toneMint
class node_validate,node_summary,node_snapquery,node_settings toneRose
class node_lability,node_hyperv toneIndigo
```

## Components

### Host preparation

- [Host setup](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SetupHost.ps1): `functions/Invoke-SetupHost.ps1`
- [Host refresh](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RefreshHost.ps1): `functions/Invoke-RefreshHost.ps1`

### Lab lifecycle

- [PSAutoLab commands](https://github.com/pluralsight/ps-autolab-env/tree/master/functions): `functions`
- [Lab setup](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SetupLab.ps1): `functions/Invoke-SetupLab.ps1`
- [Run lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RunLab.ps1): `functions/Invoke-RunLab.ps1`
- [Refresh lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-RefreshLab.ps1): `functions/Invoke-RefreshLab.ps1`
- [Shutdown lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-ShutdownLab.ps1): `functions/Invoke-ShutdownLab.ps1`
- [Snapshot lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-SnapshotLab.ps1): `functions/Invoke-SnapshotLab.ps1`
- [Wipe lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-WipeLab.ps1): `functions/Invoke-WipeLab.ps1`
- [Internet access](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Enable-Internet.ps1): `functions/Enable-Internet.ps1`
- [Unattended setup](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-UnattendLab.ps1): `functions/Invoke-UnattendLab.ps1`

### Lab definitions

- [Lab configurations](https://github.com/pluralsight/ps-autolab-env/tree/master/Configurations): `Configurations`

### Validation and inspection

- [Validate lab](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Invoke-ValidateLab.ps1): `functions/Invoke-ValidateLab.ps1`
- [Lab summary](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-LabSummary.ps1): `functions/Get-LabSummary.ps1`
- [Snapshot query](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-LabSnapshot.ps1): `functions/Get-LabSnapshot.ps1`
- [Module settings](https://github.com/pluralsight/ps-autolab-env/blob/master/functions/Get-PSAutoLabSetting.ps1): `functions/Get-PSAutoLabSetting.ps1`

### Other components

- **PowerShell user**
- **Lability**
- **Hyper-V host**

## Connections

- PowerShell user → PSAutoLab commands: runs (evidence: `README.md`)
- PSAutoLab commands → Lability: wraps (evidence: `README.md`)
- Lab configurations → Lability: DSC deployment (evidence: `README.md`)
- Lability → Hyper-V host: creates labs (evidence: `README.md`)
