ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. pally
    3. Posts
    P
    • Profile
    • Following 1
    • Followers 1
    • Topics 2
    • Posts 23
    • Groups 0

    Posts

    Recent Best Controversial
    • Powershell - AD permissions all users

      Team Good Afternoon from London :),

      I have been tasked with an AD issue, which needs a powershell written.

      the script needs to output all users from out AD and there membership access. BUT the catch is that the csv will need to match against the line above, so for example, a user who has access to HR Folders, and the user below has access to it, they need to fall in the same row for easy filtering. if the group does not match a blank space can be added.

      Not sure if the above makes sense sorry.

      again thanks in advanced.

      posted in Developer Discussion powershell csv
      P
      pally
    • Powershell - Network share permissions user level

      hi Team,

      I have been tasked with a few things. I have a few scripts but need to merge them, but I have been advised of a better solution, which would be to get a comprehensive report of users and there permissions.

      so...

      • Firstly I need a Powershell script to get a Parent folder and its children's permission, who has access, I do not need to see inherited only explicit. this would need to out putted into a CSV for easy reading for our auditors.

      • we do not want to see groups, only users access, if the folder has groups, these will need to be expanded.

      hopefully I have explained correctly. thanks again in advance 🙂

      posted in Developer Discussion powershell csv
      P
      pally
    • RE: Powershell - Export CSV of Group Memberships for your AD

      great script, can this be manipulated to export folder permissions on a directory level but only expand on users and not groups in AD?

      I need a script which will only give who has what permission on a folder i.e. S:\DEPT\FOLDER1 ... FOLDER2...FOLDER3. I need the permissions each person has on each folder.

      these are the scripts I have, I need them to merge together, if you could help me I would be very grateful.

      This expands all groups like your script.bolded text

      Import-Module ActiveDirectory

      $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select name -expandproperty name)

      $Table = @()

      $Record = [ordered]@{
      "Group Name" = ""
      "Name" = ""
      "Username" = ""
      }

      Foreach ($Group in $Groups)
      {

      $Arrayofmembers = Get-ADGroupMember -identity $Group | select name,samaccountname

      foreach ($Member in $Arrayofmembers)
      {
      $Record."Group Name" = $Group
      $Record."Name" = $Member.name
      $Record."UserName" = $Member.samaccountname
      $objRecord = New-Object PSObject -property $Record
      $Table += $objrecord

      }

      }

      $Table | export-csv "C:\temp\SecurityGroups.csv" -NoTypeInformation

      bolded text AND this show folder level permissions but not excluding groups, which is what I need. no groups only users

      $exclude = @(
      'CREATOR OWNER'
      'NT AUTHORITY\SYSTEM'
      'BUILTIN\Administrators'
      'HTBPLC\Domain Admins'

      )

      $RootPath = "S:\Groups\DEPARTMENTS"

      $folders = [array](Get-Item -Path $RootPath)
      $folders += Get-ChildItem -Path $RootPath -Recurse -Directory

      $acls = foreach ($Folder in $Folders){
      get-acl $Folder.fullname |
      Select-Object -ExpandProperty Access |
      Where-Object {
      -not $.IsInherited -and
      $exclude -notcontains $
      .IdentityReference
      } |
      Select-Object -Property *,@{
      'Name' = 'Folder'
      'Expression' = {
      $Folder.FullName
      }}
      }

      $acls | Export-Csv -NoTypeInformation -Path C:\NTFS\DEPARTMENTS1.csv

      posted in Developer Discussion
      P
      pally
    • 1
    • 2
    • 2 / 2