Powershell to find users with SendAs permission on Public folders

I have been having great difficulty getting this to work and I am baffled as to what it is I am missing!
We have a lot of public folders and some users have SendAs permissions - we want to find them.
I have found various suggestions on line like these two lines -
Get-PublicFolder -Recurse -ResultSize 10 | Get-PublicFolderClientPermission | Select Identity, User, AccessRights
this works and lists the folders and all user permissions but my attempts to filter it fail
Get-PublicFolder -Recurse -ResultSize 10 | Get-PublicFolderClientPermission | Select Identity, User, AccessRights | Export-CSV "PublicFolderPermissions.csv" -NoTypeInformation
this I is claimed to work (and I would expect it to) but instead fills my CSV with folder and user information but the AccessRights value (clearly displayed in the first example) is replaced by this
"Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Management.MapiTasks.PublicFolderAccessRight]"
So I tried this
get-publicFolder -recurse -ResultSize 10 | Get-PublicFolderClientPermission | foreach-object  {write-host $_.Identity, $_.User, $_.AccessRights}
which works but any attempt to redirect to a file, export to csv or add-content to a file either outputs nothing or outputs everything but gives the accessrights as "Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Management.MapiTasks.PublicFolderAccessRight]"
does anyone have any idea how I get the information I want into a CSV (where I can then filter it) or filter the results by SendAs and save to CSV?
Obviously the -ResultSize 10 if for testing and will be replaced with Unlimited.
I assume  my filters on SendAs always failed because rather than passing along $_.AccessRights as the string I see on screen I get the string I see in the CSV so nothing matches SendAs.
I am clearly missing something obvious so any help would be appreciated.

That has got me close to it I think but identity returns something like "******.net/Microsoft Exchange System Objects/Info" where "Info" is a public folder under a folder called "Postroom"
This does at least restricts the results to users having SendAs permission so that is a lot of progress
Get-publicfolder does translate the returned identity to a path so that should help
Unfortunately piping to export-csv does not return the desired results
redirect to file does save the information though so that should be helpful
Many thanks
Yes, took all night but I now have enough information to work on

