Hi Yuk Leong Chow,
Thanks for reaching out to Microsoft Q&A.
The error message indicates an issue with installing IIS (Internet Information Services) due to an invalid name related to “PowerShell.” Suggest you follow the below fixes provided, I believe one of them should work.
- Open PowerShell as an Administrator and run the following commands to install the necessary features manually
Install-WindowsFeature -Name Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-App-Dev, Web-Net-Ext, Web-Net-Ext45, Web-Asp-Net, Web-Asp-Net45, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Includes, Web-WebSockets, We
- If you’re using the Azure Migrate installer script, consider removing the reference to PowerShell-ISE from line 518 in the script.
https://github.com/MicrosoftDocs/azure-docs/issues/120314
- Ensure that your Windows Server 2022 environment is up-to-date. Sometimes, installing updates can resolve compatibility issues.
- Try an in-place upgrade from Windows Server 2019 to 2022. Make sure to set up the installation procedure to avoid installing any updates during the process. https://learn.microsoft.com/en-us/answers/questions/557419/problem-with-in-place-upgrade-from-windows-server
- Verify that you have the necessary fixes installed on the server. For example, KB 3005628 might be required to address IIS installation issues. https://serverfault.com/questions/839729/azure-site-recovery-unified-setup-iis-fail
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.