remove users from NTFS

Welcome Forums General PowerShell Q&A remove users from NTFS

This topic contains 1 reply, has 2 voices, and was last updated by

6 months, 3 weeks ago.

  • Author
  • #103379

    Points: 14
    Rank: Member

    trying to figure out how to remove users after they are added to the NTFS, under IIS

    currently users get permissions to sites DSC script via:

                        Name             = 'test'
                        Authors          = ('user1', 'user2','WebGroup')
                        IISAnonymousUser = 'IUSR'
                        PhysicalPath     = 'Unique'
                        Ensure           = 'Present'

    foreach ($SiteAuthor in $Site.SiteAuthors)
    cNTFSPermission ($FQDN + "_SiteAuthor_" + $SiteAuthor)
    Ensure = "Present"
    Account = "domain\$SiteAuthor"
    Access = "Allow"
    Path = "D:\inetpub\$FQDN"
    Rights = "FullControl"
    DependsOn = "[File]$Folder_Root_Resource"


    #$AllAuthors += New-object -type PSObject -Property @{'Role'=$Node.Role; 'Author'=$SiteAuthor}

    anyone have a suggestion on removing them? if i remove them from the Authors field they don't get removed from the windows NTFS side.

  • #103388

    Points: 1,759
    Helping HandTeam Member
    Rank: Community Hero

    That may be a design problem with the DSC resource, then. It -should- be written so that if the ACL doesn't match what you've specified, it blows it away and re-applies what you want. I'd take that up with the module's author(s).

The topic ‘remove users from NTFS’ is closed to new replies.