Hi @jansi rani krishnan ,
maybe this helps to get started:
https://social.technet.microsoft.com/Forums/en-US/1a9ee91c-bcf7-43fd-95c1-389ddd8f6fb8/adding-nonprivate-comments-to-incidents-via-powershell?forum=administration
With the script in the marked answer it should be possible to add an analyst comment.
If you don't like to use a function you could use this:
https://github.com/abaumgarten42/SCSM_Useful_PSscripts/blob/main/Add-IRanalystComment.ps1
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten