Category Archive: Active Directory

Sep 22 2015

Delete phantom records of an old domain controller from DNS

Sometimes after demoting a DC the NS records in DNS are kept! These records may cause issues if not deleted. Here’s a PowerShell three liner to remove the obsolete records from all zones, you need to change the server names according to your environment.  

  Cheers!

Permanent link to this article: http://almoselhy.azurewebsites.net/2015/09/delete-phantom-records-of-an-old-domain-controller-from-dns/

Nov 27 2014

Collect installed updates on many computers using PowerShell

I wanted to collect the currently installed updated on a group of servers using PowerShell. This can be more accurate that WSUS or SCCM reports since it depends on WIM to get the current data, not the last reported ones. The – very small – script gets the computer objects from active directory, then use …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2014/11/collect-installed-updates-on-many-computers-using-powershell/

Dec 16 2011

Remove unused computer accounts from Active Directory using PowerShell

I can never call myself a PowerShell guru, but I am currently trying my best to “practice” more PowerShell since I know that it is the future of command line administration. So today, I was doing some regular maintenance to the active directory, just disabling the old computer accounts as a step into removing them …

Continue reading »

Permanent link to this article: http://almoselhy.azurewebsites.net/2011/12/remove-unused-computer-accounts-from-active-directory-using-powershell/