For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set-PSUAiAgent

Updates an existing AI agent definition.

SYNOPSIS

Updates an existing AI agent definition.

SYNTAX

Id

Set-PSUAiAgent [-Id] <Int64> [-Name <String>] [-Description <String>] [-Instructions <String>]
 [-Model <String>] [-ApiKey <Variable>] [-Tool <String[]>] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

AiAgent

Set-PSUAiAgent [-AiAgent] <AiAgent> [-Name <String>] [-Description <String>] [-Instructions <String>]
 [-Model <String>] [-ApiKey <Variable>] [-Tool <String[]>] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

DESCRIPTION

Loads an AI agent by Id or pipeline object and updates only the fields supplied to the cmdlet. This lets you make partial changes without rebuilding the entire agent definition.

EXAMPLES

Example 1

Updates agent 12 with new instructions and replaces its tool list.

PARAMETERS

-AiAgent

Specifies the AI agent to target.

-ApiKey

Specifies the PSU variable that contains the API key used by the AI agent.

-AppToken

Specifies the app token to use when authenticating to the PowerShell Universal management API.

-ComputerName

Specifies the URL or host name of the target PowerShell Universal instance. Bare host names are normalized to an http://:5000 URL.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

-Credential

Specifies the credentials to use for Basic authentication against the PowerShell Universal management API.

-Description

Specifies a description for the resource.

-Id

Specifies the numeric Id of the resource.

-Instructions

Specifies the system instructions or operating guidance the AI agent follows when generating responses.

-Integrated

Uses the in-process integrated management client when the cmdlet runs inside PowerShell Universal.

-Model

Specifies the AI model identifier the agent should use for completions.

-Name

Specifies the name of the resource.

-Tool

Specifies the names of the AI tools the agent can use.

-TrustCertificate

Allows connections to servers with untrusted TLS certificates.

-UseDefaultCredentials

Uses the current Windows credentials when authenticating to the management API.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.

INPUTS

PowerShellUniversal.Models.Intelligence.AiAgent

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?