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

Remove-PSUScript

Removes a script.

SYNOPSIS

Removes a script.

SYNTAX

All (Default)

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

Script

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

Id

Remove-PSUScript [-Id] <Int64> [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

DESCRIPTION

Removes a script. This also deletes the script from the PSU internal git repo as well as an optionally configured remote.

EXAMPLES

Example 1

Removes 'Script1.ps1'

PARAMETERS

-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.

-Integrated

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

-Id

The Id of the script to remove.

-Script

Specifies the script to target.

-UseDefaultCredentials

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

-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?