Set-Acl

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Nigel Tatschner Nigel Tatschner 6 months ago.

  • Author
    Posts
  • #42194
    Profile photo of Andrew
    Andrew
    Participant

    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

  • #42266
    Profile photo of Nigel Tatschner
    Nigel Tatschner
    Participant

    This might be of no help, but I recently had this kind of issue.

    It was to do with the elevation of the security token, all I did was to run the powershell console as Admin and it worked.

    Might be worth research?

    I was using this;

You must be logged in to reply to this topic.