add zloader test

This commit is contained in:
Carrie Roberts
2021-01-27 19:59:10 -07:00
committed by GitHub
parent 3fe613c6dd
commit 2cc0799284
+11
View File
@@ -226,5 +226,16 @@ atomic_tests:
command: |
#{adfind_path} -sc dclist
name: command_prompt
- name: Remote system discovery with ADSI
description: |
put our description here
multi-line input
supported_platforms:
- windows
executor:
command: |
powershell -ep bypass -command "$s=gwmi Win32_ComputerSystem; if (-not $s.PartOfDomain) { $n=-1 } else { $dr='LDAP://';$s.Domain.Split('.') | % { $dr+='DC='+$_+',' }; $dr=$dr.TrimEnd(','); try { $ad=New-Object DirectoryServices.DirectorySearcher(([adsi]$dr),'(objectCategory=computer)',('name')); $n=($ad.FindAll()).Count } catch { $n=-2} };write-host " Hosts count: " $n; "
name: command_prompt