Restart-AzureWebApp (and Restart-AzureRMWebApp) does not support piping in the WebApp or Resource.
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.
Check the alias for the ResourceGroupName param. We should have a Name alias.
Name is the alias for ResourceName parameter in the Get-azureRmResource cmdlet, so that wont work.