Add-Computer is only available in Windows PowerShell, however, you can try importing it using the UseWindowsPowerShell parameter in PowerShell 7.
Import-Module Microsoft.PowerShell.Management -UseWindowsPowerShell
When the first module is imported using Windows PowerShell Compatibility feature, PowerShell creates a remote session named WinPSCompatSession that is running in a background Windows PowerShell 5.1 process. This process is created when the Compatibility feature imports the first module.
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.