Set-XenVMSS

Last published : Nov 12, 2026
Sets fields of a VMSS object.

Syntax

Set-XenVMSS [-VMSS] <VMSS> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
    [-Enabled <bool>] [-RetainedSnapshots <long>]
    [-Frequency {hourly | daily | weekly | unknown}] [-Schedule <hashtable>]
    [-LastRunTime <DateTime>]
    [-Type {snapshot | checkpoint | snapshot_with_quiesce | unknown}] [-BestEffort]
    [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVMSS [-Ref] <XenRef[VMSS]> [-PassThru] [-NameLabel <string>]
    [-NameDescription <string>] [-Enabled <bool>] [-RetainedSnapshots <long>]
    [-Frequency {hourly | daily | weekly | unknown}] [-Schedule <hashtable>]
    [-LastRunTime <DateTime>]
    [-Type {snapshot | checkpoint | snapshot_with_quiesce | unknown}] [-BestEffort]
    [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVMSS [-Uuid] <guid> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
    [-Enabled <bool>] [-RetainedSnapshots <long>]
    [-Frequency {hourly | daily | weekly | unknown}] [-Schedule <hashtable>]
    [-LastRunTime <DateTime>]
    [-Type {snapshot | checkpoint | snapshot_with_quiesce | unknown}] [-BestEffort]
    [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-XenVMSS [-Name] <string> [-PassThru] [-NameLabel <string>] [-NameDescription <string>]
    [-Enabled <bool>] [-RetainedSnapshots <long>]
    [-Frequency {hourly | daily | weekly | unknown}] [-Schedule <hashtable>]
    [-LastRunTime <DateTime>]
    [-Type {snapshot | checkpoint | snapshot_with_quiesce | unknown}] [-BestEffort]
    [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Changes writable fields of a VMSS. Each optional parameter listed below corresponds to a field that can be set.

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

-Enabled

Set the enabled field of the given VMSS.
Attribute Value
Type bool
Required False
Position Named
Accepts pipeline input False

-Frequency

Set the value of the frequency field
Attribute Value
Type vmss_frequency
Required False
Position Named
Accepts pipeline input False
Accepted values hourly, daily, weekly, unknown

-LastRunTime

This parameter has no documentation.
Attribute Value
Type DateTime
Required False
Position Named
Accepts pipeline input False

-Name

The name of the VMSS to operate on.
Attribute Value
Type string
Required True
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases name_label

-NameDescription

Set the name/description field of the given VMSS.
Attribute Value
Type string
Required False
Position Named
Accepts pipeline input False

-NameLabel

Set the name/label field of the given VMSS.
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 VMSS object to operate on, specified by its opaque reference.
Attribute Value
Type XenRef[VMSS]
Required True
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases opaque_ref

-RetainedSnapshots

This parameter has no documentation.
Attribute Value
Type long
Required False
Position Named
Accepts pipeline input False

-Schedule

This parameter has no documentation.
Attribute Value
Type hashtable
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

-Type

This parameter has no documentation.
Attribute Value
Type vmss_type
Required False
Position Named
Accepts pipeline input False
Accepted values snapshot, checkpoint, snapshot_with_quiesce, unknown

-Uuid

The UUID of the VMSS to operate on.
Attribute Value
Type guid
Required True
Position 0
Accepts pipeline input True (ByPropertyName)

-VMSS

The VMSS object to operate on.
Attribute Value
Type VMSS
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

Inputs

  • VMSS
  • XenRef[VMSS]
  • guid
  • string

Outputs

  • VMSS
  • void

Examples

Example 1: Set the NameLabel field

PS> Get-XenVMSS -Name "Demo VMSS" | Set-XenVMSS -NameLabel "new value"
Sets the NameLabel field of a VMSS.

Example 2: Set the NameDescription field

PS> Get-XenVMSS -Name "Demo VMSS" | Set-XenVMSS -NameDescription "new value"
Sets the NameDescription field of a VMSS.

Example 3: Set the Enabled field

PS> Get-XenVMSS -Name "Demo VMSS" | Set-XenVMSS -Enabled $true
Sets the Enabled field of a VMSS.
  • Class: VMSS
  • Using the XenServer PowerShell module