Get-Template : A positional parameter cannot be found that accepts argument 'System.Collections.Hashtable'.
At U:\vmwarescript\Create from CSV.ps1:29 char:5
+ Template = $templateTab
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Template], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetTemplate
Only one error now and have the table now there is it possible to give out what template it used just for testing not need for the real thing
$sVM = @{ Name = $row.Name Datastore = $row.Datastore VMHost = $row.VMHost Location = $row.Folder } Template = $templateTab $templateTab = @{ 'VDI-768-VDI-ENTW-00' = 'template1' 'WTS-354-VDI-ENTW-01' = 'template2' } # Import-Csv -Path "U:\vmwarescript\WTS.csv" -UseCulture | # ForEach-Object -Process { # Get-VM -Name $_.Name |