In order to install and boot from a Samsung 950 Pro M.2 drive on a z170 motherboard, be sure to enable the m.2 slot in the BIOS, then one of the two following solutions must also be set:
1. Set CSM Support to "Disabled" under Boot > CSM Configuration
or
2. Leave CSM Support enabled, then set Storage to "UEFI"
You can then install the drive and it should be recognized.