Templates/TaskTemplate.ps1
|
<#
.SYNOPSIS Task description goes here .DESCRIPTION Detailed description of what this task does. .NOTES TaskName: CategoryName.TaskName Version: 1.0.0 Author: Your Name Tags: category RequiresElevation: False SupportedOS: Windows, Linux, MacOS PSEdition: Desktop, Core MinPSVersion: 5.1 Timeout: 60 .EXAMPLE Invoke-Task -TaskName 'CategoryName.TaskName' -ComputerName 'localhost' Description of what this example does. #> [CmdletBinding()] param( # Add your task parameters here # Example: # [Parameter(Mandatory)] # [string]$Path ) try { # Task implementation goes here Write-Verbose "Starting task execution" # Your task logic here # Return task result $result = [PSCustomObject]@{ Success = $true Message = 'Task completed successfully' # Add your output properties here } return $result } catch { Write-Error "Task failed: $_" throw } |