WFA Powershell code:
param (
[parameter(Mandatory=$true, HelpMessage="Cluster name or IP address")]
[string]$Cluster
)
# connect to controller
Connect-WfaCluster -Node $Cluster
if($Cluster)
{
Get-WFALogger -Info -message $("Setting Security Audit on: " + $Cluster)
Set-NcAudit -CliSet $true -OntapiSet $true -Controller $Cluster
}
Above is a simple code to manipulate the audit setting.
The code is pretty straight forward but I am not sure why I keep on getting the below error even after making connection.
please advice!!!
15:38:48.959 INFO [TSS Cluster Settings] ### Command 'TSS Cluster Settings' in 'POWER_SHELL' ###
15:39:21.068 INFO [TSS Cluster Settings] Get-WfaCredentials -Host ABCD
15:39:21.115 INFO [TSS Cluster Settings] Credentials successfully provided for 'ABCD'
15:39:21.162 INFO [TSS Cluster Settings] Connect-Controller -Type CLUSTER -Name ABCD -Credential System.Management.Automation.PSCredential -Vserver -SSLversion TLSv1
15:39:21.209 INFO [TSS Cluster Settings] Credentials successfully provided for 'ABCD'
15:39:21.271 INFO [TSS Cluster Settings] Connect-NcController (with credentials) -Name ABCD -Timeout 60000 -ErrorAction Stop -Port 443 -SSLVersion TLSv1
15:39:22.381 INFO [TSS Cluster Settings] Connected to cluster node
15:39:22.443 INFO [TSS Cluster Settings] Setting Security Audit on: ABCD
15:39:28.303 ERROR [TSS Cluster Settings] Command failed for Workflow ' TSS Cluster Settings cDOT' with error : Incorrect credentials for ABCD
15:39:28.318 INFO [TSS Cluster Settings] ***** Workflow Execution Failed *****