(2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 1)
Posted by Jorge on 2019-02-12
Some time ago I wrote a PowerShell script to reset the KrbTgt Account Password of both RWDCs and RODCs.
–
More information can be found through the following link: (2018-12-30) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs
The script itself can be downloaded through the following link: Reset The KrbTgt Account Password/Keys For RWDCs/RODCs
–
The new version of the script has:
- 1 new feature
- 2 fixes
–
Bug Fix: Instead of searching for "Domain Admins" or "Enterprise Admins" membership, it resolves the default RIDs of those groups, combined with the corresponding domain SID, to the actual name of those domain groups. This helps in supporting non-english names of those domain groups.
Figure 1: Checking Admin Role Membership Based Upon Default RIDs And Corresponding Domain SIDs To Support Non-English Names Of Admin Groups
–
New Feature: Read and display metadata of the KrbTgt accounts before and after the password reset to assure it was really only updated once!
Figure 2: Additional Information Displayed After Resetting The Password
–
and…
Bug Fix: Added a try catch when enumerating details about a specific AD domain that appears not to be available. Instead of an ugly PowerShell exception/error, the table displays the AD domain is not available for targeting.
–
Have fun!
–
Cheers,
Jorge
————————————————————————————————————————————————————-
This posting is provided "AS IS" with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/
————————————————————————————————————————————————————-
########################### Jorge’s Quest For Knowledge ##########################
#################### http://JorgeQuestForKnowledge.wordpress.com/ ###################
————————————————————————————————————————————————————-
(2019-02-25) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 2) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
(2020-02-10) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 3) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
(2020-02-18) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 4) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
Resetting The Password Of The Special Purpose KrbTgt Account For Azure AD « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
(2020-04-06) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 5) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
(2022-12-21) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 6) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike
(2023-03-04) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (Update 7) « Jorge's Quest For Knowledge! said
[…] (2019-02-12) PowerShell Script To Reset The KrbTgt Account Password/Keys For Both RWDCs And RODCs (U… […]
LikeLike