I'm trying to write credentials for TFS Connection to the generic part of windows credential manager with following script: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Credentials-d44c3cde
It works fine, when I am connected to the Virtual Machine via RDP and execute this "Store" Script directly via PowerShell ISE. But it fails as soon as I execute the same part of script via Power Shell Remote Session, the same script fails by "Security Error"
Any idea how i can empower the "remote session" to write credentials to Windows Credentials Store?
Thanks!