Category Archives: Windows Administration

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

Get Resultant Set of Polices (RSOP) with User Selection

The Get-GPResultantSetOfPolicy cmdlet in the GroupPolicy module of PowerShell has a parameter for a user name.  Often I have no idea who has logged onto the computer.  Get-RSOP.ps1 uses WMI to give you a pick list of users on the … Continue reading

Posted in Active Directory, Group Policy Objects, 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

Get Downtime Using PowerShell

I have been having problem with a computer with random reboots, and hanging on restart.  I wanted to know how long the computer had been unavailable.   I decided to use System Event ID 12 as the startup event for the … Continue reading

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

Fix User’s Home Directory Permissions with Take Ownership

Fix-HomeDrivePerms.ps1 is a PowerShell script which attempts to reset folder security when the permissions are really hosed.  It uses a take ownership function, Set-Owner, by Boe Prox, instead of takeown.exe, but does shell out to iCacls.exe.  I wrote this to … Continue reading

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

Another User Folder Security Reset Script

This simple batch file resets the inheritance on users folders and then grants them “modify” using the builtin icacls.exe.   This script does not address issues which require you to take ownership — I will post one that does that soon. … Continue reading

Posted in Batch, Scripting, Security, Windows Administration | Tagged , , | Leave a comment

Set Share Folder Icon for Server 2012 and Windows 10

I like to look at a folder and know whether or not it is shared. In earlier Windows OS there was a hand overlay which shows you this information. In Server 2012, this indicator has been omitted. Set-SharedFolderIcons.ps1 lets you … Continue reading

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