I am using the below script to provision Linux VMs by taking inputs from Excel sheet, till yesterday it works fine today it started giving errors.
PowerCLIScript.
Import-Csv "C:\Users\sg0217865\Desktop\NewVMs.csv" -UseCulture | %{
Get-OSCustomizationSpec $_.Customization | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping -IpMode UseStaticIP -IpAddress $_.ip -SubnetMask $_.subnet -DefaultGateway $_.gw
$vm=New-VM -Name $_.Name -Template $_.Template -Host $_.Host -Datastore $_.Datastore -Confirm:$false -RunAsync -OSCustomizationSpec $_.Customization
}
Here goes screenshot of error, error is due to Template Value, I have given same value for manytimes it works fine earlier.