Add-XenVDI
Adds to fields of a VDI object.
Syntax
Add-XenVDI [-VDI] <VDI> [-PassThru] [-OtherConfig <KeyValuePair[string, string]>]
[-XenstoreData <KeyValuePair[string, string]>]
[-SmConfig <KeyValuePair[string, string]>] [-Tags <string>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Add-XenVDI [-Ref] <XenRef[VDI]> [-PassThru] [-OtherConfig <KeyValuePair[string, string]>]
[-XenstoreData <KeyValuePair[string, string]>]
[-SmConfig <KeyValuePair[string, string]>] [-Tags <string>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Add-XenVDI [-Uuid] <guid> [-PassThru] [-OtherConfig <KeyValuePair[string, string]>]
[-XenstoreData <KeyValuePair[string, string]>]
[-SmConfig <KeyValuePair[string, string]>] [-Tags <string>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Add-XenVDI [-Name] <string> [-PassThru] [-OtherConfig <KeyValuePair[string, string]>]
[-XenstoreData <KeyValuePair[string, string]>]
[-SmConfig <KeyValuePair[string, string]>] [-Tags <string>] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description
Adds values to the collection-valued fields of a VDI. Each optional parameter listed below corresponds to a field that can be added to.
Parameters
-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 |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-Name
The name of the VDI to operate on.
| Attribute | Value |
|---|---|
| Type | string |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | name_label |
-OtherConfig
Add the given key-value pair to the other\_config field of the given VDI.
| Attribute | Value |
|---|---|
| Type | KeyValuePair[string, 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 VDI object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[VDI] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-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 |
-SmConfig
Add the given key-value pair to the sm\_config field of the given VDI.
| Attribute | Value |
|---|---|
| Type | KeyValuePair[string, string] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
The UUID of the VDI to operate on.
| Attribute | Value |
|---|---|
| Type | guid |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
-VDI
The VDI object to operate on.
| Attribute | Value |
|---|---|
| Type | VDI |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-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 |
-XenstoreData
Add the given key-value pair to the xenstore\_data field of the given VDI.
| Attribute | Value |
|---|---|
| Type | KeyValuePair[string, string] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
Inputs
-
VDI -
XenRef[VDI] -
guid -
string
Outputs
-
VDI -
void
Examples
Example 1: Add to the OtherConfig field
PS> $entry = [System.Collections.Generic.KeyValuePair[string,string]]::new("region", "emea")
PS> Add-XenVDI -OtherConfig $entry -Name "Demo VDI"
Adds a value to the OtherConfig field of a VDI. The parameter takes one entry of the map; a hashtable does not bind to it.
Example 2: Add to the XenstoreData field
PS> $entry = [System.Collections.Generic.KeyValuePair[string,string]]::new("region", "emea")
PS> Add-XenVDI -XenstoreData $entry -Name "Demo VDI"
Adds a value to the XenstoreData field of a VDI. The parameter takes one entry of the map; a hashtable does not bind to it.
Example 3: Add to the SmConfig field
PS> $entry = [System.Collections.Generic.KeyValuePair[string,string]]::new("region", "emea")
PS> Add-XenVDI -SmConfig $entry -Name "Demo VDI"
Adds a value to the SmConfig field of a VDI. The parameter takes one entry of the map; a hashtable does not bind to it.
Related links
-
Class: VDI
-
Using the XenServer PowerShell module