Giter Site home page Giter Site logo

lukejjh / bulkadpasswordchange Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 11 KB

A simple PowerShell script which facilitates bulk user password resets in Active Directory.

License: MIT License

PowerShell 100.00%
windows powershell active-directory security

bulkadpasswordchange's Introduction

BulkADPasswordChange

A simple PowerShell script which facilitates bulk user password resets in Active Directory.

Usage

This script should typically be executed on a domain controller as a domain admin.

  1. Open PowerShell as administrator.
  2. Run the script (e.g. .\BulkADPasswordChange.ps1, C:\path\to\BulkADPasswordChange.ps1).
  3. Add users and/or groups whose passwords you'd like to reset to the temporary security group. Membership is expanded recursively.
  4. Confirm the password changes. This will be previewed to you before changing.

A CSV file with user details and their new passwords will be written to a CSV file in the same directory as this script.

Examples

Typical usage:

.\BulkADPasswordChange.ps1

Require password change at next logon:

.\BulkADPasswordChange.ps1 -ChangePasswordAtLogon

Set the same password for all users (not recommended):

.\BulkADPasswordChange.ps1 -Password "CorrectHorseBatteryStaple" -ChangePasswordAtLogon

Output

PS C:\Scripts> .\BulkADPasswordChange.ps1
Temporary password change group created. Press Enter to open ADUC and add users and/or groups to "PasswordChange-2019-10-26-637076972828943989".

Press Enter when all required members have been added to group.


Name           Username       Password
----           --------       --------
Matt Damon     matt.damon     FunPlateLove2
Alec Baldwin   alec.baldwin   TheNineRude97
George Clooney george.clooney WildZeroBurn88


The above password changes will be made. Results will be exported to a CSV file. Continue? [N/y] y
Results saved to "C:\Scripts\PasswordChange-2019-10-26-637076972828943989.csv".
Done.

PasswordChange-2019-10-26-637076972828943989.csv:

"Name","Username","Password","Email","MobilePhone","Phone","Office"
"Matt Damon","matt.damon","FunPlateLove2","[email protected]","0455555555","0755555555","Brisbane"
"Alec Baldwin","alec.baldwin","TheNineRude97","[email protected]","0455555556","0755555556","Paris"
"George Clooney","george.clooney","WildZeroBurn88","[email protected]","0455555557","0755555558","London"

bulkadpasswordchange's People

Contributors

lukejjh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.