Works yes but boot may be an issue. If your just using it for fast storage it will work great. You need to check if your bios supports boot. Here is an in depth how to on booting windwos 10 on M.2.
https://tinkertry.com/how-to-boot-win10-from-samsung-950-pro-nvme-on-superserver