I don't believe that the GroupPolicy module (like many others) is useable directly in PowerShell 7.
You can try installing the module, but you'll have to use the "Import-Module" command, with the -UseWindowsPowerShell switch to get it to work. Even then, I'm not sure if the necessary connection protocols work in your O/S.