azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Restart-AzureWebApp (and Restart-AzureRMWebApp) does not support piping in the WebApp or Resource.

Open mohitsriv opened this issue 11 years ago • 2 comments

From Azure MVP:

Using the ServiceManagement cmdlets I was able to do something like: Get-AzureWebsite | Restart-AzureWebsite

While using the ARM version of the commandlets, this is not possible: Get-AzureResource -ResourceType Microsoft.Web/sites -ResourceGroupName rg-cms-help | Restart-AzureWebApp

cmdlet Restart-AzureWebApp at command pipeline position 2 Supply values for the following parameters: (Type !? for Help.) ResourceGroupName: Name: Restart-AzureWebApp : Cannot validate argument on parameter 'ResourceGroupName'. The argument is null or empty.

mohitsriv avatar Sep 22 '15 14:09 mohitsriv

Check the alias for the ResourceGroupName param. We should have a Name alias.

ravbhatnagar avatar Feb 12 '16 01:02 ravbhatnagar

Name is the alias for ResourceName parameter in the Get-azureRmResource cmdlet, so that wont work.

ravbhatnagar avatar Nov 10 '16 07:11 ravbhatnagar