I recently had to perform several manual steps to start some DNS logging across our Domain PCs / Laptops. This basically involved the System32 directory and some dns.xxx files within. (Take ownership, changes permissions, rename, stop > start the dnscache service.
(Windows 7 64bit, Powershell version 2.0).
As a challenge I attempted to script this in Powershell and came up against .NET for some pieces of my script. My question is, does anyone know if there is any difference between how set-acl performs between Powershell versions. I use Powershell Version 5 for testing and development – I can run my script within Powershell version 5.0 with no errors, but hit issues in version 2.0 – it looks like UAC or some type of access denied trying to set ACL?
set-acl attempted to perform an unauthorized operation