GithubHelp home page GithubHelp logo

remove-passwordneverexpires's Introduction

This Script has 4 functions

  1. Main-Menu: self-explanitory
  2. check-passNeverExpiresFlag
    1. gets current date/time
    2. subtracts wiggle room from today's date (default 70)
    3. gets users matching the following critereon:
      1. PASSWORDLEVEREXPIRES flag set to TRUE
      2. ENABLED flag set to TRUE
      3. Password age is within the wiggle period
      4. iv) their name is not like "Service_"
    4. for each of these users
      1. checks to make sure user CAN change their password, if not, service account is assumed and the remainder are skipped
      2. returns the password age
      3. if the PASSWORDNEVEREXPIRES flag is set to true, say so in green
      4. if the PASSWORDNEVEREXPIRES flag is set to false, say so in red
      5. additionally return the following properties:
        1. PasswordLastSet
        2. LastLogonDate
        3. Password Expiry date
      6. if the user CANNOTCHANGEPASSWORD flag is set true, say so in red
      7. if the user CANNOTCHANGEPASSWORD flag is set false, say so in green
    5. remove-PassNeverExpiresFlag
      1. gets current date/time
      2. subtracts wiggle room from today's date (default 70)
      3. gets users matching the following critereon:
        1. PASSWORDNEVEREXPIRES flag set to TRUE
        2. ENABLED flag set to TRUE
        3. Password age within the wiggle period
        4. Their NAME is not like "Service_"
      4. if this user count is 0, then write to host 'No users match criteria.'
      5. for each of the users do the following
        1. if CANNOTCHANGEPASSWORD flag is set to true, say so in red, displaying user NAME and SAMACCOUNTNAME
        2. otherwise do the following:
          1. display "Removing 'password never expires' for:" username
          2. set the AD user account property PASSWORDNEVEREXPIRES to FALSE
          3. get the user again and confirm PASSWORDNEVEREXPIRES is set to FALSE
          4. display success or failure message

remove-passwordneverexpires's People

Contributors

cbshearer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.