Category Archives: AD

Addning vmware vm to AD with Invoke-VMscript

Adding a new Vmware VM to Active Directory without using Customization Specifications proved to be a challenge. Since the VM was newly created from a template with firewall enabled I was forced to use Invoke-VMscript to get into to the … Continue reading

Posted in AD, powershell, Uncategorized | Leave a comment

Powershell to disable unused computer AD accounts.

Here is a powershell script that can be used to cleanup old computer AD accounts: Import-Module ActiveDirectory $date = get-date $systems = Search-ADAccount -ComputersOnly -AccountInactive -TimeSpan 365 foreach($computer in $systems){ $computer | select-object Name, OperatingSystem, DistinguishedName, LastLogonTimeStamp >> “C:\Scheduled Tasks\AD … Continue reading

Posted in AD | Tagged , | Leave a comment