I have a Windows 7 system using GPT and UEFI boot. I tried to install FreeBSD with ZFS but I seem to have buggered it up 
FreeBSD boots fine but Windows is now broken. I think its because I did:
(The freebsd-boot partition has id 4)
I probably shouldn't have added the -b /boot/pmbr as that writes a MBR to the first sector on the disk. I'm guessing that because of that my BIOS defaults to a BIOS boot instead of EFI boot.
Just to be clear, I'm not trying to get FreeBSD to EFI boot, I know that doesn't work. I just want to restore my Windows again. Removing all FreeBSD partitions didn't help.
That also destroys my partition table
Results in a weird error message, something about an illegal option.
When I get home I'm going to try to use gpart backup to save the table, dd the first 512 bytes and restore the table from backup. Hopefully that works.
If anybody else has any suggestions, I'm all ears.

FreeBSD boots fine but Windows is now broken. I think its because I did:
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 4
(The freebsd-boot partition has id 4)
I probably shouldn't have added the -b /boot/pmbr as that writes a MBR to the first sector on the disk. I'm guessing that because of that my BIOS defaults to a BIOS boot instead of EFI boot.
Just to be clear, I'm not trying to get FreeBSD to EFI boot, I know that doesn't work. I just want to restore my Windows again. Removing all FreeBSD partitions didn't help.
# dd if=/dev/zero of=/dev/ada0 bs=512 count=1
That also destroys my partition table

# dd if=/dev/zero of=/dev/ada0 bs=446 count=1
Results in a weird error message, something about an illegal option.
When I get home I'm going to try to use gpart backup to save the table, dd the first 512 bytes and restore the table from backup. Hopefully that works.
If anybody else has any suggestions, I'm all ears.