You must have the ActiveDirectory module available for import (usually done by installing RSAT). In reply to a question posed on the AD UDF thread. How to dump an array of users from AD with a partial Last Name: #include <AutoItConstants.au3>
#include <Array.au3>
$sName = inputbox("Get AD User Info" , "AD Lastname (or partial)")
$sName = "*" & $sName & "*"
$sCommands = "powershell -Command import-module ActiveDirectory; Get-ADUser -LDAPfilte
Importing a custom module and using it in your script: Download or Copy Get-LoggedOnUsers.ps1 https://gallery.technet.microsoft.com/scriptcenter/d46b1f3b-36a4-4a56-951b-e37815a2df0c Get-LoggedOnUsers.ps1 function Get-LoggedOnUser {
#Requires -Version 2.0
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true,
Position=0,
ValueFromPipeline=$true,