Restart-AzureRemoteAppVM

Restarts a virtual machine in an Azure RemoteApp collection.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Restart-AzureRemoteAppVM
       -CollectionName <String>
       -UserUpn <String>
       [-LogoffMessage <String>]
       [-LogoffWaitSeconds <Int32>]
       [-Profile <AzureSMProfile>]
       [-WhatIf]
       [-Confirm]
       [<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.

Parameters

-CollectionName

Specifies the name of an Azure RemoteApp collection.

Type:String
Aliases:Name
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required: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
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
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
Required:True
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False