I'm in the process of trying to convert an existing gen1 VM (Win Server 2012 R2) to a VM template using VMM 2012 R2 with rollup 1. The creation keeps failing with the following error :-
"Error (2901)The operation did not complete successfully because of a parameter or call sequence that is not valid.Recommended ActionEnsure that the parameters are valid, and then try the operation again."
I've checked that the local administrator account for the machine being converted to a template and it is blank as expected and in an attempt to troubleshoot I've output the template creation script via the VMM GUI and executed the commands in order which appears to have resolved the problem, well the template finishes creation, i'm yet to deploy a machine via it?
# ------------------------------------------------------------------------------# Create VM Template Wizard Script
# ------------------------------------------------------------------------------
# Script generated on Thursday, April 3, 2014 12:52:15 PM by Virtual Machine Manager
#
# For additional help on cmdlet usage, type get-help <cmdlet name>
# ------------------------------------------------------------------------------
$VM = Get-SCVirtualMachine -VMMServer localhost -Name "MyTemplate_Template" -ID "98299447-83e1-4d98-a558-a96ebafcf9b5" | where {$_.VMHost.Name -eq "myhost.mydomain.com"}
$LibraryServer = Get-SCLibraryServer -VMMServer localhost | where {$_.Name -eq "my.library.com"}
$GuestOSProfile = Get-SCGuestOSProfile -VMMServer localhost | where {$_.Name -eq "Windows Server 2012 R2"}
$OperatingSystem = Get-SCOperatingSystem -VMMServer localhost -ID "50b66974-c64a-4a06-b05a-7e6610c579a2" | where {$_.Name -eq "Windows Server 2012 R2 Standard"}
$template = New-SCVMTemplate -Name "My Template" -RunAsynchronously -VM $VM -LibraryServer $LibraryServer -SharePath "\\mylibrary.mydomain.com\SCVMM Library\Templates\mytemplatedestination" -GuestOSProfile $GuestOSProfile -JobGroup d2f2f539-85da-4091-ab08-abe739fc4761 -ComputerName "*" -TimeZone 85 -FullName "Administrator" -OrganizationName "My Organisation" -Workgroup "WORKGROUP" -AnswerFile $null -OperatingSystem $OperatingSystem
Now the only fields that weren't populated when I ran through the gui were FullName and Organization? Before I changed the script these two fields were just set to ""? Is that what has potentially caused the issue are they both required fields?