Hi @gokulnath palani,
Thank you for your reply.
1.I am sorry I didn't find out why the first method didn't work. Someone said the issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo.
2.The second method is not supported by the official documentation, it's just that I found this can successfully apply templates when I was looking for other ways to apply templates. But we only need to run the command that uses xml only once without closing the PowerShell window. Then just repeat running the command below to change the SiteTitle and SiteUrl.
Invoke-PnPSiteTemplate -Path c:\temp\theperspective.pnp -Parameters @{"SiteTitle"="Communicationsite";"SiteUrl"="/sites/Mysite"}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.