Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureVMCustomScriptExtension

Set-AzureVMCustomScriptExtension

microsoft.windowsazure.commands.servicemanagement.dll, microsoft.azure.commands.compute.dll

Synopsis

Set Azure VM Custom Script Extension Information.

Syntax

Set-AzureVMCustomScriptExtension [-ReferenceName] [-Version] [-ContainerName] [-FileName] [-StorageAccountName] [-StorageEndpointSuffix] [-StorageAccountKey] [-Run] [-Argument] [-VM] [<CommonParameters>]

Set-AzureVMCustomScriptExtension [-ReferenceName] [-Version] [-Disable] [-VM] [<CommonParameters>]

Set-AzureVMCustomScriptExtension [-ReferenceName] [-Version] [-Uninstall] [-VM] [<CommonParameters>]

Set-AzureVMCustomScriptExtension [-ReferenceName] [-Version] [-FileUri] [-Run] [-Argument] [-VM] [<CommonParameters>]

Detailed Description

Set Azure VM Custom Script Extension Information.

Parameters

-ReferenceName <String>

The extension's reference name. This is a user-defined string that can be used to refer to an extension. It is specified when the extension is added to the VM for the first time. For subsequent updates, user should specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension will be returned using the Get-AzureVM cmdlet.

Aliases

None

Required?

false

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Version <String>

The Extension Version.

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ContainerName <String>

The container name within the storage account.

Aliases

None

Required?

true

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-FileName <String[]>

The names of the blob files in the specified container.

Aliases

None

Required?

true

Position

3

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-StorageAccountName <String>

The storage account name in the current subscription.

Aliases

None

Required?

false

Position

4

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-StorageEndpointSuffix <String>

The storage service endpoint.

Aliases

None

Required?

false

Position

5

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-StorageAccountKey <String>

The storage account key

Aliases

None

Required?

false

Position

6

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Run <String>

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

Aliases

None

Required?

false

Position

7

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Argument <String>

Argument for the command to run on the VM.

Aliases

None

Required?

false

Position

8

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-VM <IPersistentVM>

The persistent VM object.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

-Disable <SwitchParameter>

To Set the Extension State to 'Disable'.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Uninstall <SwitchParameter>

Not Specified

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-FileUri <String[]>

The URLs of the blob files.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PipelineVariable <string>

Not Specified

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

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

Description

PS C:\> $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 --------------------------

Description

PS C:\> 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;

Unknown