I'm trying to use a POSH script to acquire some data directly from controllers that isn't already in the storage schema. I see how to iterate over a list of controllers for a specific DFM server from looking at the performance schema script, but I'm not clear on how to get credentials for the controllers.
The controller credentials are configured in WFA (existing workflows operate on them successfully), but when I use Get-NaCredential $ip (where $ip is a controller IP address returned from host-info-list-iter-* on the DFM server), I get an empty result. I'm printing out the IPs, so I know they are correct. Is there a different way to get credentials from within a schema script?
Here's some more information. When I posted above, I was trying to use API direct to the controller using New-WFAZapiServer. I've switch to using the ONTAP toolkit to see if I can get further. Unfortunately, running Connect-WFAController in a loop only works for the first iteration, all others fail with invalid credentials. I have confirmed both by running workflows and by using the Test Connection feature of Credentials that the credentials are correct (in fact, they are exactly the same for all 4 controllers in question). Here's some logging showing the behavior (10.61.169.30-33 are controllers that have valid credentials, but only the first works):
I'm not sure what I could be doing wrong here. It sure looks like Connect-WFAController may be hanging on to some state. If I try to use Get-NaCredentials explicitly, I'm back to the problem I had with the New-WFAZapiServer approach (null creds from Get-NaCredentials).