Invoke-XenRepository
Invokes an operation on a Repository object.
Syntax
Invoke-XenRepository [-Repository] <Repository>
-XenAction {Introduce | IntroduceBundle | IntroduceRemotePool | Forget} [-PassThru]
[-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Invoke-XenRepository [-Ref] <XenRef[Repository]>
-XenAction {Introduce | IntroduceBundle | IntroduceRemotePool | Forget} [-PassThru]
[-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Invoke-XenRepository [-Uuid] <guid>
-XenAction {Introduce | IntroduceBundle | IntroduceRemotePool | Forget} [-PassThru]
[-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Invoke-XenRepository [-Name] <string>
-XenAction {Introduce | IntroduceBundle | IntroduceRemotePool | Forget} [-PassThru]
[-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Description
Invokes an operation on a Repository object. Use the -XenAction parameter to select which operation to perform.
Introduce: Add the configuration for a new remote repository.
IntroduceBundle: Add the configuration for a new bundle repository.
IntroduceRemotePool: Add the configuration for a new remote pool repository.
Forget: Remove the repository record from the database.
Parameters
-Async
If set, the operation runs asynchronously and returns a Task object that can be used to track its progress.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BestEffort
If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BinaryUrl
Base URL of binary packages in this repository. Accepted when -XenAction is Introduce, IntroduceRemotePool.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Certificate
The host certificate of the coordinator of the remote pool. Accepted when -XenAction is IntroduceRemotePool.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-GpgkeyPath
The GPG public key file name. Accepted when -XenAction is Introduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Name
The name of the Repository to operate on.
| Attribute | Value |
|---|---|
| Type | string |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | name_label |
-NameDescription
The description of the repository. Accepted when -XenAction is Introduce, IntroduceBundle, IntroduceRemotePool.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NameLabel
The name of the repository. Accepted when -XenAction is Introduce, IntroduceBundle, IntroduceRemotePool.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PassThru
If set, the cmdlet returns the affected object. By default the cmdlet does not generate any output.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Ref
The Repository object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[Repository] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-Repository
The Repository object to operate on.
| Attribute | Value |
|---|---|
| Type | Repository |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-SessionOpaqueRef
The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-SourceUrl
Base URL of source packages in this repository. Accepted when -XenAction is Introduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Update
True if the repository is an update repository. This means that updateinfo.xml will be parsed. Accepted when -XenAction is Introduce.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
The UUID of the Repository to operate on.
| Attribute | Value |
|---|---|
| Type | guid |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | wi |
-XenAction
Selects which action to use.
| Attribute | Value |
|---|---|
| Type | XenRepositoryAction |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | Introduce, IntroduceBundle, IntroduceRemotePool, Forget |
Inputs
-
Repository -
XenRef[Repository] -
guid -
string
Outputs
-
System.Object
Examples
Example 1: Run the Introduce operation
PS> Get-XenRepository -Name "Demo Repository" | Invoke-XenRepository -XenAction Introduce -PassThru
Invokes the Introduce operation on a Repository. -PassThru writes the result to the pipeline.
Example 2: Run the Introduce operation by name
PS> Invoke-XenRepository -XenAction Introduce -Name "Demo Repository" -PassThru
Invokes the Introduce operation on a Repository. -Name matches on name\_label, which is not unique, so every match is operated on. -PassThru writes the result to the pipeline.
Example 3: Run Introduce asynchronously
PS> Invoke-XenRepository -Name "Demo Repository" -XenAction Introduce -Async -PassThru | Wait-XenTask -ShowProgress
Runs the same operation asynchronously and follows the task it returns.
Related links
-
Class: Repository
-
Using the XenServer PowerShell module