0 votes

Hi All,

I'm trying to have a scheduled task email the helpdesk a list of machines from AD that have no description. I created a script and it runs the way I want it to however I stupidly ran it in the Adaxes scheduled task without realising that the task runs on each object. I only need to script to run once each day and I dont need it ot run on an object. I'll paste in the script below so you can see what I've done. I converted this script from powershell ISE to work with adaxes so I changed the module and command, my original command was just Get-Adcomputer.

Import-Module Adaxes
$nodesc = Get-AdmComputer -Filter * -Properties description,name| Where-Object {$_.description -Like ""} | Select -Property Name,description | out-string
Send-mailmessage -From someemail@somedomain.co.uk -To helpdesk@somedomain.co.uk -SmtpServer "exchangeserver.somedomain.co.uk" -Subject "No AD Description Machines" -body $nodesc

Obviously the helpdesk recieved alot fo emails when I ran the task haha! :O

Is there a way to have Adaxes retrieve the list of all no description machines and put that list into just one email. Id like to run that in scheduled task if possible.

Many thanks,

Will

by (350 points)

1 Answer

0 votes
by (294k points)
selected by
Best answer

Hello Will,

Yes, it is possible. You need to create a Scheduled Task configured for Domain-DNS Object type. To do so:

  1. Launch Adaxes Administration Console.
  2. Right-click your Adaxes service node, navigate to New and click Scheduled Task.
  3. On step 3 of Create Scheduled Task wizard select Show all object types and then select Domain-DNS Object type.
  4. Click Next.
  5. Click Add Action and select Run a program or Powershell script.
  6. Enter a short description and paste your script into the Script field.
  7. Click OK.
  8. Click Next and finish creating the Scheduled Task.
0

This worked perfectly cheers!

Related questions

0 votes
1 answer

We have a couple scheduled tasks that are scoped to run on all user objects across our domain to check for things like upcoming password expiration and account expiration. These ... log. Is there a way to only log events when an operation is executed?

asked Jul 9, 2021 by KelseaIT (320 points)
0 votes
1 answer

When trying to change the scheduled run time for two older tasks I get the error "Requested Service not found" when I click on the "Change schedule" link. It works fine ... . Is this just a permissions issue or is there something else going on? Thanks, Dan

asked Apr 24, 2017 by dwolf@hewlett.org (50 points)
0 votes
1 answer

I want to create a scheduled task to disable a user if he is inactive for 30days, the task must check inacivity o AD and Azure.

asked May 16 by johanpr (120 points)
0 votes
1 answer

Hello, The report named Inactive users allowed to log in shows the Active Directory sign-in (Last-Logon-Timestamp) and Azure AD sign-in (Last Logon) but only for Active Directory ... updated by an Azure logic App. But we'd love to have this natively in Adaxes.

asked Dec 13, 2022 by Gavin.Raymen (40 points)
0 votes
1 answer

Hello! how do i manage do get adaxes to remove all groups from the user after one month? We have a Business Rule where you can add an end of Date when the Account ... value field the powershell script works but not with the +1 Month. Thanks for your help!

asked Jun 14, 2023 by eww ag (140 points)
3,588 questions
3,277 answers
8,303 comments
548,084 users