I created a VM
using Windows Server 2012 R2
. Now trying to acquire the image name for the newest image of Windows Server 2012 R2 Datacenter using following `PS 5.0`` script. But it gives the following error:
PS script:
Get-AzureVMImage | where {$_.ImageFamily -eq "Windows Server 2012 R2
Datacenter" | sort PublishedDate -Descending } | select -Last 1 | Select
PublishedDate,ImageFamily,ImageName | FL
Error:
At line:3 char:14
+ PublishedDate,ImageFamily,ImageName | FL
+ ~
Missing argument in parameter list.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingArgument