TOPdesk PowerShell
Use this skill for production-grade PowerShell in TOPdesk projects.
Workflow
- Define the operational boundary: local file processing, TOPdesk API/OData, Power BI, install task, migration, or CI.
- Prefer advanced functions with
[CmdletBinding()], explicit parameters,Set-StrictMode -Version Latest, and$ErrorActionPreference = "Stop". - Keep secrets out of source. Accept tokens through environment variables, SecretManagement, or parameters that are never logged.
- Use
-LiteralPathfor concrete file paths and validate destructive targets before deletion or replacement. - Emit objects for pipelines; use
Write-Verbosefor progress andWrite-Error/exceptions for failures. - Add validation and a dry-run path for changes that touch remote systems or many files.
- Run
scripts/Test-TopdeskPowerShellScript.ps1against generated scripts when practical.
References
Load only what is needed:
references/powershell-patterns.mdfor script architecture, error handling, logging, file safety, API calls, and packaging.references/topdesk-powershell-recipes.mdfor TOPdesk-specific API/OData, migration, validation, and Power BI recipes.
Assets
Use assets/topdesk-script-template.ps1 as the starting point for new scripts.