New-XenPVSCacheStorage
Creates a new PVSCacheStorage object.
Syntax
New-XenPVSCacheStorage -HashTable <hashtable> [-PassThru] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async] [<CommonParameters>]
New-XenPVSCacheStorage -Record <PVS_cache_storage> [-PassThru] [-BestEffort]
[-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async] [<CommonParameters>]
New-XenPVSCacheStorage [-PassThru] [-XenHost <XenRef[Host]>] [-SR <XenRef[SR]>]
[-Site <XenRef[PVS_site]>] [-Size <long>] [-BestEffort] [-SessionOpaqueRef <string>]
[-WhatIf] [-Confirm] [-Async] [<CommonParameters>]
Description
Creates a new PVSCacheStorage object.
PVSCacheStorage: Describes the storage that is available to a PVS site for caching purposes.
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 |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-HashTable
A hashtable of field names to values, from which to create the PVSCacheStorage.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | True |
| 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 |
-Record
An existing PVSCacheStorage record whose fields are used to create the new object.
| Attribute | Value |
|---|---|
| Type | PVS_cache_storage |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
-SR
SR providing storage for the PVS cache
| Attribute | Value |
|---|---|
| Type | XenRef[SR] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-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 |
-Site
The PVS\_site for which this object defines the storage
| Attribute | Value |
|---|---|
| Type | XenRef[PVS_site] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Size
The size of the cache VDI (in bytes)
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-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 |
-XenHost
The host on which this object defines PVS cache storage
| Attribute | Value |
|---|---|
| Type | XenRef[Host] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
Inputs
-
None
Outputs
-
PVS_cache_storage -
Task -
void
Examples
Example 1: Create a PVSCacheStorage from a table of fields
PS> New-XenPVSCacheStorage -HashTable @{ name_label = "Demo PVSCacheStorage" } -PassThru
The keys are the API's field names, so this form reads the same for every class whatever fields it happens to have. -PassThru returns the new PVSCacheStorage.
Example 2: Create a PVSCacheStorage from parameters
PS> New-XenPVSCacheStorage -XenHost $value -PassThru
The same thing with one parameter per field, which is the form that tab-completes. Get-Help New-XenPVSCacheStorage -Full lists them all.
Example 3: Create a PVSCacheStorage from an existing one
PS> $record = Get-XenPVSCacheStorage | Select-Object -First 1
PS> New-XenPVSCacheStorage -Record $record -PassThru
-Record takes a whole PVSCacheStorage record, so an existing object can be used as the template for a new one.
Related links
-
Class: PVSCacheStorage
-
Using the XenServer PowerShell module