Share via


Add-AzsVMExtension

Create a Virtual Machine Extension Image with publisher, version.

Syntax

CreateExpanded (Default)

Add-AzsVMExtension
    -Publisher <String>
    -Type <String>
    -Version <String>
    [-Location <String>]
    [-SubscriptionId <String>]
    [-ComputeRole <String>]
    [-IsSystemExtension]
    [-PropertiesPublisher <String>]
    [-ProvisioningState <ProvisioningState>]
    [-SourceBlob <String>]
    [-SupportMultipleExtensions]
    [-VmOsType <OSType>]
    [-VMScaleSetEnabled]
    [-DefaultProfile <PSObject>]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

Create

Add-AzsVMExtension
    -Publisher <String>
    -Type <String>
    -Version <String>
    -Extension
    [-Location <String>]
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

CreateViaIdentity

Add-AzsVMExtension
    -INPUTOBJECT
    -Extension
    [-DefaultProfile <PSObject>]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

CreateViaIdentityExpanded

Add-AzsVMExtension
    -INPUTOBJECT
    [-Publisher <String>]
    [-ComputeRole <String>]
    [-IsSystemExtension]
    [-ProvisioningState <ProvisioningState>]
    [-SourceBlob <String>]
    [-SupportMultipleExtensions]
    [-VmOsType <OSType>]
    [-VMScaleSetEnabled]
    [-DefaultProfile <PSObject>]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

Description

Create a Virtual Machine Extension Image with publisher, version.

Examples

-------------------------- EXAMPLE 1 --------------------------

Add-AzsVMExtension -Location "local" -Publisher "Microsoft" -Type "MicroExtension" -Version "0.1.0" -ComputeRole "IaaS" -SourceBlob "https://github.com/Microsoft/PowerShell-DSC-for-Linux/archive/v1.1.1-294.zip" -SupportMultipleExtensions -VmOsType "Linux"

ExtensionType : MicroExtension TypeHandlerVersion : 0.1.0 ComputeRole : IaaS Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/providers/Microsoft.Compute.Admin/locati ons/local/artifactTypes/VMExtension/publishers/Microsoft/types/MicroExtension/versions/0.1.0 IsSystemExtension : False Location : local Name : ProvisioningState : Creating Publisher : Microsoft SourceBlobUri : https://github.com/Microsoft/PowerShell-DSC-for-Linux/archive/v1.1.1-294.zip SupportMultipleExtension : True Type : Microsoft.Compute.Admin/locations/artifactTypes/publishers/types/versions VMScaleSetEnabled : False VmosType : Linux

Parameters

-ComputeRole

Compute role

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:System.Management.Automation.PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Extension

Parameters used to create a new Virtual Machine Extension Image. To construct, see NOTES section for EXTENSION properties and create a hash table.

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20151201Preview.IVMExtensionParameters
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.IComputeAdminIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-IsSystemExtension

Indicates if the extension is for the system.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

Location of the resource.

Parameter properties

Type:System.String
Default value:(Get-AzLocation)[0].Location
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PropertiesPublisher

The publisher of the VM Extension

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProvisioningState

Provisioning state of extension.

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Support.ProvisioningState
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Publisher

Name of the publisher.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceBlob

URI to Azure or AzureStack blob.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Parameter properties

Type:System.String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SupportMultipleExtensions

True if supports multiple extensions.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Type

Type of extension.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

The version of the resource.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VmOsType

Target virtual machine operating system type necessary for deploying the extension handler.

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Support.OSType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMScaleSetEnabled

Value indicating whether the extension is enabled for virtual machine scale set support.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
CreateViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20151201Preview.IVMExtensionParameters

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.IComputeAdminIdentity

Outputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20151201Preview.IVMExtension

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

EXTENSION <IVMExtensionParameters>: Parameters used to create a new Virtual Machine Extension Image.

  • [ComputeRole <String>]: Compute role
  • [IsSystemExtension <Boolean?>]: Indicates if the extension is for the system.
  • [ProvisioningState <ProvisioningState?>]: Provisioning state of extension.
  • [Publisher <String>]: The publisher of the VM Extension
  • [SourceBlobUri <String>]: URI to Azure or AzureStack blob.
  • [SupportMultipleExtension <Boolean?>]: True if supports multiple extensions.
  • [VMScaleSetEnabled <Boolean?>]: Value indicating whether the extension is enabled for virtual machine scale set support.
  • [VmosType <OSType?>]: Target virtual machine operating system type necessary for deploying the extension handler.

INPUTOBJECT <IComputeAdminIdentity>: Identity Parameter

  • [DiskId <String>]: The disk guid as identity.
  • [FeatureName <String>]: Name of the feature.
  • [Id <String>]: Resource identity path
  • [Location <String>]: Location of the resource.
  • [MigrationId <String>]: The migration job guid name.
  • [Offer <String>]: Name of the offer.
  • [Publisher <String>]: Name of the publisher.
  • [QuotaName <String>]: Name of the quota.
  • [ScaleUnitName <String>]: Name of the scale unit.
  • [Sku <String>]: Name of the SKU.
  • [SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
  • [Type <String>]: Type of extension.
  • [Version <String>]: The version of the resource.