Category Archives: Windows Administration

Undelete-ADObject

Undelete-ADObject.ps1 is a GUI form based script for undeleting user, computer, group, print queue, and contacts from Active Directory.  You can display all of the objects of the selected type, or search by the name. I use this script frequently.  … Continue reading

Posted in Active Directory, Alan's Favorites, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Add-WindowsFeature Alternative for Client OS

Waiting for the add remove features dialog populate on my client OS computer is slow.  Since I started using Add-WindowsFeature wither Server 2008, and Install-WindowsFeature beginning with Server 2012, I was disappointed by the lack of a similar cmdlet for … Continue reading

Posted in PowerShell, Scripting, Windows 10, Windows 7, Windows 8, Windows Administration | Tagged , , | Leave a comment

Export and Import Delegated OU Permissions with PowerShell

There are some delegations of permissions within Active Directory which cannot be made without extra effort. Some properties are flagged as hidden in a file called Dssec.dat, in %windir%\System32 on computers with the Active Directory Users and Computers (ADUC) MMC. … Continue reading

Posted in Active Directory, Alan's Favorites, My Best, PowerShell, Scripting, Security, Windows Administration | Tagged , , , | Leave a comment

Clear GPO Cache on Remote Computer with PowerShell

Clearing the GPO cache on a computer may be the only way to fix a persistent problem.  Doing this involves deleting files, registry entries, and rebuilding the security database.  Clear-GPOCache.ps1 works by creating a custom batch file on the remote … Continue reading

Posted in Active Directory, Batch, Group Policy Objects, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Enable New User Mailboxes with PowerShell

Mail enabling new users should be easy to do from within the Exchange management console.  If you are in a really large organization, you soon discover that it is painfully slow.  When we create new users it takes time to … Continue reading

Posted in Alan's Favorites, Exchange, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Fix Creation Date Later than Date Modified with PowerShell

A weird and annoying thing happened to my home directory at work when it was moved from Windows to a storage appliance. The file CreationTime was lost on all the files and was set to the date of the data … Continue reading

Posted in PowerShell, Scripting, Scriptlets, Windows Administration | Tagged , , | Leave a comment

Get MAC Address from IP Address

I got a call last week from a member of one the other teams where I work.  He asked, “Do you have a script which will resolve a list of IP Addresses to MAC Addresses?” My answer was, “not yet”.  … Continue reading

Posted in Functions, PowerShell, Scripting, Windows Administration, WMI | Tagged , , | Leave a comment

Update GPOs with Newer Version

If you use GPOs to enforce baselines, you may find that your enterprise is moving from version 1.1 to version 1.2 of a GPO.  Unfortunately for you, version 1.1 linked in a dozen places.  Wouldn’t you rather just you search … Continue reading

Posted in Alan's Favorites, My Best, PowerShell, Scripting, Windows Administration | Tagged , | Leave a comment

Get All GPOs Linked to an OU

Get-AllGPOsLinkedToOU.ps1 returns a unique list of all GPO’s linked to an OU. You can also run a onelevel or subtree search to get a unique list of linked OUs at or below the selected OU. You are prompted for the … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Windows Administration | Tagged , | Leave a comment

Reset GPO Cache

This script deletes the locally stored copies of GPOs and forces a GPUPdate on a computer. Reset-GPOCache.ps1 works by a remote connection to the registry provider to get the path to the Group Policy\History folder, then deletes the files beneath … Continue reading

Posted in Active Directory, Group Policy Objects, PowerShell, Windows Administration | Tagged , | Leave a comment