Shared mailbox - check if user have permission from csv file

Hi all,
i know this is a long shot,but i still belive in Santa.Here is our situation.
We grant our users access to Shared mailboxes by joining them to a security group (mail enabled) that starts with RG-XXX.
Then i ran following command to list all users that are not member of a group starting with RG:
$groups = Get-ADGroup -Filter {(name -like "*RG-Full*") -or (name -like "*RG-SEND*") -or (name -like "*RG-OS*")} | Select -ExpandProperty DistinguishedName
foreach ($group in $groups){ $ADUsers = $ADUsers | Where-Object { $_.MemberOf -notcontains $group } }
$FilteredUsers = $ADUsers
$FilteredUsers | Export-Csv C:\temp\file.csv
This worked great and i got a list of people that is not member of these groups.Problem is that some users are granted permission directly to the shared mailbox.This means that some people on the list still have access to a shared mailbox.
Question is,can i use this list (.csv file containing alias) and run another check to see if they have been granted access to any shared mailbox?
Thanks!
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

You need to pipe the last one:
$arrMsolUserData | Export-CSV C:\scripts\output.csv -nti
Also, you might need to adjust the value of $user depending on the format you used in the CSV. If the column in the CSV is named "alias", you might have to use $user.alias instead of just $user in the
Get-MailboxPermission cmdlet.
Here's an updated example:
$usertocheck = Import-CSV C:\scripts\file.csv
#Get all the shared mailboxes
$shared = Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited
#create the aggregate and cycle all the objects
$arrMsolUserData = @()
foreach ($user in $UserToCheck) {
foreach ($MB in $shared) {
$MBrights = Get-MailboxPermission -Identity $MB.PrimarySmtpAddress -User $user.alias
if (!$MBrights) { continue }
$objUser = New-Object PSObject
$i++;Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Number" -Value $i
Add-Member -InputObject $objUser -MemberType NoteProperty -Name "User" -Value $user.Alias
Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Mailbox" -Value $MB.PrimarySmtpAddress
Add-Member -InputObject $objUser -MemberType NoteProperty -Name "Access Rights" -Value $MBrights.AccessRights
$arrMsolUserData += $objUser }
$arrMsolUserData | Export-CSV C:\scripts\output.csv -nti

Similar Messages

  • Importing users into WGM from csv file issues/crash

    Hi,
    i've been importing user information from csv files into WGM via the +server >  import+ function .
    It worked the first few times but now when i try the import progress bar pops up and promptly disappears without any thing importing.
    i've tried restarts, new admin account, reinstalled  WGM.
    I've also trashed some pref but i don't really know which ones i should be losing.
    The servers an OD master.
    any help would be appreciated.
    as a last resort what do i need to backup/save if i were to format/reinstall osx server? keeping my settings etc.....
    thanks
    paul

    What I did was:
    Exported the user list, to create an XML file in the correct format.
    Using this format, I created a spreadsheet in Excel (sorry Apple), and in the final column I created a field that concatenated the information I wanted in the ':' deliminated format of the previously export XML.
    Then just copy and past via pico into a pure text file and imported that.
    You have to be careful with comments in Passenger, using special characters (';!@#$%^ and others can cause the WGM to fail and crash.

  • "Check that you have permission to write to the library directory." I had this error pop up when trying to access a iPhoto Library from Finder.

    The error, "Check that you have permission to write to the library directory." Displayed after trying to access a iPhoto Library from finder. The file is located on the local hard drive and was accessed not 5 minutes before the error displayed. Upon searching the forums I found a similar problem and the instructions said to check a permission box in the "Get Info" tab. There was no box visible and after clicking the arrow to open the "Open With" tab, the rainbow wheel started to spin and I could no longer access Finder or the desktop. I was deleting files trying to make space on my hard drive and noticed as I was deleting files more data was being added to the iPhoto Library. My question is how can I fix this and how can I prevent this in the future, thank you very much for any help, I would really like to keep these pictures.

    I found a similar problem and the instructions said to check a permission box in the "Get Info" tab.
    This applies only when the Library is on an external drive. You cannot ignore permissions on the system drive.
    I was deleting files trying to make space on my hard drive
    What were you deleting?
    and noticed as I was deleting files more data was being added to the iPhoto Library.
    Hard to see how deleting files can add data to the iPhoto Library. Can you explain why you thought this?
    I would really like to keep these pictures.
    Make a back up now.
    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Office365- I created shared mailboxes for a user- they show on web but not on Outlook2013

    I created shared mailboxes for a user- they show on web but not on Outlook2013-
    If the user logs on to office365 web - I can see the 3 shared folders- but if when she opens Outlook she is not able to see them-
    Do they - should they be manually added ? How ?
    Thanks !!

    Hi,
    Thanks for your question.
    Not sure what exactly you mean by "created shared mailboxes for a user", by default, Outlook automatically loads all mailboxes to which the user has "Full Access" permission. So please first check if you have granted the right permissions
    for that mailbox to the user.
    When I say "By default", I mean you didn't disable the Outlook Auto-Mapping service. If you did, then the shared mailbox will not be automatically added to the user's Outlook profile. So please have a check on this:
    https://support.microsoft.com/kb/2646504
    Also, please note if the shared mailbox was just created, or the user was just added as a member of that shared mailbox, you probably will need to wait for a few hours for the shared mailbox to appear in the user's Outlook folder.
    Regards,
    Ethan Hua
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Adding a shared mailbox to a user's Outlook profile, who has reviewer rights only, via PowerShell

    Hello Everyone,
    I'm working on trying to create something like a knowledge base for my company, and what I'm trying to accomplish is to create a shared mailbox on 365, add users to have read-only rights to the Inbox (which I can achieve via PowerShell) so they can't delete
    the articles, but it seems that by just adding Reviewer permission to a user, it doesn't force the mailbox to open on the end-user's Outlook profile - it only seems to automatically populate if I go through the exchange admin console and allow Full Access
    through User Delegation. 
    Is there a way, via PowerShell, to open a shared mailbox in a user's Outlook profile?
    Thanks for all the help!

    Hi,
    We can create a PRF file that modifies the existing Outlook profile to add the shared mailbox.
    Please have a look at this thread which discussed a similar issue:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/374e5a31-1732-45b8-afdd-7c0987e04a7e/how-to-add-additional-mailboxes-in-outlook-for-exchange
    For more information about Customize Outlook profiles by using an Outlook Profile (PRF) file, see:
    http://technet.microsoft.com/en-us/library/cc179062(v=office.14).aspx
    Hope this helps.
    Regards,
    Steve Fan
    TechNet Community Support

  • Getting a list of users and permission from a folder

    I run this command to get a a list of users and permission from a folder
    $project_folder = "\\servername\foldername"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType, FileSystemRights > folder.csv.
    This only lists information for 1 folder.
    If i have multiple folders how should the code be modified?

    this is the code i am looking for 
     $project_folder
    = "\\servername\foldername\foldername1"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
    FileSystemRights > folder.csv.
    I  run this code and this gives me the information for only the folder 'foldername1'.
    Ex. i need a list of users who have permmission in \\servername\foldername\foldername2.
    i run the code and it gives me the permissions and list of users in foldername2.
    This is the issue
    IF there are multiple folders \\servername\foldername\foldername2, \\servername\foldername\foldername1,
    i need to run the code each time for 1 folder. 
    is there a command where i can combine the path of these 2 or more folders and export
    it to csv
    Ex.  $project_folder
    = "\\servername\foldername\foldername1",
    "\\servername\foldername\foldername2"
    get-acl $project_folder | %{ $_.Access  } | ft -property IdentityReference, AccessControlType,
    FileSystemRights > folder.csv.
    This will give me the list of users and the type of access they have in foldername1 and
    foldername2

  • CineXplayer on my iPad (2) error message stating I don't have permission to copy files from my hp pavilion 6 across to my iPad. I think I may have accidentally disabled iTunes Helper, but it is running in TM.

    I use CineXplayer on my iPad (2) and today have started getting an error message stating I don't have permission to copy files from my hp pavilion 6 across to my iPad. I think I may have accidentally disabled iTunes Helper, but it is running in Task Manager.
    I have removed iTunes and re installed.

    That's a comment in the file. It has no effect at all.

  • Error/warning message "you don't have permission to modify files in this network location"

    Hi,
    We have a windows server 2008 running, and we access it via remote desktop. And there's this certain folder that all users access, and where we save important files. So, since this is where important files are stored, we wanted to disable deletion (and if
    possible moving) of the folder and everything under it. However, it's harder than i thought. Right now, we have the permissions "Delete" and "Delete files and subfolders" disabled already, BUT when we try to save a file to this folder,
    we got this warning/error message:
    "You don't have permission to modify files in this network location"
    The file is saved however, but there's no content. But when we try to cut/copy an existing file to this folder, it works.
    Does anyone know how a workaround on this issue. I've already spent days configuring the settings, and when one works, another issue comes up. This is really frustrating.
    Thank you.

    Hi,
    What are NTFS Permissions and Share Permissions of the shared folder? If you remove delete permissions, when someone tried to create a new folder, they couldn't rename it. Without Delete permission, we can open, modify a file and save with the same file name
    but cannot create a new file with a new name.
    For more detailed information, please refer to the thread below:
    NTFS Permissions Question - Allow creation but not deletion
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/3335a9b3-d49a-42f0-970a-3fe44b551274/ntfs-permissions-question-allow-creation-but-not-deletion
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Error - iTunes Library .iti file is locked on a disk or you do not have permission for this file. I can open itunes in the compatibility mode for Windows XP Service Pack 3 ???

    In Windows 8 I received the error iTunes Library .iti file is locked on a disk or you do not have permission for this file. I can open itunes in the compatibility mode for Windows XP Service Pack 3.
    I've tried changing permissions and sharing - nothing seems to work. mat be a Windows 8 issue???

    You also need to make sure you have both read and write permission for the file, or for the whole iTunes folder for that matter.  That's also done in Get Info for the file or folder concerned.
    Read the part about changing permissions on the iTunes folder in: https://discussions.apple.com/message/11583914

  • Either the file does not exist, you do not have permission, or the file may be in use

    Had this file open this morning all the sudden Im getting this error.
    Either the file does not exist, you do not have permission, or the file may be in use
    Useing win 7 64bit.
    I think its version 6
    Thanks

    Was it properly closed? There may still be a lock file (.idlk) in the folder where it is saved.

  • I have "migrated" my Time Capsule files to my new iMac and most of the files to me "I don't have permission to view files" I am they admin....will I thought I was. What gives?

    I have "migrated" my Time Capsule files to my new iMac and most of the files to me "I don't have permission to view files" I am they admin....will I thought I was. What gives?

    You should be able to change the permissions on the files.. this is yet another bungle by Mavericks I suspect.
    http://support.apple.com/kb/PH13799
    Sometimes it is because you Migrated wrongly.
    http://pondini.org/TM/E10.html
    It is not up to Mavericks because sadly the guy who wrote all this great info died recently.

  • Script to to update users attribute based on EmployeeID Value from CSV file

    Hello, 
    i am trying to build script that read the data from CSV file, the only data exist on this file is the EmployeeID.
    so i need to read the EmployeeID and for each employeeID exist in this sheet in need to disable that user and  change the Description to "Disabled based on the HR Request"
    below script is not working for me any help plz 
    $path = "D:\Private\sample-data.csv"
    $LIST=IMPORT-CSV $path
    $UseremployeeID = $USER.employeeID
    FOREACH ($Person in $LIST) {
    $UserID = Get-ADUser -Filter {employeeID -eq ($LIST.Row[1])}
    foreach ($USER in $UserID){
    Set-ADUser -Identity $User -Description "Disabled based on the HR Request" -Enabled $false

    I managed to know the reason
    you should add -properties EmployeeID  to your code
    <snip>
    Hi,
    That's not necessary. The filtering is done serverside, so you don't need to request that it be returned.
    Example:
    Get-ADUser -Filter "Title -eq 'Some Title In Your Company'"
    Title isn't a default property, but the command above works just fine.
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • TS1424 I have just opened iTunes and only the music that I have purchased from the iTunes store is being shown: I can't find any of the music that I have imported from a file. Help?

    I have just opened iTunes and only the music that I have purchased from the iTunes store is being shown: I can't find any of the music that I have imported from a file. Help?

    See this post.
    tt2

  • Since upgrading to Lion, i am unable to take screen shots.  i get the message that i don't have permission to save files to the place where SSs are saved.  how can i regain the ability to save screen shots?  thanks

    since upgrading to Lion, i am unable to take screen shots.  i get the message that i don't have permission to save files to the place where SSs are saved.  how can i regain the ability to save screen shots?  thanks

    First of all, are you using the OS native screen capture?
    If not, make sure the application you're using has been update for Lion.  I was using Snapz Pro for years, but I need to update it for use with Lion. Meanwhile Grab and the keyboard shortcuts are working on my Lion load.
    If you are using the native capture mode unsuccessfully, I would run the Disk Utility and repair permissions on the drive. For some reason, even in past OS Versions, routine maintenance of permissions makes life a lot easier.

  • Unable to synchronise Contacts to BB from CSV file

    I'm trying to upload my contacts from csv file without success. I constantly receive an error message. I'm using
    BB CUrve 8900 and I have a version 6 of Desktop Manager.
    My operating system is Win 7 64bit. I've enabled logging and in the
    Pttrace.log I constatnly see
    "00:14:59.872: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:00.523: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:02.016: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:31.014: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:43.051: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:43.680: Fetching implemented classes at .\iluptbl.cpp line 3408
    00:15:44.506:
    00:15:44.507: Begin ILX Session, Source=Importer/Eksporter ASCII, Target=Urządzenie
    00:15:44.531:
    00:15:44.532: Starting One-Way Sync (from scratch)
    00:15:44.803: Phase=10, User=22E867D2: Reading data from Urządzenie Książka adresowa
    00:15:45.111: Finished Reading 17 Records + 0 Deletes + 0 Unchangeds for User=22E867D2 from Urządzenie Książka adresowa (slow sync input for resync)
    00:15:45.112: Phase=20, User=22E867D2: Reading data from Importer/Eksporter ASCII Książka adresowa
    Tue Apr 26 00:15:45 2011: Error Blad interfejsu API..4238 at .\AsciiConnectorIConnector.cpp line 375
    Tue Apr 26 00:15:45 2011: Error 4107.4107 at .\sdk_data.cpp line 875
    Tue Apr 26 00:15:45 2011: Error 0.4107 at .\ciltrans.cpp line 241
    Tue Apr 26 00:15:45 2011: Error 4107.4107 at .\Ilx_sdk.cpp line 220
    00:15:45.134: Translation Unit Status: User=22E867D2, rc=87, Phase=20, TrErr=4107, SysErr=0 at .\xlatev3.cpp line 650
    00:15:45.136:
    00:15:45.137: End ILX Session, elapsed time =   0.000 seconds
    In Tif.log i see that program is successfully exporting data from device to tif file but when it attempts to open
    csv file it fails
    "--------  ilsdk finished processing  a_record_for_export_to_TIF, rc=0, nRc=0, action=19
     --------  ilsdk starting assembly of a_record_for_export_to_TIF
     --------  END OF FILE
     --------  ilsdk finished processing  a_record_for_export_to_TIF, rc=0, nRc=4006, action=3
     --------  Ending Load From Target phase; starting next phase
    Finished Reading 17 Records + 0 Deletes + 0 Unchangeds for User=22E867D2 from Urządzenie Książka adresowa (slow sync input for resync)
    ILTIFReopenFile/NO-OP
     --------  Ending next phase; starting Load From Source phase
    Could you help me as entering over 600 contacts would be painfull
    brgds
    WIesiek

    This is exactly what I am dealing with. Blackberry Link will work great for awhile and then something happens and I can not sync my contacts. I have spent many hours and days trying to fix this to no avail. BB support has been great but I still go through a long process each time. This week I finally gave up and started using the Microsoft Hotmail Outlook Connector since my company does not offer Active Sync or Exchange. It works flawlessly. I would dedfinitely check it out. If you swith to a Widows Phone or Android this is one of the options they recommend you use.
    In a nutshell Link is awful and BB should be ashamed of the product they put on the market. I will only use it for syncing pictures and documents. Good luck!

Maybe you are looking for

  • JBL Radial Speaker with an S-Video Output

    Hey. I'm trying to watch videos that are on my iPod classic. I have a black JBL radial iPod speaker that has an S-Video output. I have plugged in an S-Video cable to both my TV (on the specific S-Video channel) and speaker and have the iPod docked. W

  • Can't Sync my iPhone4 Windows XP

    Can't Sync - iPhone4 - Windows XP - iTunes version 10.4.1.10 1st AppleMobileDevice seems to run and run and uses up all my CPU capability. When I connect and get iTunes to recognize my iPhone4, it starts the Sync process.. "Backing Up"  (step 1 of 4)

  • "open in new window" just comes up as a blank page

    'OPEN IN NEW WINDOW' & "SEND LINK" JUST BRING UP A BLANK PAGE

  • Wrong hues when using Auto Smart Fix

    Photoshop Album Starter Edition 3.0 results in wrong hues (ie reds turning orange, blues turning purple, etc) when I use Auto Smart Fix & when I start slideshow. How do I correct this?

  • System Preferences crashes

    System Preferences crashes everytime I click on "Security", "Keyboard & Mouse", and "Sound". I got a Mighty Mouse for Christmas, and I need to change the settings of it. Everytime I click on "Keyboard & Mouse" it crashes. Can anybody help me? Thanks!