- Add a new credentials
- Match=Pattern
- Type according to the server you want to add. For cDOT or 7Mode selet ONTAP
- Name/IP: <regular expression which matches to your the group of servers for whom you ant to save a common credentials.
- Save.
Example 1:
For Type ONTAP:
This will match credentials with ip having 10.226.252. as the common part. So clusters like 10.226.252.1 to 10.226.252.255 all will have the same credentials saved.
for ONATP, Test-Connectivity is available so you can provide the IP for which you want to test. It will tell which pattern was used to obtain credentials
Example 2:
For Type Other:
This pattern can match server with host-names like ab-testsrv2 or dk-testsrv8 etc.
Test-Connectivity is not available for type Other. So you can do is self verify that if you are getting the right credentials or not for a given IP using the below command code. Just run "Test comand" and provide the IP. It will return the username/password from which you can know if the right credentials can be obtained for this host or not.
##BEGIN CODE
param (
[parameter(Mandatory=$true, HelpMessage="Host Name or IP")]
[string]$Host
)
$creds = Get-WfaCredentials -Host $Host
if($creds)
{
Get-WfaLogger -Info -Message "UserName: $creds.UserName"
Get-WfaLogger -Info -Message $("Pasword: "+ $(ConvertFromSecureToPlain -SecurePassword $creds.Password))
}
else
{
throw("No credentials were found")
}
##END CODE
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.