Avatar of janhoedt
janhoedt

asked on 

Powershell: use logged on credentials to logon to RDP?

Hi,

Is there a way to pass credentials with which I'm logged on to my Windows system to an RDP session (mostly Windows 7/2012)?
So that would be  mstsc /admin /v:$computername
then using  @runas /user:$env:USERDOMAIN\$env:USERNAME  with cachedcredentials.

Please advise.
J.
PowershellWindows Server 2012

Avatar of undefined
Last Comment
Philip Elder

8/22/2022 - Mon