If a username in format "user@domain" is specified in the username field in passwordmanager the ToPSCredential() method will generate the wrong username because the method will add "domain\" before the username. Results to: "domain\user@domain" instead of only the username that already includes the domain name.
For some applications the "old" format of domain\username cannot be used.
I added the possibility to check if a "@" symbol is found in the username field. If this is the case the username field will be used as it is. If not and the domain is also found in the passwordmanager username field, the format domain\username will be used.
So it doesn't matter in which format the username is entered into the field, ToPSCredential should now work correctly.
Note: If password resets are used, the entry in the Username field must not contain the domain, only the username (i.e. not domain\user and also not user@domain). This has however nothing to do with the ToPSCredential method.
If a username in format "user@domain" is specified in the username field in passwordmanager the ToPSCredential() method will generate the wrong username because the method will add "domain\" before the username. Results to: "domain\user@domain" instead of only the username that already includes the domain name.
For some applications the "old" format of domain\username cannot be used. I added the possibility to check if a "@" symbol is found in the username field. If this is the case the username field will be used as it is. If not and the domain is also found in the passwordmanager username field, the format domain\username will be used.
So it doesn't matter in which format the username is entered into the field, ToPSCredential should now work correctly.
Note: If password resets are used, the entry in the Username field must not contain the domain, only the username (i.e. not domain\user and also not user@domain). This has however nothing to do with the ToPSCredential method.