forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript-ADListUsersEx.yml
More file actions
27 lines (27 loc) · 983 Bytes
/
Copy pathscript-ADListUsersEx.yml
File metadata and controls
27 lines (27 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
commonfields:
id: ADListUsersEx
version: 1
name: ADListUsersEx
script: |-
# Optional arguments and default values
attrs = 'name,displayname,memberOf,lastlogon,lastlogoff,logoncount,badPasswordTime,badPwdCount,lastLogonTimestamp,pwdLastSet,whenCreated,whenChanged'
if demisto.get(demisto.args(), 'attributes'):
attrs += "," + demisto.args()['attributes']
demisto.results( demisto.executeCommand( 'AdSearch', { 'filter' : "(objectClass=User)", 'attributes' : attrs } ) )
type: python
tags:
- active directory
comment: Retrieve the list of User objects stored in Active Directory and include
an extended list of attributes and information about each user. Use the "attributes"
argument to include additional specific attributes in the results.
system: true
args:
- name: attributes
description: Include these AD attributes of the resulting objects in addition to
the default ones
scripttarget: 0
deprecated: true
dependson:
must:
- ad-search
timeout: 0s