Announcement

Collapse
No announcement yet.

Dsquery

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dsquery

    Hi guys,
    Im using DSQUERY to try and delete a few users in AD who havent logged on for a while. Im receiving an error though. Please see below.

    This is the command i want to use.
    dsquery user "ou=test,DC=darlington,DC=local" -inactive 10 -limit 0 | dsmod user "ou=test,DC=darlington,DC=local" -di
    sabled yes

    This part works fine
    dsquery user "ou=test,DC=darlington,DC=local" -inactive 10 -limit 0.

    this is the error when i put it all together.
    dsmod failedu=test,DC=darlington,DC=local:The object class of the target does
    not match the one specified on the command line.

    Theres a few test users in here i want to test it on! Any help will be appreciated!!

  • #2
    Re: Dsquery

    The command line mus be:

    dsquery user "ou=test,DC=darlington,DC=local" -inactive 10 -limit 0 | dsmod user -disabled yes

    Comment


    • #3
      Re: Dsquery

      Still fails with the same error!

      Comment


      • #4
        Re: Dsquery

        Try running this from a command prompt,
        Code:
        dsquery.exe user "ou=test,DC=darlington,DC=local" -inactive 10 -limit 0 | dsmod.exe user -disabled yes -c
        Find the object that causes the error.

        \Rems

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment

        Working...
        X