Skip to content

Global Configuration (PSWinDeploy.psd1)

All PSWinDeploy settings live in a single file: PSWinDeploy.psd1.

Config.psm1 resolves this file automatically by walking up from the module folder → C:\DeployX:\Deploy (WinPE) → built-in defaults, so the same modules work identically on the server and inside WinPE.

Typical sections

@{
    Shares = @{
        Images   = '\\SERVER\Images'
        Deploy   = '\\SERVER\Deploy'
        Drivers  = '\\SERVER\Drivers'
        Software = '\\SERVER\Software'
        Scripts  = '\\SERVER\Scripts'
        Logs     = '\\SERVER\Logs'
    }

    WinPE = @{
        Architecture = 'amd64'   # amd64 or arm64 only (x86 removed since ADK 2004)
        MaxReboots   = 5
    }

    Notifications = @{
        Mail = @{
            Enabled    = $true
            SmtpServer = 'smtp.corp.local'
            To         = @('it@corp.local')
            ToOnError  = @('it@corp.local', 'manager@corp.local')
        }
        Teams = @{
            Enabled    = $true
            WebhookUrl = 'https://outlook.office.com/webhook/xxx'
        }
    }
}

Loading the configuration

Import-Module .\Modules\Config\Config.psm1
$config = Get-PSWinDeployConfig
$config.Shares.Images

Anti-loop protection

WinPE.MaxReboots caps the number of automatic reboots a single deployment can trigger. If the threshold is exceeded, the sequence is stopped and flagged as failed rather than looping indefinitely.