/// <summary> /// Reverts the specified virtual machine to the most recent snapshot. /// </summary> /// <param name="vmObject">The <see cref="VSphereManagedObject" /> representing the virtual machine.</param> /// <returns>A <see cref="VSphereManagedObject" /> representing the task created by the power on operation.</returns> /// <exception cref="ArgumentNullException"><paramref name="vmObject" /> is null.</exception> public VSphereManagedObject RevertVirtualMachineToSnapshot(VSphereManagedObject vmObject) { if (vmObject == null) { throw new ArgumentNullException(nameof(vmObject)); } ManagedObjectReference task = _vimService.RevertToCurrentSnapshot_Task(vmObject.ManagedObjectReference, null, true, true); return(new VSphereManagedObject(task)); }