Make sure the server is patched fully and prerequisite .Net is installed.
https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/setup/install-configure?view=powershell-7.1#download-and-install-the-wmf-51-package
--please don't forget to Accept as answer if the reply is helpful--