There are several options available for licensing Microsoft systems on a HomeLab.
Many Microsoft products are available with 180 day evaluation licenses. Additionally Technical Preview versions are often available for upcoming platforms.
If you are a student or faculty at a qualifying institution (basically a School, College, or University) you should be able to get DreamSpark licenses (formerly known as MSDN Academic Alliance). There are three tiers; the free offering (DreamSpark for Students) gives you the Windows Server and SQL Server licensing and some applications. It also includes some development tools (Visual Studio etc) and Azure credits.
There are also two paid tiers, Standard and Premium, with a small annual charge paid by the institution. These give a wider range of products, a Premium subscription provides almost the entire Microsoft portfolio, usually with the exception of the core Office suite.
Obviously you could also visit your local computer shop and purchase full retail licenses, but this is probably the most costly option here.