'PNP Module issue when I run the build in teamcity

I have development server where Bitbucket and team city is in place When I run the PowerShell script below one line, it is successfully connecting

Below is the commandlet: connect-pnponline -url "https://domain.sharepoint.com/sites/sitename" ( it worked in my dev server )

Same command Giving following error when I execute in teamcity , this teamcity is there in same development server. enter image description here

Is there any software/dependencies are missing pertaining to PNP module in teamcity agent? Please help to resolve this issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source