Category Archives: My Best

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

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

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

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

Fast PowerShell Treeview OU Selection Form

A large number of my scripts involve picking an Active Directory Organizational Unit (OU). I have been using Out-Gridview for OU navigation. This is because I was unable to find a form based GUI OU picker that worked fast enough in … Continue reading

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

Delete Inactive User Profiles with PowerShell

Written to replace DelProf, this script deletes inactive user profiles from a local or remote computer.  It supports arguments by position, and has a test parameter.  If you run it locally, you may supply host name, localhost or “.” The … Continue reading

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

Convert data from Get-ADUser and Get-ADComputer for Export-CSV

If you have been following my blog, you know that I am an experienced vbscripter, but am relatively new to PowerShell.  I was excited that my long vbscripts to export data from Active Directory would be now one liners which … Continue reading

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

USB Monitor for Removable Drives

Having users plug USB drives into their systems can be a portal for malware into your network and data exiting from your network.  There are sophisticated programs that allow you to block and monitor endpoint security, such as Lumension’s Sanctuary.  If … Continue reading

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