troubleshooting Question

powershell add send as full access permissions

Avatar of techdrive
techdriveFlag for United States of America asked on
PowershellExchange
3 Comments1 Solution875 ViewsLast Modified:
Guys thanks for your help so far. I got this code to check for existing permissions. If the permissions are not there looking for a snippet of code in powershell to add them

GC C:\Users.txt | %{
      New-object PSObject -Property @{
      User = $_
      SendAS =  [Bool](Get-MailboxPermission $_ | ?{$_.AccessRights -like "*FullAccess*" -and $_.User -like "NT AUTHORITY\SELF"})
      FullAccess = [Bool](Get-ADPermission $_ | ?{$_.ExtendedRights -like "*Send-As*" -and $_.User -like "NT AUTHORITY\SELF"})
      }
} | Export-Csv C:\report.csv -nti
ASKER CERTIFIED SOLUTION
Subash Sundharan
IT Infrastructure Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros