Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.
I hobbled this together from several sources. When I ran it, I got an error about the account in the resource forest not being disabled. I disabled it in ADUC and ran the script again. This time is linked but the user had an empty mailbox. I can find no trace of the 2.5GB mailbox he was using before.
$Arg1 = "username" #same in account and resource forests) $username = "accountforest\admin" $password = ConvertTo-SecureString -String "********" -AsPlainText -Force $cred = New-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password Disable-Mailbox -Identity $Arg1 Enable-Mailbox -Identity $Arg1 -Alias $Arg1 -Database 'DB05' -LinkedMasterAccount 'accountforest.priv\username' -LinkedDomainController 'dc01.accountforest.priv' -LinkedCredential:$cred Set-Mailbox -Id $arg1 -customAttribute1 "CompanyName"
|Can I use powershell to generate list of users who logged in to computers in AD||14||69|
|SBS 2011 Queue Viewer error 451 4.4.0 Primary target IP address responded with: "421 4.2.1 Unable to connect."...||14||33|
|issue with beginner powershell script.||5||30|
|Active Directory screwed||9||28|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!