Set-ASSoftwareRepositoryState

AdminStudio 2023 | 25.0 | AdminStudio PowerShell Cmdlets

Edition:Powershell cmdlets are enabled with AdminStudio Enterprise Edition and with Workflow Manager.

You can use the Set-ASSoftwareRepositoryState cmdlet to perform CheckOut and UndoCheckOut operations on a Software Repository-enabled Application Catalog.

Note:The CheckIn operation is restricted to the user interface and is not supported through the Set‑ASSoftwareRepositoryState API.

Example

The following is the syntax used to check out a package from the Software Repository:

Set-ASSoftwareRepositoryState -PackageId nnnn -State state

For example:

Set-ASSoftwareRepositoryState -PackageId 45 -State CheckOut

Parameters

The Set-ASSoftwareRepositoryState cmdlet has the following parameters:

Set-ASSoftwareRepositoryState Parameters

Parameter

Description

PackageId

(Required) Use to specify the ID number of the package to be checked out or have its checkout canceled.

State

(Required) Use one of the following values to specify the change you want to make to the Software Repository state:

CheckOut 
UndoCheckOut 

Returns

When executed, one of the following values is returned:

Return Values for Set-ASSoftwareRepositoryState

Return Value

Description

0

The state change was successful.

-1

Error: Package directory was not found.

-2

Error: Package copy failure.

-3

Error: Package move failure.

-4

Error: Package add failure.

-5

Error: Package directory exists.

-10

Error: General failure.

-11

Error: Check out failure.

-12

Error: Insert into failure.

-13

Error: Delete failure.

-14

Error: Get latest version failure.

-15

Error: Mismatched connection failure.

-16

Error: Package missing failure.

-17

Error: Operation canceled.