Beranda > Script > Script disabled user dan move ke OU lain

Script disabled user dan move ke OU lain

Script ini berfungsi untuk disabled banyak user dan kemudian dipindahkan ke OU yang diinginkan. Sebelum menjalankan script ini buatkan terlebih dahulu dua  file .txt, file yang pertama (dn.txt) akan di isi dengan distinguishedName dan file .txt ke-dua (log.txt) untuk mencatat hasilnya (kalau mau sedikit report buat aja script untuk create file ini). Untuk mendapatkan distinguishedName bisa pakai script disini

strDisableAccount = TRUE
strNewParentDN = “LDAP://OU=Disabled Accounts,DC=contoh,DC=com”

Const ForReading = 1
Const ForAppending = 8

Set objFSO = CreateObject(“Scripting.FileSystemObject”)

Set objFile = objFSO.OpenTextFile(“C:\dn.txt”, ForReading)
Set objApp = objFSO.OpenTextFile(“C:\log.txt”, ForAppending, True)

While not objFile.AtEndOfStream

    objApp.WriteLine vbCrLf

    strUserDN = objFile.Readline

    objApp.WriteLine strUserDN ‘& vbCrLf

On Error Resume Next

set objUser = GetObject(“LDAP://” & strUserDN)

If Err.number = -2147016656 Then

          objApp.WriteLine “Error: check status of object :” & strUserDN

          ‘wScript.Echo Err.Description, apgSeverityError, Err.Number

End If

if objUser.AccountDisabled = TRUE then

   objApp.WriteLine “Account for ” & objUser.Get(“cn”) & ” currently disabled – not moved”


   ‘objApp.WriteLine “Account currently enabled”

   if strDisableAccount = TRUE then

      objUser.AccountDisabled = strDisableAccount

      ‘WScript.Echo “Previous Description: ” & objUser.Get(“description”)

      ‘objUser.Put “description”, “#### Disabled and moved to Disabled Accounts OU via script”

      objApp.WriteLine “Account disabled”

      set objCont = GetObject(strNewParentDN)’

                  objCont.MoveHere “LDAP://” & strUserDN, vbNullString

                 ‘ WScript.Echo “Account for ” & objUser.Get(“cn”) & ” moved to new OU”                               

   end if

end if

set objUser = nothing


WScript.Echo “Done”

Atau kalau mau ada juga softwarenya nih

Semoga bermanfaat,

Nana Sutisna

  1. April 15, 2013 pukul 4:53 am

    Lastly, if you wish to invest in long-term air conditioning,
    experts recommend that you purchase ACs marked 16 to 23 SEER (Seasonal Energy Efficiency Rating).
    Faster winds create evaporation close to the trees, thereby diminishing their
    heat. This will ensure no refrigerant remains trapped in the
    lines that may either be accidently released to the atmosphere or
    injected in the vehicle on top of what you expect to be injecting.

  2. April 17, 2013 pukul 9:51 am

    The article offers established beneficial to us.
    It’s really informative and you’re simply certainly really experienced in this area. You get opened my own sight to varying thoughts about this particular subject along with interesting and sound written content.

  3. April 20, 2013 pukul 7:49 am

    Hello there, just became aware of your blog through Google, and found that it’s really informative. I’m going to
    watch out for brussels. I will appreciate if you continue this in future.
    Lots of people will be benefited from your writing.

  4. April 20, 2013 pukul 4:07 pm

    Thanks , I have just been looking for information about this subject
    for a while and yours is the greatest I have
    came upon so far. But, what in regards to the conclusion? Are you
    certain concerning the source?

  5. April 24, 2013 pukul 7:31 am

    Every weekend i used to pay a quick visit this web page, because i want enjoyment, as this this website conations genuinely
    fastidious funny data too.

  6. April 26, 2013 pukul 5:18 am

    Wow! After all I got a blog from where I be able to truly obtain valuable facts regarding my study and

  7. April 28, 2013 pukul 12:19 am

    Great article! We will be linking to this particularly great post on our website.
    Keep up the good writing.

  8. April 28, 2013 pukul 7:23 pm

    Hi are using WordPress for your blog platform?

    I’m new to the blog world but I’m trying to get started
    and create my own. Do you require any html coding knowledge to
    make your own blog? Any help would be greatly appreciated!

  9. Mei 1, 2013 pukul 1:52 pm

    Your own report features verified useful to myself. It’s quite helpful and you’re obviously really knowledgeable in this area. You get opened my personal face for you to various opinion of this subject with intriguing, notable and reliable content.

  10. Mei 5, 2013 pukul 1:26 am

    The report provides established beneficial to myself.
    It’s really helpful and you’re simply obviously extremely well-informed in this area. You have got opened up my personal face for you to different views on this subject matter along with interesting and solid content material.

  11. Mei 10, 2013 pukul 12:27 pm

    You really make it seem really easy with your presentation however I in finding this matter
    to be really something that I believe I would never understand.
    It kind of feels too complex and extremely vast for me.
    I am having a look forward for your next submit, I
    will try to get the hold of it!

  12. Mei 13, 2013 pukul 3:17 am

    Hi, i think that i saw you visited my site so i came to “return
    the favor”.I’m trying to find things to enhance my site!I suppose its ok to use a few of your ideas!!

  13. Mei 13, 2013 pukul 4:10 am

    Your current report offers established necessary to myself.
    It’s extremely informative and you are clearly really knowledgeable of this type.

    You have opened my own sight to be able to different thoughts about this kind of matter using intriguing and
    sound content.

  14. Mei 14, 2013 pukul 5:08 pm

    You can find nasal dilators that may be inserted in to the nasal passages and keeps the passages open allowing much more air to pass through the nasal passages.
    You’ll find sprays that can be employed and these will support preserve the nasal passages along with the back in the throat moist to cut down on vibrations with the tissues within the nose and throat. You’ll find snoring pillows
    that can also detect and record the sounds you are generating if
    you snore for listening enjoyment later. The recording may also be taken for
    your medical doctor or to a sleep specialist for critique.
    There are also herbal and holistic therapies that will be tried for relief of snoring.

  15. Mei 24, 2013 pukul 10:43 am

    What i do not understood is in fact how you’re not really a lot more well-preferred than you may be right now. You’re very intelligent.

    You already know thus considerably relating to this matter, made me for my part
    believe it from so many varied angles. Its like women and
    men aren’t fascinated unless it is one thing to do with Lady gaga! Your personal stuffs nice. Always care for it up!

  16. Juni 2, 2013 pukul 7:02 pm

    Quality articles is the main to invite the users to visit the website, that’s what this web page is providing.

  17. Juni 18, 2013 pukul 10:06 am

    This is a really good tip especially to those
    new to the blogosphere. Simple but very precise info… Thanks for sharing
    this one. A must read post!

  18. Juli 10, 2013 pukul 2:59 am

    If you are going for most excellent contents like myself, only go to see this site daily for the reason that it offers quality contents, thanks

  19. Juli 24, 2014 pukul 1:26 am

    If you are giving the door a fresh coat of paint in a new color, you can paint the molding after
    it is attached along with the remainder of the door. an experience that
    opens your eyes, softens your heart, and quiets you a little bit.
    Old Clothes – Instead of just tossing or donating your old clothes, try
    getting crafty with them instead.

  20. Agustus 5, 2014 pukul 8:53 pm

    whoah this blog is excellent i like reading your posts.
    Stay up the good work! You already know, a lot of people are searching around for this information, you can aid them greatly.

  21. Agustus 19, 2014 pukul 3:05 pm

    The demands of the more mainstream content, such as Facebook and
    blogging, can leave little time for these extras, and it’s important not to become so buried in online activities that you steal time away from your core
    business. com, or you’re planning to open one soon, it’s certain that some amount of homework will equip any crafter with
    improved knowledge of their unique niche, value, and target
    audience. Article Source: in business is mostly about marketing,
    especially online.

  22. Agustus 23, 2014 pukul 5:59 am

    Duck in and out of cover until it’s clear, then move up to a display case.
    Payers and health carriers seems to be caught up in the uncertainties surrounded
    around these health insurance exchanges and how the payers should align their health products and business
    structures to quickly and effectively realign themselves
    with the different state health insurance exchanges.
    Stacy – Consistency is key, and taking on the responsibility
    of the success or failure of your work and efforts is important,
    They (the artists) are in control of anything positive
    or negative that comes their way.

  23. September 3, 2014 pukul 7:51 pm

    Hi my friend! I want to say that this post is awesome, nice written and come with
    approximately all important infos. I would like to peer more posts like this .

  24. September 20, 2014 pukul 11:18 am

    These boxes are specially designed for shipping clothes,
    framed artwork and perilous materials. Video Production improved presented impressing are
    sure to appeal video companies’ middle and old, large and small,
    traditional in a valuable and meaningful subject.
    Professional removal agencies of Noida address this problem.
    However, if they are susceptible, then try to get a feel for how the client thinks that the contractor has performed – even if he or she makes some criticisms then finish by asking
    what good points the contractor has. The rides include Hoodoo Run, Woo – Hoo Falls, Stingray Falls, Kiwi
    Curl, and more. Once you hold this handset, you can feel you are touching elegance at the palm of your hands.
    Check out Sea – World San Diego coupons so that you can experience all the fun and
    see all of the animals at an affordable price.
    Those who sleep on their backs need to have the support so that their spine is not pulled out of alignment
    during their sleeping. We are repairing and installment different types of gates suchlike Actuation Steel State Doors, Mercenary Coiled
    Grills for much than 10 age. Human resources is a large, varying discipline so it stands to reason that many who come into the
    field come from varied background.

  25. Sal
    Desember 4, 2015 pukul 7:48 am

    Dieters should eliminate bad fats, which include corn oil, vegetable cooking oils, margarine, vegetable shortening and all partially hydrogenated
    oils. Another good thing about the h – CG diet plan is that when your metabolism is reset,
    your body will keep burning fat calories, even when you stop the diet and return to eating normal foods.
    First, the body needs balanced levels of carbohydrates, proteins, and fats to function properly.
    Just remember that Salmon and eel, as well as
    dried fish, aren’t allowed. t just get rid of unwanted body fat, but other
    benefits are that it decreases cholesterol levels and reduces blood pressure
    in some cases.

  26. Juli 14, 2017 pukul 4:42 am

    My turn, my turn.? Larrү stated eagerly wiggling to gget a chance to taⅼk.
    ?I think the best factoг about God is that he can beat up the satyan as a result of the satan is scаry and mеan and ugly and
    bad and Godd can beat hiim up ѕo the dеvil can?t harm uѕ
    like he did these demkon stuffed peope in Jesus daү.

  27. Agustus 30, 2017 pukul 5:35 pm

    As of April 2015 Evergreen Business System is no longer be our go-to
    platform for automation.

  28. September 28, 2017 pukul 2:03 pm

    But before you develop into the following Jeff Bezos
    (and positively before you quit your job!), it’s worth spending a while to think about a business plan.

  29. Oktober 11, 2017 pukul 5:21 pm

    wonderfl points altogether, you simply woon a emblem
    neww reader. Whhat could yyou recommend about your put up that you simply made some
    days ago? Any positive?

  30. Ina
    Februari 14, 2018 pukul 5:47 pm

    Hi, aftеr reaⅾing this aԝеsome ppost i am аss wеⅼl happy to share my know-how here with c᧐llеagues.

  31. April 7, 2018 pukul 7:49 am

    Software program development companies company.

  32. Agustus 1, 2018 pukul 10:22 am

    Ya da VIP hizmetlerinizi yetersiz mi buluyorsunuz?

  33. November 15, 2018 pukul 5:10 pm

    I read this paragraph fully concerning the resemblance of most recent and preceding technologies, it’s amazing article.

  1. Oktober 26, 2017 pukul 10:37 am

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

%d blogger menyukai ini: