- Courses
- đź’»Programming Languages
- 🪟PowerShell
- Enterprise-Grade PowerShell
- Building Tooling and Automation Frameworks
- Creating Internal Toolkits
On this page
Creating Internal Toolkits
Updated on June 28, 2026
By Enrico Hochkoeppler
Web Developer & TutoriaLibre Founder
An internal PowerShell toolkit is a curated collection of modules, templates, scaffolding commands, configuration schemas, and helper utilities that together form a standardised automation experience for an organisation. Rather than each team inventing its own conventions, the toolkit defines how automation is structured, how configuration is expressed, how logging and error handling work, how cloud resources are provisioned, how credentials are retrieved, and how deployments are executed and monitored. The toolkit becomes the platform layer for automation — engineers no longer start from scratch; they start from the toolkit. A mature internal toolkit provides scaffolding commands to generate new automation projects with the correct structure, configuration files, logging setup, and CI/CD integration. It enforces idempotent behaviour, consistent logging, unified error handling, and testability with Pester. Distribution occurs through controlled channels such as internal PowerShell repositories or Azure Artifacts, with semantic versioning ensuring compatibility across teams and pipelines.
The Purpose and Role of an Internal Toolkit​
An internal toolkit represents the next stage of maturity after reusable automation libraries. While a library provides functions and abstractions, a toolkit provides a cohesive, opinionated environment for performing automation tasks consistently across teams. Toolkits unify patterns, enforce standards, and give engineers a predictable set of capabilities that can be applied to any automation scenario.
The toolkit defines:
- How automation is structured
- How configuration is expressed
- How logging, error handling, and validation work
- How cloud resources are provisioned
- How credentials and secrets are retrieved
- How deployments are executed and monitored
When an organisation adopts an internal toolkit, automation scripts become consistent, maintainable, and scalable. Engineers can focus on solving business problems rather than reinventing foundational patterns.
Key Components of an Internal Toolkit​
A mature internal toolkit consists of several essential components that work together to provide a unified automation experience.
Core Module​
Every toolkit begins with a core module that provides foundational capabilities. This module defines the conventions that all automation must follow. It exposes public commands for common tasks and hides internal complexity behind private helpers.
A typical module layout:
Company.Toolkit/
│ Company.Toolkit.psd1
│ Company.Toolkit.psm1
│
├── Public/
│ New-Project.ps1
│ Invoke-Deployment.ps1
│ Get-ToolkitConfig.ps1
│
└── Private/
Resolve-PathSafe.ps1
Invoke-ApiCall.ps1
Write-ToolkitLog.ps1
The toolkit's public surface is intentionally small. Its power comes from the internal consistency of its private components.
Scaffolding and Project Generation​
A hallmark of a mature toolkit is the ability to generate new automation projects with a single command. This ensures that every project begins with the correct structure, configuration files, logging setup, and CI/CD integration.
Example: a scaffolding command
function New-Project {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$Name,
[Parameter()]
[string]$Path = "."
)
$projectPath = Join-Path $Path $Name
New-Item -ItemType Directory -Path $projectPath | Out-Null
Copy-Item "$PSScriptRoot\Templates\BaseProject\*" $projectPath -Recurse
Write-ToolkitLog -Level Info -Message "Created new automation project at '$projectPath'."
return $projectPath
}
This command creates a directory structure, copies template files, and sets up the necessary configuration for a new automation project. The Copy-Item command replicates the template files to the new project location. The Write-ToolkitLog function logs the creation event.
Configuration as a First‑Class Concept​
Internal toolkits must define a standard configuration model. This ensures that automation behaves consistently across environments and that configuration can be validated before execution.
Example: loading and validating configuration
function Get-ToolkitConfig {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$Path
)
if (-not (Test-Path $Path)) {
throw "Configuration file '$Path' not found."
}
$config = Get-Content $Path | ConvertFrom-Json
if (-not $config.Environment) {
throw "Configuration must include an 'Environment' property."
}
return $config
}
The Test-Path cmdlet checks whether the configuration file exists. The Get-Content and ConvertFrom-Json cmdlets parse the JSON configuration. The validation ensures that required properties are present before the automation proceeds.
Standardised Execution Workflows​
A toolkit must provide a unified way to execute automation tasks. This includes pre‑execution validation, logging, error handling, state checks, and post‑execution reporting.
Example: a standardised execution wrapper
function Invoke-Deployment {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[string]$ConfigPath
)
$config = Get-ToolkitConfig -Path $ConfigPath
Write-ToolkitLog -Level Info -Message "Starting deployment for environment '$($config.Environment)'."
try {
Invoke-DeploymentSteps -Config $config
Write-ToolkitLog -Level Info -Message "Deployment completed successfully."
}
catch {
Write-ToolkitLog -Level Error -Message "Deployment failed: $($_.Exception.Message)"
throw
}
}
This wrapper ensures that every deployment — regardless of the underlying logic — follows the same lifecycle. The try/catch block handles errors consistently, and the logging functions provide observability.
Cloud, API, and Platform Helpers​
Internal toolkits often include specialised helpers for interacting with cloud platforms, internal APIs, or infrastructure systems. These helpers abstract away authentication, error handling, and retry logic.
Example: a cloud helper
function Invoke-CloudCommand {
param([scriptblock]$Command)
try {
& $Command
}
catch {
throw "Cloud operation failed: $($_.Exception.Message)"
}
}
This helper ensures that all cloud interactions follow the same reliability and error‑handling patterns.
Unified Logging and Observability​
A toolkit must provide a unified logging system. This ensures that all automation — regardless of the project — produces consistent, machine‑readable logs.
Example: toolkit logging
function Write-ToolkitLog {
param(
[Parameter(Mandatory)]
[ValidateSet("Info","Warning","Error")]
[string]$Level,
[Parameter(Mandatory)]
[string]$Message
)
$timestamp = (Get-Date).ToString("o")
Write-Output "[$timestamp][$Level] $Message"
}
Every public function in the toolkit uses this logging mechanism. The log output includes an ISO 8601 timestamp, a log level, and the message. For enterprise environments, consider integrating with a logging module that supports structured logging to centralised systems.
PSAppDeployToolkit: A Case Study in Enterprise Toolkits​
One of the most prominent examples of an enterprise‑grade PowerShell toolkit is the PSAppDeployToolkit (PSADT). This open‑source framework is designed to simplify and standardise Windows software deployment at scale.
Core Capabilities​
PSAppDeployToolkit provides a PowerShell‑based framework that integrates seamlessly with existing deployment solutions such as Microsoft Intune, SCCM, Tanium, and BigFix. It combines a battle‑tested prescriptive workflow, an extensive library of functions for common deployment tasks, a customisable branded user experience, and full‑fidelity logging to produce consistently high deployment success rates of over 98%.
The toolkit supports:
- User Interface and Dialogs — Modern Fluent UI with light/dark mode, branded dialogs, deferrals, countdown timers, and multi‑language localisation out of the box
- Enterprise Platform Integration — First‑class support for Intune, ConfigMgr, and endpoint management platforms with standardised deployment flows and exit code handling
- Application Lifecycle Management — Every stage from discovery through removal, including MSI, EXE, and zero‑config deployments with Pre/Main/Post phases
- Security, Modes and Extensibility — Four deployment modes, client‑server architecture for secure SYSTEM context, ADMX Group Policy templates, and a fully extensible module system
Recent Innovations​
Version 4.1 of PSAppDeployToolkit introduced a major security improvement: it no longer requires ServiceUI to display user interface when deploying applications as SYSTEM using Intune. ServiceUI works by manipulating system security tokens in a way that could allow malicious actors to escalate privileges or bypass security controls. The new approach leverages the Windows security model and separates user interactions onto a process running in the users' session — never performing any user interaction or messaging within the SYSTEM context.
Additional enhancements include:
- Deferral deadline and countdown timer on close apps dialog
- Ability to prevent the restart dialog from being dismissed once a certain point in the countdown is reached
- Support for formattable text (bold, italic and accent) and URL hyperlinks in dialog messages
- Ability to set different icons for light and dark mode
- New
-UseUnelevatedTokenparameter to force a process to run without elevation -WaitForChildProcessesparameter to wait for all child processes to end
Why PSADT Matters for Internal Toolkits​
PSAppDeployToolkit demonstrates several principles that apply to any internal toolkit:
- Prescriptive workflow — The toolkit defines how deployments should be structured, reducing variation across teams
- Rich function library — Common tasks are encapsulated in reusable functions, eliminating duplication
- Customisable user experience — The toolkit can be branded and configured to match organisational requirements
- Extensibility — The toolkit can be extended with additional functions and modules
- Enterprise‑ready — The toolkit is built for large enterprise environments where stability is absolutely crucial
Other Notable PowerShell Toolkits​
1E PowerShell Toolkit​
The 1E PowerShell Toolkit exposes many features of the 1E Platform as PowerShell cmdlets. It allows administrators to deploy and manage instructions, manage users and roles, create management groups, and automate the platform. The toolkit supports dynamic scripting, enabling administrators to run PowerShell scripts or executable programs on devices via the 1E Platform without first creating an instruction.
PDQ PowerShell Integration​
PDQ Connect includes a PowerShell Scanner feature that allows IT teams to collect custom device data by running PowerShell scripts and storing the results in a structured, searchable format. Administrators can write scripts in the console or upload .ps1 files, validate them on test devices, and then use the results across filtering, reporting, device groups, and automations. PDQ also provides a Commands Tool that executes PowerShell and Command Prompt commands directly from the device details page.
Community Toolkits​
The PowerShell community has produced numerous toolkits for specific domains, such as:
- Evergreen — A simple PowerShell module that returns the latest version and download URLs for common enterprise Windows applications
- PSGraphToolbox — A PowerShell toolkit for Microsoft Graph API with delta sync, batching, and HTML reports
- PowerShell Systems Engineering — A curated collection of 33 production‑grade PowerShell scripts for Active Directory, security hardening, and infrastructure monitoring
Distribution and Lifecycle Management​
Internal toolkits must be distributed through a controlled channel such as:
- An internal PowerShell repository
- Azure Artifacts
- A private NuGet feed
This allows teams to install and update the toolkit consistently:
Install-Module -Name Company.Toolkit -Repository InternalPSRepo
Versioning follows semantic rules to ensure compatibility across teams and pipelines. For modules that support Updatable Help, the HelpInfoUri key in the manifest points to the Help information file.
Performance Considerations​
A module manifest that does not follow performance guidelines can have a noticeable impact on general PowerShell performance. Command auto‑discovery analyses each module to determine which commands it exports, and this analysis can be expensive. To avoid this overhead:
- Do not use wildcards in
FunctionsToExportentries — explicitly list exported functions - If the module does not export functions, specify this explicitly with
@() - A missing or
$nullentry is equivalent to specifying the wildcard*
Enterprise Automation Patterns​
A mature internal toolkit enables enterprise‑grade automation patterns:
- Centralised execution policies — Create execution policies for each PowerShell script in use. Keep service account permissions as low as possible and set safe parameters to avoid mistakes
- Role‑based delegation — Control who can execute which automation tasks
- Centralised logging and compliance reporting — Ensure all automation activities are auditable
- Business continuity for PowerShell automation — Requires fundamentally different infrastructure than scattered scripts provide
- Centralised execution environments — Make PowerShell automation visible and controllable in ways that scattered files simply cannot
Enterprise PowerShell automation allows organisations to run scripts and workflows from a central platform with governance, delegation, credentials, scheduling, and auditability. The practice involves managing scripts, execution, permissions, credentials, logging, scheduling, and reuse through a single controlled model instead of scattering them across folders and workstations.
Summary​
Creating internal toolkits is a formal engineering practice that elevates PowerShell automation from individual scripts to a unified automation platform. A toolkit provides scaffolding, configuration standards, execution workflows, logging, cloud helpers, and distribution mechanisms that ensure consistency across the entire organisation. The PSAppDeployToolkit demonstrates how a well‑designed toolkit can simplify and standardise complex automation tasks at enterprise scale. By designing toolkits with clear structure, predictable interfaces, and strong engineering discipline, you create a foundation that supports scalable, maintainable, and enterprise‑grade automation.
Found this helpful? Share the knowledge...
... or support this project to keep it alive!
Previous
Reusable Automation Libraries
Next
Integrating PowerShell with CI/CD Pipelines
-
The Purpose and Role of an Internal Toolkit
-
Key Components of an Internal Toolkit
- Core Module
- Scaffolding and Project Generation
- Configuration as a First‑Class Concept
- Standardised Execution Workflows
- Cloud, API, and Platform Helpers
- Unified Logging and Observability
-
PSAppDeployToolkit: A Case Study in Enterprise Toolkits
- Core Capabilities
- Recent Innovations
- Why PSADT Matters for Internal Toolkits
-
Other Notable PowerShell Toolkits
- 1E PowerShell Toolkit
- PDQ PowerShell Integration
- Community Toolkits
-
Distribution and Lifecycle Management
- Performance Considerations
-
Enterprise Automation Patterns
-
Summary
