adam
2
I can reproduce this in endpoints. The problem is that the Universal module is not being imported for some reason.
I opened an issue here.
I was able to work around it by importing the module manually first.
Import-Module Universal
$Secret:Cred.UserName