Set-AzureVMCustomScriptExtension

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Set-AzureVMCustomScriptExtension

Sets the Azure VM Custom Script Extension.

Syntax

Parameter Set: SetCustomScriptExtensionByContainerAndFileNames
Set-AzureVMCustomScriptExtension [[-ReferenceName] <String> ] [[-Version] <String> ] [-ContainerName] <String> [-FileName] <String[]> [[-StorageAccountName] <String> ] [[-StorageEndpointSuffix] <String> ] [[-StorageAccountKey] <String> ] [[-Run] <String> ] [[-Argument] <String> ] -VM <IPersistentVM> [ <CommonParameters>]

Parameter Set: DisableCustomScriptExtension
Set-AzureVMCustomScriptExtension [[-ReferenceName] <String> ] [[-Version] <String> ] [[-Disable]] -VM <IPersistentVM> [ <CommonParameters>]

Parameter Set: SetCustomScriptExtensionByUriLinks
Set-AzureVMCustomScriptExtension [[-ReferenceName] <String> ] [[-Version] <String> ] [[-FileUri] <String[]> ] [-Run] <String> [[-Argument] <String> ] -VM <IPersistentVM> [ <CommonParameters>]

Parameter Set: UninstalleCustomScriptExtension
Set-AzureVMCustomScriptExtension [[-ReferenceName] <String> ] [[-Version] <String> ] [[-Uninstall]] -VM <IPersistentVM> [ <CommonParameters>]

Detailed Description

This cmdlet sets information for the Azure VM Custom Script Extension Information.

Parameters

-Argument<String>

Specifies an argument for the command to run on the VM.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ContainerName<String>

Specifies the container name within the storage account.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Disable

Sets the extension state to 'Disable'.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileName<String[]>

Specifies the names of the blob files in the specified container.

Aliases

none

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileUri<String[]>

Specifies the URLs of the blob files.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ReferenceName<String>

Specifies extension's reference name.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Run<String>

Specifies the command to run by the extension on the VM; currently only "powershell.exe" is supported.

Aliases

RunFile,Command

Required?

true

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageAccountKey<String>

Specifies the storage account key.

Aliases

none

Required?

false

Position?

7

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageAccountName<String>

Specifies the storage account name in the current subscription.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageEndpointSuffix<String>

The storage service endpoint.

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Uninstall

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Version<String>

Specifies the version of the extension.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-VM<IPersistentVM>

Specifies the VM object.

Aliases

InputObject

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

EXAMPLE 1

C:\PS>$x = Set-AzureVMCustomScriptExtension -VM $x -ContainerName 'test' -FileName 'script1.ps1','script2.ps1' -Run 'script1.ps1' -Argument 'arg1 arg2';

New-AzureVM -Location 'West US' -ServiceName $svc -VM $x;

EXAMPLE 2

C:\PS>Set-AzureVMCustomScriptExtension -VM $vm -FileUri 'http://foo1.blob.core.windows.net/bar/script1.ps1','http://foo2.blob.core.windows.net/baz/script2.ps1' -Run 'script1.ps1' -Argument 'arg1 arg2';
Update-AzureVM -ServiceName $svc -Name $name -VM vm;

Get-AzureVMCustomScriptExtension

Get-AzureVMCustomScriptExtension

Manage Extensions