Hey Dilip,
This is a known issue every admin usually come across when you setup a new server or server in a locked down env, there is a GPO setting you need to set - https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.WindowsRemoteShell::AllowRemoteShellAccess
Hope this helps.
JS
==
Please Accept the answer if the information helped you. This will help us and others in the community as well.