Tag: Active Directory

List all Local Accounts on a Server Copy the following Below into text pad and save as a .ps1, run script accordingly. Update network path if required. Echo “Input computer name: ” $Computer = Read-Host $Credential = Get-Credential Get-WmiObject -Class Win32_UserAccount -Filter  “LocalAccount=’True’” | Select PSComputername, Name, Status, Disabled, AccountType, Lockout, PasswordRequired, PasswordChangeable, SID | […]

Read more

Very small and basic script that pulls last logon times. Copy the code and save as a .ps1 “Get-ADUser -Filter * -Properties * | Select-Object Name, @{Name=”Last Successful Logon”;Expression={[datetime]::FromFileTime($_.’lastLogonTimeStamp’)}} | Sort-Object “Last Successful Logon””  

Read more
Step-By-Step Guide on how to rename your active directory domain name – Windows Server 2016

I have always been curious to see how hard it was to rename an active directory domain name, but never really had a reason to do it. Generally you move to clean domain, as it has issues with Exchange Servers 2007+. Finally a time has occurred when I can do this in my environment as […]

Read more