Active IQ Unified Manager Discussions

query active directory from script

stephen2
4,403 Views

All, I am trying to get domain group membership from an AD controller.  WFA 2.1

If I try using this:  $users = get-adgroupmember -identity $groups I get the following:   11:19:35.716 ERROR  [no op jpmc] The server has rejected the client credentials.

However, if I enter in any combination of credentials, the workflow just hangs.

I have identified that the query I am using works from powershell, but not from the script. I tried hardcoding the credentials and server, as well as using the credential cache but it does not matter. Whenever I attempt to use any credentials, everything hangs.

Has anyone gotten AD queries to work from within a command script?  If so, got some code you can share?

Also, has anyone developed an Active Directory data source? It would be great if we could populate a custom table from AD and then just query that.

Steve

3 REPLIES 3

sinhaa
4,403 Views

Hello Steve,

@ Has anyone gotten AD queries to work from within a command script?  If so, got some code you can share?

====

About executing AD queries in WFA commands, it should be possible, but till now I haven't tried it. I'll try to get it working and post how to do it.

@ Also, has anyone developed an Active Directory data source? It would be great if we could populate a custom table from AD and then just query that.

======

I have a sample Data Source Type for Active Directory using a powershell script. Attaching it here. This fetches the members of OU=Computers and Users. You can see it and modify it according to your need. If you need further help, you can post your queries here and I'll try to help you.

Import this on a WFA2.1 or above.

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

sinhaa
4,403 Views

Also there is a good discussion on a similar topic here : https://communities.netapp.com/message/120958#120958

This might help you too.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

abhit
4,403 Views

Hi Steve:

Before you execute the workflow, it is good to just test the command.

There is a "Test" button in the command screen, it is good to check

if that is working.

Regards

Abhi

Public