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

    Topics

    • P

      Powershell - AD permissions all users

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion powershell csv
      37
      2 Votes
      37 Posts
      10k Views
      P

      thanks @dafyre looks good, but I have been doing a bit of reading online and I think I will change the output to make it output the data as rows with each user named with what member they are part of next to there name. two columns. in other words the output would be "Transpose" and then I would use a pivot table to do the rest.

      still working on it, but if anyone knows of an easy way please do share 🙂

      again thank @dafyre

    • P

      Powershell - Network share permissions user level

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion powershell csv
      7
      2 Votes
      7 Posts
      3k Views
      P

      Team,

      I have made some head way, but what I need to know is how do I call the function "MyADGroups" in my script. not sure if the below script is correct, but what it needs to do is check who has access to the parent folder and all the children folders only, if its inherited I do not want to know, which the script does :). but if it is a Group it needs to expand the group and show me the users only.

      I have done a function but I am not sure if it is correct and it will output the data I need.

      $exclude = @( 'CREATOR OWNER' 'NT AUTHORITY\SYSTEM' 'BUILTIN\Administrators' 'HTBPLC\Domain Admins' ) Function Get-MYADGroups($GroupsAD){ Return Get-ADGroupMember -Identity $GroupsAD -Recursive | Where {objectClass -eq "User"} } # Get-ADGroupMember -Identity -Recursive | Get-ADUser -Property DisplayName | Select Name,ObjectClass,DisplayName? $credentials = Get-Credential Get-ADUser -Credential $credentials -Filter * -Properties DisplayName,EmailAddress,memberof,DistinguishedName,Enabled | % { $RootPath = "\\XYZ.net\users\GP\DEPT\IT\" $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

      @DustinB3403 @dafyre can you maybe help me out on this one, should be a quick fix, just need to know if I am on the right tracks.

      Thanks

    • 1 / 1