Restart-​Azure​Remote​App​VM

Restarts a virtual machine in an Azure RemoteApp collection.

Syntax

Restart-AzureRemoteAppVM
       -CollectionName <String>
       [-LogoffMessage <String>]
       [-LogoffWaitSeconds <Int32>]
       [-Profile <AzureSMProfile>]
       -UserUpn <String>
       [-Confirm]
       [-WhatIf]
       [<CommonParameters>]

Description

The Restart-AzureRemoteAppVM cmdlet restarts a virtual machine in an Azure RemoteApp collection on which the specified user is connected.

Examples

Example 1: Restart a virtual machine

PS C:\> Restart-AzureRemoteAppVM -CollectionName "ContosoVNet" -UserUPN "PattiFuller@contoso.com"

This command restarts a virtual machine in an Azure RemoteApp collection named Contoso. The user PattiFuller@contoso.com is connected to the collection which contains this virtual machine.

Required Parameters

-CollectionName

Specifies the name of an Azure RemoteApp collection.

Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UserUpn

Specifies the user principal name (UPN) of the user for whom this cmdlet restarts the virtual machine. To obtain virtual machines in the collection and connected UPNs, use the Get-AzureRemoteAppVM cmdlet.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-LogoffMessage

Specifies a warning message shown to users connected to the virtual machine before this cmdlet logs them off.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-LogoffWaitSeconds

Specifies how long this cmdlet waits before it logs users off. The default value is 60 seconds.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False