Hi Kishankumar,
If the same command works with a manual login, then there may also be some permissions issues happening here where Jenkins is not configured to interact with Windows apps using COM. The Windows user account that the Jenkins service logs in has needs to have these permissions.
Please go through the following documentation to update these permissions on windows:
For more information on configuring Windows permissions for the Jenkins service, Microsoft support might be a good point of contact.