New-XenVMPP
\[Removed\] Creates a new VMPP object.
Syntax
New-XenVMPP -HashTable <hashtable> [-PassThru] [-BestEffort] [-SessionOpaqueRef <string>]
[-WhatIf] [-Confirm] [-Async] [<CommonParameters>]
New-XenVMPP -Record <VMPP> [-PassThru] [-BestEffort] [-SessionOpaqueRef <string>]
[-WhatIf] [-Confirm] [-Async] [<CommonParameters>]
New-XenVMPP [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
[-IsPolicyEnabled <bool>] [-BackupType {snapshot | checkpoint | unknown}]
[-BackupRetentionValue <long>] [-BackupFrequency {hourly | daily | weekly | unknown}]
[-BackupSchedule <hashtable>] [-ArchiveTargetType {none | cifs | nfs | unknown}]
[-ArchiveTargetConfig <hashtable>]
[-ArchiveFrequency {never | always_after_backup | daily | weekly | unknown}]
[-ArchiveSchedule <hashtable>] [-IsAlarmEnabled <bool>] [-AlarmConfig <hashtable>]
[-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Description
REMOVED. This class has been removed.
Creates a new VMPP object.
VMPP: VM Protection Policy.
Parameters
-AlarmConfig
configuration for the alarm
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ArchiveFrequency
frequency of the archive schedule
| Attribute | Value |
|---|---|
| Type | vmpp_archive_frequency |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | never, always_after_backup, daily, weekly, unknown |
-ArchiveSchedule
schedule of the archive containing 'hour', 'min', 'days'. Date/time-related information is in Local Timezone
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ArchiveTargetConfig
configuration for the archive, including its 'location', 'username', 'password'
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-ArchiveTargetType
type of the archive target config
| Attribute | Value |
|---|---|
| Type | vmpp_archive_target_type |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | none, cifs, nfs, unknown |
-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 |
-BackupFrequency
frequency of the backup schedule
| Attribute | Value |
|---|---|
| Type | vmpp_backup_frequency |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | hourly, daily, weekly, unknown |
-BackupRetentionValue
maximum number of backups that should be stored at any time
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BackupSchedule
schedule of the backup containing 'hour', 'min', 'days'. Date/time-related information is in Local Timezone
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BackupType
type of the backup sub-policy
| Attribute | Value |
|---|---|
| Type | vmpp_backup_type |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | snapshot, checkpoint, unknown |
-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 VMPP.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
-IsAlarmEnabled
true if alarm is enabled for this policy
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IsPolicyEnabled
enable or disable this policy
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NameDescription
a notes field containing human-readable description
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NameLabel
a human-readable name
| 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 |
-Record
An existing VMPP record whose fields are used to create the new object.
| Attribute | Value |
|---|---|
| Type | VMPP |
| Required | True |
| 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 |
-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 |
Inputs
-
None
Outputs
-
VMPP -
Task -
void
Examples
Example 1: Create a VMPP from a table of fields
PS> New-XenVMPP -HashTable @{ name_label = "Demo VMPP" } -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 VMPP.
Example 2: Create a VMPP from parameters
PS> New-XenVMPP -NameLabel "new value" -PassThru
The same thing with one parameter per field, which is the form that tab-completes. Get-Help New-XenVMPP -Full lists them all.
Example 3: Create a VMPP from an existing one
PS> $record = Get-XenVMPP | Select-Object -First 1
PS> New-XenVMPP -Record $record -PassThru
-Record takes a whole VMPP record, so an existing object can be used as the template for a new one.
Related links
-
Class: VMPP
-
Using the XenServer PowerShell module