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

Rename-PSUScript

Renames a script.

SYNOPSIS

Renames a script.

SYNTAX

Rename-PSUScript [-Script] <Script> [-Name] <String> [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

DESCRIPTION

Renames a script. This also renames the script in the git repo.

EXAMPLES

Example 1

PS C:\> $Script = Get-UAScript -name 'Script1.ps1'
PS C:\> Rename-UAScript -Script $Script -Name 'Script2.ps1'

Renames the script Script1.ps1 to Script2.ps1.

PARAMETERS

-AppToken

An app token to access the PSU API.

-ComputerName

The HTTP address of the PSU REST API server.

-Name

The new name for the script.

-Script

The script to rename. Use Get-UAScript to retrieve a Script object.

-UseDefaultCredentials

Use default credentials when connecting to the management API

-Integrated

Executes the command internally rather than using the Management API. Only works when running script from within PowerShell Universal.

-Credential

Credentials to login to the PowerShell Universal Management API.

-TrustCertificate

Whether the cmdlet should ignore certificate issues.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

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

UniversalAutomation.Script

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?