Link to home
Start Free TrialLog in
Avatar of seaninman
seaninmanFlag for United States of America

asked on

VB Script Needed

I am looking for a VB Script that I can schedule through windows scheduler that will query a specific OU of users and email a distribution group a total number of users that have data in the extensionAttribute4.

So if OU <TEST> has 500 users and out of those users 239 has something in the extensionAttribute4 I would like the script to email something like this....

Total number of users with data in extensionAttribute4 now is 239.
ASKER CERTIFIED SOLUTION
Avatar of holthd
holthd
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of seaninman

ASKER

Thanks Daniel!!  Actually I have a Powershell script that someone on experts-exchange gladly helped me with.  This script is one  I manually run in Powershell ISE, but was thinking it would be easier to schedule and run from a VBScript.
$ADSelf = get-aduser -filter {groupPriority -like "*"} -Properties DisplayName, GroupPriority -searchbase "ou=Named Accounts,ou=test,ou=users,dc=companyx,dc=com" -resultsetsize $null| sort -Property SamAccountName
$adself.Length

Open in new window