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
 

Reset-AzureRoleInstance

Reset-AzureRoleInstance

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Requests a reboot or reimage of a single role instance or all role instances of a specific role.

Syntax

Reset-AzureRoleInstance [-ServiceName] [-Slot] [-InstanceName] [-Reboot] [-Reimage] [<CommonParameters>]

Detailed Description

The ReSet-AzureRoleInstance cmdlet requests a reboot or a reimage of a role instance that is running in a deployment. This operation executes synchronously. When you reboot a role instance, Microsoft Azure takes the instance offline, restarts the underlying operating system for that instance, and brings the instance back online. Any data that is written to the local disk persists across reboots. Any data that is in-memory is lost. Reimaging a role instance results in different behavior depending on the type of role. For a web or worker role, when the role is reimaged, Microsoft Azure takes the role offline and writes a fresh installation of the Microsoft Azure guest operating system to the virtual machine. The role is then brought back online. For a VM role, when the role is reimaged, Microsoft Azure takes the role offline, reapplies the custom image that you provided for it, and brings the role back online. Microsoft Azure attempts to maintain data in any local storage resources when the role is reimaged; however, in case of a transient hardware failure, the local storage resource may be lost. If your application requires that data persist, writing to a durable data source, such as a Microsoft Azure drive, is recommended. Any data that is written to a local directory other than that defined by the local storage resource will be lost when the role is reimaged.

Parameters

-ServiceName <String>

Specifies the name of the service.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Slot <String>

The deployment environment where the role instances are running. Supported values are "Production" and "Staging". You can include either a DeploymentName or Slot parameter, but not both.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-InstanceName <String>

Specifies the name of the role instance to reimage or reboot.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Reboot <SwitchParameter>

If this parameter is specified, reboots the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-Reimage <SwitchParameter>

If this parameter is specified, reimages the specified role instance or, if none is specified, all role instances. You must include either a Reboot or Reimage parameter, but not both.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- Example 1 --------------------------

This command reboots the "MyWebRole_IN_0" role instance in the staging deployment of the "MySvc1" service.

PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot Staging -InstanceName "MyWebRole_IN_0" –reboot

-------------------------- Example 2 --------------------------

This command reimages the role instances in the staging deployment of the MyTodo cloud service.

PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot Staging  –Reimage

-------------------------- Example 3 --------------------------

This command reimages all role instances in the production deployment of the "MySvc1" service.

PS C:\> C:\PS>ReSet-AzureRoleInstance -ServiceName "MySvc1" -Slot "Production  –Reimage