Category Archives: Windows Administration

Reset User Account ACLs

The security for user account objects in an OU may drift over time. User accounts moved within the domain will retain delegations previously made, and user accounts created after schema extensions won’t have the same security as user accounts created … Continue reading

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

Report GPOs with Script References

How quickly can you answer this question:  Which Group Policies reference batch files, vbscripts, or PowerShells?  What is the best way to get the information and present it into a spreadsheet?  I did it by searching SysVol for the script.ini … Continue reading

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

Launch the Group Policy Editor Outside the MMC

It is annoying that there isn’t a command line for the Group Policy Editor.  To edit a GPO you must 1) open the Group Policy Management Console, 2) Open the list of Group Policies, 3) select the GPO you want … Continue reading

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

Delete User Profiles Interactively with PowerShell

Last week, one of my administrators was complaining at how involved it was to remove a profile on a remote user’s computer. A little over two years ago, I wrote Delete Inactive Profiles, as a substitute for DelProf for post … Continue reading

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

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