Similar Messages

  • How to find if a user with fullaccess permission used a mailbox ?

    Hi,
    We used Exchange 2010 in my organisation
    We defined a lot of generic mailboxes and some of them have a lot of users with fullaccess permission
    We think that some of them don't really used this mailbox
    Is it possible to find, with powershell, information of usage of a mailbox by users which have this fullaccess permission ?
    Thanks

    Hi,
    Get-MailboxPermission <Identity>
    or
    Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRight
    s -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)} | ft Id*

  • Powershell Script to Remove and Add the user with same permission

    Hi,
    I need to remove all users within all site collection of a web application and add them back with same permission level. We have a siteminder based custom trusted identity token issuer configured in our farm. The name of the issuer will be changed
    due to some architectural decissions , hence all users which are there before will be unidentified, hence need to be removed and added again.
    Currently each user looks like :                       c:0ǹ.t|Identity Token Issuer1|user1
    Post the change the user will look like:          c:0ǹ.t|Identity Token Issuer New|user1
    I am looking for a powershell script which can handle this operation.
    Thanks, Bivsworld

    Bivsworld,
    Below link should give you a start.
    http://www.sptechlearn.com/2014/10/delete-users-from-user-information-list.html

  • AD accounts find users with all capital letters

    Hello ,
    I am a noob , am searching online but can't find exactly what i need.
    So am posting here in hope some one will help me. :)
    I what to make a short powershell script that finds all users with capital letters from the second letter on.
    Example
    first name = Bob last name =Red    corect
    first name = BOB last name =RED  wrong
    i want to extract all the wrong names with capital letters in text file
    So my question is that possible and how can i do it in server 2008 r2.
    Thanks in Advance for any answers

    This is obviously not an Exchange question, but a PowerShell question.  You should probably post it in the scripting forums for completeness.
    That being said, you can try using -cmatch against a regex.  I used  -cmatch '[A-Za-z]+[A-Z]+' to test a name with later capital letters, and it appeared to work.
    [PS] C:\Scripts> "Willard" -cmatch '[A-Za-z]+[A-Z]+'
    False
    [PS] C:\Scripts> "WILLARD" -cmatch '[A-Za-z]+[A-Z]+'
    True
    [PS] C:\Scripts> "WillARD" -cmatch '[A-Za-z]+[A-Z]+'
    True
    [PS] C:\Scripts> "WillarD" -cmatch '[A-Za-z]+[A-Z]+'
    True
    [PS] C:\Scripts> "WiLlArD" -cmatch '[A-Za-z]+[A-Z]+'
    True
    So for your test, and using the Exchange commands (you can change them to the Windows 2008 AD commands), you'd run:
    Get-User | ? { $_.DisplayName -cmatch '[A-Za-z]+[A-Z]+' }

  • How to List view web part to display document library for only users with access permission

    Hi
    I am trying to accomplish this requirement but I don't know if that is possible or how to get there.  Any suggestion or advice are helpful.
    On a site collection, I have several document libraries,  with each library have unique permission to a few user or SharePoint group.
    I want to create a web part page and make that the site home page.  On this web part page, I want to create a Content Search Web Part to list the content of the document library that the logged on users have permission to see. 
    Is this possible with CSWP or is there anything easier or if it is not possible at all,  please advise.
    Thanks
    Swanl

    Hi ,
    Based on your description, my understanding is that you want to create a Content Search Web Part to list the documents that the logged on users have access permission.
    It is feasible with CSWP, you can follow the below step:
    Edit Content Search Web Part->Change query-> Select a query: Items matching a content type (System); Restrict by app: Current site collection; Restrict by content type: Document.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]

  • 'Could not find user' with EAP-TLS in ACS

    Hi all,
    we are running ACS 4.2(1) Build 15 on a Win2003 member server and use the ACS for EAP-TLS with certificates (Microsoft-PKI) for WLAN authentication (WLC 4402, 6.0 and 4.2). We are using both machine and user authentication.
    Sometimes machine authentications fail with following message in AUTH.log:
    AUTH 11/01/2010 09:11:28 E 1395 1904 0x31cb External DB [NTAuthenDLL.dll]: Could not find user host/<xxxxxxxx>.com (0x5012)
    But some minutes/hours later the same machine can authenticate successful. Other machines never have this problem, no problems at all with user authentications.
    Does anyone have an idea where I can proceed with troubleshooting? I haven't found any related messages in server event logs. Are there any other logs where I can find reasons for these problems that are occuring only sometimes?
    Thanks
    Kai

    AUTH.log and RDS.log are two log file you need to look into on ACS side. Make sure the log level is set to "Full"
    You might need to check the log on AD side to see why it could not find this host.
    Comparing the logs between the working and non-working cases might be helpful.

  • Javascript: Query all users with read permission to specific list

    Is it possible to use javascript to retrieve all users with read permissions to specific list? This (http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-get-all-the-users-from-site-group-in-sharepoint-2013/) shows how to get users from group but what
    about list. All users in list may not exist in spgoups.

    Hi,
    If with Server Object Model which is executed in server side, in the
    SPList object, there is a
    RoleAssignments property can help to get what you want without looping through all the users in site:
    public static void getPermissionsOfList()
    using (SPSite site = new SPSite("http://sp"))
    using (SPWeb web = site.RootWeb)
    SPList list = web.GetList("/Lists/List1");
    SPRoleAssignmentCollection roles = list.RoleAssignments;
    foreach (SPRoleAssignment role in roles)
    Console.WriteLine("~");
    Console.WriteLine("Name: " + role.Member.Name);
    SPRoleDefinitionBindingCollection bindings = role.RoleDefinitionBindings;
    XmlDocument doc = new XmlDocument();
    doc.LoadXml(bindings.Xml);
    //Console.WriteLine(doc.InnerXml);
    XmlNodeList itemList = doc.DocumentElement.SelectNodes("Role");
    foreach (XmlNode currNode in itemList)
    string s = currNode.Attributes["Name"].Value.ToString();
    Console.WriteLine("Permission Level: " + s);
    However, when comes to JavaScript Client Object Model, as there is no such property provided, I suggest you take the solution provided in my previous post for a try.
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Database owner and database user with db_owner permission

    we deployed a java hibernate application which creates the database tables on deployment. A login is created and mapped for the database as the user. For that login the db_owner role is given. On the deployment we received an error mentioning execute permission
    issue.
    the same process is done and this time the login is created but not mapped as the user. the login is assigned as the database owner from the database property. this time the deployment worked fine.
    what is the difference between setting the login as database owner and setting as a user with db_owner role.

    The error i received was "the execute permission was denied on the object 'sp_tables'........".
    I solved this issue by giving db_owner permission to master database for the relevant user.
    In my local computer i didn't give permission to master database. I have only assign the user as the owner of the database and deployment was success.
    But this error comes in another place where I implement the system.
    if your application is not only a desktop application without anything critical on it, then I strongly advise to stay away from making anybody db_owner in the
    master-database. That's THE system database. It's easy to take over that system for such an account then.
    I am a bit surprised you are getting this error in that context. Originally the public role should have execute permission on it. So it seems someone has changed the defaults permissions (for hardening purposes?) Then reverting to original state is much
    less harmful than the db_owner role.
    Andreas Wolter (Blog |
    Twitter)
    MCSM: Microsoft Certified Solutions Master Data Platform, MCM, MVP
    www.SarpedonQualityLab.com |
    www.SQL-Server-Master-Class.com

  • Find users with Role A and Role B but not Role C

    Hi all.
    How can I find users that have a combination of roles? The find user and user reports only have one line for selecting a role the user has. Is there a report that lets you select multiple roles? It would be really handy!
    Thanks,
    Jim

    If you haven't found it, there are likely no such reports, but it is easy to do that in a custom report. The problem is that its really badly documented how to make a custom report. But, it's really not that difficult if you know what to do. I will, when I get some spare time, post a guide here on how to make a custom report, the way I, and some other people, think it should be done.
    Roughly a custom report consists of three parts, a listing object, to make the report turn up in the report list, a report form, and the report WF. The trick is to know the correct subtypes, attributes and such.
    But take a look here Sunday, and there will possibly be a nice custom report guide posted.

  • Exchange 2013 with Outlook 2010 anywhere - Public Folders disappear from Outlook favourites

    Hi,
    we have a 3 server Exchange 2013 SP1 DAG published with Forefront TMG. 
    Outlook 2010 anywhere connection works fine (only anywhere connection is possible, there are no clients in the exchange server AD).
    The users are adding public folders to their local Outlook favorites. In about 10% of the Outlook starts, those public folders are missing in the favorites. Local favorites folders are still there, public folders are connected.
    After restarting the Outlook a few times, the favorites are back. 
    Deleting the outlook.xml brought no success, the favorites seem to be saved somewhere on the exchange server.
    Outlook 2010 is up to date, all hotfixes are installed.
    There are no related entries in servers or clients eventlogs, the logs of the TMG server are normal.
    Does anyone have a simular behavior?
    Thanks in advance!

    Hi,
    According to your description,it is clear that something got corrupted, but it is hard to say directly what caused it. However, there are a few troubleshooting steps to determine what caused it and you can also make a backup of your Favorite Folders list
    so you can easily restore it when it still happens.
    Pleaser refer to the following article:
    Favorite Folders empty upon restart
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot
    make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    Hope this helps!
    Thanks.
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Niko Cheng
    TechNet Community Support

  • Directory service : find user with admin rights

    Hi,
    I'm just taking over an existing LPAD server and i need to know which user on the directory has admins rights.
    I'm playing around with ldapsearch, but i'm not able to get the right search string.
    Os is Solaris 10 5/09 s10s_u7wos_08 SPARC.
    Any thoughts ?
    Thanks,

    Hi,
    Can the user execute the program through explorer? In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe). 
    You could refer to the article below to resolve the issue:
    "Access is denied" error message when you run a batch job on a Windows Server 2003-based computer
    http://support.microsoft.com/kb/867466
    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.

  • Find users with common dates in the respective date range

    I am trying to find a simple logic to get users who have common dates in the date range while they were active.
    Example:
    User A -   Effective start - 1/1/2015  and  Effective End = 1/9/2015
    User B -  Effective start - 1/5/2015  and  Effective End = 1/30/2015
    User C - Effective start - 3/1/2015  and  Effective End = 4/9/2015
    So for the above scenario my SQL code should capture UserA and UserB , as they have common active dates between them.

    DECLARE @YourTable TABLE
    UserName varchar(128),
    EffectiveStart date,
    EffectiveEnd date
    INSERT INTO @YourTable VALUES
    ('User A', '1/1/2015', '1/9/2015'), ('User B', '1/5/2015', '1/30/2015'), ('User C', '3/1/2015', '4/9/2015')
    SELECT *
    FROM @YourTable AS t1, @YourTable AS t2
    WHERE t1.UserName <> t2.UserName
    AND (
    t1.EffectiveStart BETWEEN t2.EffectiveStart AND t2.EffectiveEnd
    OR t1.EffectiveEnd BETWEEN t2.EffectiveStart AND t2.EffectiveEnd
    OR t2.EffectiveStart BETWEEN t1.EffectiveStart AND t1.EffectiveEnd
    OR t2.EffectiveEnd BETWEEN t1.EffectiveStart AND t1.EffectiveEnd
    A Fan of SSIS, SSRS and SSAS

  • NavigationTerm.GetWebRelativeFriendlyUrl() is slow for Site Collection Administrators or users with Edit Permission

    I have a publishing site on SharePoint 2013. Part of the site requires a custom navigation to replace the quick launch. I've written a UserControl that accesses the NavigationTermSet and uses the term titles and URLs to build a navigation.
    Loading the NavigationTermSet:
    using (SPSite site = new SPSite(SPContext.Current.Site.ID, SPUserToken.SystemAccount))
    using (SPWeb web = site.OpenWeb(SPContext.Current.Web.ID))
    TaxonomySession taxonomySession = new TaxonomySession(site);
    StandardNavigationSettings navigationSettings = new WebNavigationSettings(web).CurrentNavigation;
    TermStore termStore = taxonomySession.TermStores[navigationSettings.TermStoreId];
    TermSet termSet = termStore.GetTermSet(navigationSettings.TermSetId);
    _navTermSet = NavigationTermSet.GetAsResolvedByWeb(termSet, web, StandardNavigationProviderNames.CurrentNavigationTaxonomyProvider);
    I grab the term's friendly URL with the following:
    navTerm.GetWebRelativeFriendlyUrl();
    Pages containing this control load in less than a second for read-only users. Site Collection Administrators or Content Editors take about 8 seconds to load the same page. I've determined that the method in the code block above is the culprit for the long
    load times for admins and content editors. What is the deal with that? Can I do something differently to speed things up for admins?
    Any help is appreciated.

    For anyone who ran into the same issue as me, the fix was to change how the term set was loaded:
    _navTermSet = TaxonomyNavigation.GetTermSetForWeb(SPContext.Current.Web, StandardNavigationProviderNames.CurrentNavigationTaxonomyProvider, false);
    This loads the term set from the navigation cache. The other method I was using would load without making use of the cache, which is why it was slow. I'm guessing the cache was still being used for non-admin users as the loading was not slow for them.

  • Java: Find users with specific UME actions

    Hi everybody
    On the Java UME it is easy to find out which roles, groups and actions a specific user has. The same applies for groups or roles - the connected entites can easily be found.
    But how can I found out which users have a certain action? If I browse for the action I have not possibility to find the direct or indirect assignment to the users.
    Could somebody assist? Thanks in advance!
    Beat

    Same problem I faced yesterday for my SSO project on the portal:
    My method to resolve  was :
    1. Take the user/users in scope  Export  them from UME
    2. Export roles into a readable format and check out the actions by comparing the user - role - actions relationship in a TEXT file/readable file
    3. pick the roles you want to edit , edit in notepad  import the roles( here I copied and created a Zrole  before importing )
    for example ( NWDI.ARCHITECT ) to ( ZNWDI.ARCHITECT)
    I could not find easier method than the above

  • SQL Query - To Find Users with end dated responsibilities

    Oracle Apps ver: 11.5.10.2
    Oracle DB - 9i
    How can i list users and the access assigned to them for a specific division irrespective of the responsibility being end dated at responsibility level

    Hi Sakshi,
    Try out this query if it can help you !
    SELECT a.user_name, a.description, c.responsibility_name, c.creation_date as ASSIGNED_DATE>FROM apps.fnd_user a,
    >apps.fnd_user_resp_groups b,
    >apps.fnd_responsibility_vl c
    >WHERE a.user_id = b.user_id
    >AND b.responsibility_id = c.responsibility_id
    >AND a.creation_date < = '01-JUN-07'
    ORDER BY a.user_name;Thanks,
    Anchorage :)

Maybe you are looking for