How do you find out your Windows is expired? You probably first notice a message at the lower right corner on your desktop. It tells you your Windows license is expired. Hence your Windows becomes inactivated as you can see from Control Panel -> System. Perhaps you first are greeted with a message popping out saying "shutting down". Thinking that might be a mandatory restart due to Windows security patches and updates, you patiently wait for the server to come back online. You login in again, poking around and again the concerning "shutting down" message shows up in about half an hour. Don't panic. There's nothing wrong with your server. You simply need to extend its lifetime.
Open a Powershell windows or command line, type slmgr -dlv to confirm there are 6 rearm counts in total. And in the screenshot below I have 6 times remaining.
Type slmgr -rearm to extend license by 180 days. This will consume one rearm count. Restart the server.
After restarting your server you can check it out by typing slmgr -dli.
Check counts again with slmgr -dlv. Notice it's now 5 rearm counts.
You can also confirm this by looking at Control Panel -> System that will say Windows is activated. The desktop message also changes to "Windows license valid for 180 days".
Disclaimer: Everything this post describes is for non production use.