If that Foldername is unique, you can do
$template = Get-Folder -Name <foldername> | Get-Template -Name Linux8template
If that is not the case, you can get the folder object by using my Get-FolderByPath function.
Once you have that you can use the Get-Template with the Location parameter
$folder = Get-FolderByPath -Path 'datacenter/<foldername>
Get-Template -Name Linux8template -Location $folder
Note that you don't specify the hidden folder 'vm' in the Path