Active IQ Unified Manager Discussions

System-CLI for Cluster Admin Domain Authentication

joshuag
2,832 Views
I am trying to write a command that will allow Domain Authentication at the cluster level in addition to assigning custom roles to those domain users. To do so requires domain tunneling and defining capabilities for roles. There doesn't seem to be an ZAPI or PoSH command to accomplish this. So, whats left? Is there a way to invoke CLI commands within WFA or does it require system-cli api commands?
1 ACCEPTED SOLUTION

coreywanless
2,829 Views

Yes, there are ways to invoke CLI commands from the DataOntap Powershell Module.

 

 

Here is an example command that I have for setting up public keys. It uses the 'Invoke-NcSsh' posh commandlet:

Connect-WfaCluster $Cluster

Get-WFALogger -Info -message $("Setting up publickey for user '" + $username + "' on Vserver " + $Vserver)

$Cmd = "security login publickey create -vserver $Vserver -user $Username -publickey ""$SshKey""";
Get-WFALogger -Info -message $("Running: " + $Cmd)

$retVal = Invoke-NcSsh -Command $Cmd

Get-WFALogger -Info -message $retVal

 

Note: I'm not sure whether I created this one, or just copied someone else. 😉

View solution in original post

1 REPLY 1

coreywanless
2,830 Views

Yes, there are ways to invoke CLI commands from the DataOntap Powershell Module.

 

 

Here is an example command that I have for setting up public keys. It uses the 'Invoke-NcSsh' posh commandlet:

Connect-WfaCluster $Cluster

Get-WFALogger -Info -message $("Setting up publickey for user '" + $username + "' on Vserver " + $Vserver)

$Cmd = "security login publickey create -vserver $Vserver -user $Username -publickey ""$SshKey""";
Get-WFALogger -Info -message $("Running: " + $Cmd)

$retVal = Invoke-NcSsh -Command $Cmd

Get-WFALogger -Info -message $retVal

 

Note: I'm not sure whether I created this one, or just copied someone else. 😉

Public