PowerShellAccessControl Module 3.0/4.0

Provides an easy way to view and modify security descriptors for most securable objects in Windows, including files, folders, registry keys, services, printers, shares, processes, and more. Pretty much any action possible from the ACL Editor can be performed with this module.

 
 
 
 
 
4.8 Star
(32)
27,057 times
Add to favorites
Security
4/25/2015
E-mail Twitter del.icio.us Digg Facebook
  • Unable to modify file share security descriptor
    1 Posts | Last post January 10, 2020
    • I am trying to script the configuration of shares and am hitting a problem adding a security group to the share. This is what I've got:
      
      $SecDescr = get-securitydescriptor $SMBPAth -objecttype lmshare 
      $Ace =  $SecDescr | Get-AccessControlEntry
      $GroupName="Mydomain\MyGroup"
      $AclEntry = $Ace | where {$_.principal -eq $GroupName}
      			
      if ($AclEntry -eq $null) { 
         write-host "Adding $groupname to $SMBPATH"
         $Acl= get-acl -path $SMBPath
         $Ace = New-AccessControlEntry -principal $GroupName -LogicalShareRights change -force
         $Acl | Add-accesscontrolEntry -AceObject $Ace
         $Acl | Set-Acl
      }
      
      Everything seems ok to me, but I cannot work out why this is not working.
  • Get-AccessControlEntry : Unable to find type [PowerShellAccessControl.ActiveDirectoryRights]
    2 Posts | Last post January 10, 2020
    • I had been using this module a while back and it was working just fine. I've just gone back to use the script I wrote again and I get errors trying to call pretty much every function:
      
      Get-AccessControlEntry : Unable to find type [PowerShellAccessControl.ActiveDirectoryRights]. Make sure that the assembly that contains this type is loaded.
      At T:\test.psm1:229 char:33
      +             $Ace =  $SecDescr | Get-AccessControlEntry
      +                                 ~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (PowerShellAcces...DirectoryRights:TypeName) [], RuntimeException
          + FullyQualifiedErrorId : TypeNotFound
      
      
      I would guess theres something I've forgotten to do, but what? 
    • Ignore that last message. I logged out and started again and everything worked, so I have no idea what I did wrong, but today I simply imported the .psm1 module as always and everything worked.
  • File names with [0] break the script
    1 Posts | Last post January 04, 2019
    • I can see that "function GetPathInformation" does not like files names that contain square brackets but was unable to fix the issue
  • Where I can find the version 4?
    1 Posts | Last post December 07, 2018
    • I cannot find the script, alwyas got the v3.
  • Add-PACAccessControlEntry
    1 Posts | Last post October 17, 2018
    • Hi, thats very great job!
      But in new version cmdlet Add-PACAccessControlEntry hasn`t -ServiceAccessRights parameter.
  • Help description in Add-AccessControlEntry
    1 Posts | Last post September 06, 2018
    • Seems to be for Remove-AccessControlEntry :)
      
      Fantastic module btw :)
  • PS Gallery
    1 Posts | Last post July 10, 2018
    • I know a few people have asked this already, but will this module be uploaded to the PS Gallery any time soon? Thank you, and fantastic work! 
  • 'None': The RPC server is unavailable
    1 Posts | Last post June 09, 2017
    • Hello Rohn,
      
      I am getting the below error message while running the command. Could you please help on figuring why I am getting this error message. Thanks for your help.
      
      dir “\\Servername\Share" -Recurse -Directory | Get-EffectiveAccess -Principal “user” | Export-CSV "\\c:\temp\output.csv"
       
      ConvertToIdentityReference : Looking up SID for 'None': The RPC server is unavailable
      At C:\windows\system32\windowspowershell\v1.0\Modules\PowerShellAccessControl\PowerShellAccessControl.psm1:3481 char:76
      +                         $NewSd.SecurityDescriptor.Group = $ShareSd.Group | Conve ...
      +                                                                            ~~~~~
          + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
          + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ConvertToIdentityReference
  • Module version 4.x
    1 Posts | Last post May 26, 2017
    • It seems that version 4 of this module removed the -WmiNamespaceRights parameter from the Add-AccessControlEntry and Add-PacAccessControlEntry cmdlets.
      
      Rohn,
      
      Was there a reason for this? Am I missing something? Was this parameter replaced by another? I didn't see a reference to it.  Apologies in advance if I overlooked something.
  • Make Source Available / Publish to Gallery
    1 Posts | Last post March 20, 2017
    • Hullo! I see previously you intended to publish to the PowerShellGallery last year - if you're still interested in doing so and/or in making your source available on GitHub or GitLab, I've got bandwidth to help out!
      
      Cheers!
      
      -Mike
1 - 10 of 33 Items