Category Archives: Alan’s Favorites

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

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

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

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

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

Remove Active Directory Delegations

Over time, Active Directory delegations tend to accumulate and drift from the standards in the enterprise.  Removing the delegations for a user or group can be slow, especially if you do it manually.  Microsoft has a good article about this process, but … Continue reading

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

Export to XLSX without Excel: Export-XLSX.ps1 Revisited and Tweaked

I often look at the code of others with respect and admiration. Peter Kriegel (Germany) wrote Export-XLSX.ps1, an amazing script which lets you export data into a real XLSX file without Excel being installed. The script also enables you to … Continue reading

Posted in Alan's Favorites, Excel, Functions, PowerShell, Scripting | Tagged , | Leave a comment

Finding MTU for all Hops in a Trace Route

I know, finding the “maximum” MTU is a redundancy, as MTU is an acronym for “Maximum Transmission Units”.  However, my needs were to find all the MTUs to each hop of a tracert.  Like many scripts, Find-MaxMTU.ps1 turned out to be … Continue reading

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

Quickly Check Domain Controller Health

How can you tell whether an Active Directory domain controller is functioning properly?  How do you know whether some over-zealous VLAN ACL is blocking necessary ports?  Testing ICMP, is easy, just ping it.  Testing LDAP response isn’t hard, I wrote … Continue reading

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

A GUI to Select Object Properties in Pipeline

My first attempt at a GUI to select objects properties demonstrated that I didn’t have a firm grasp on how to pipeline an object through an advanced function.  The problem I had at the time was not understanding how to … Continue reading

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