Using * will work here but star will match other patters as well which you may not want.
Save the pattern as : [a-z]{2}-testsrv[0-9]{1}
You can have a Test Command to check if your Credentials are actually working or not. Below WFA PoSH code can be of great help to see if your pattern can actually get you the desired credemtials.
### Begin ###
param
(
[parameter(Mandatory=$true, HelpMessage="Host Name")]
[string]$Host
)
$cd=Get-WfaCredentials $Host
if(!$cd)
{
get-WfaLogger -info -Message "Not found"
}
else
{
$pass=ConvertFromSecureToPlain -SecurePassword $cd.Password
Get-WfaLogger -info -Message $cd.UserName
Get-WfaLogger -info -Message $pass
}
##End ##
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.