I have the code for the permission audit nearly working. I am using powershell with ewsutil.dll.
The code drags user objects from AD and then looks at their mailbox, recursive search through all folders and outputs to a csv file anything non default, for example inbox read rights etc.
However the code is failing on one chunk of code for some mailboxes and not others.
Above is the section of code that fails, on the line where $fldarry1 is created below the for, I get on some mailboxes the following error.
Exception calling "GetFolder" with "1" argument(s): "The request failed schema
validation: The element 'FolderIds' in namespace 'http://schemas.microsoft.com/
exchange/services/2006/messages' has incomplete content. List of possible eleme
nts expected: 'FolderId, DistinguishedFolderId' in namespace 'http://schemas.mi
crosoft.com/exchange/services/2006/types'."
At #############:175 char:26
+ $Folders = $ewc.GetFolder <<<< ($fldarry1)
+ CategoryInfo : NotSpecified: ( [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
I have the code for the permission audit nearly working. I am using powershell with ewsutil.dll.
The code drags user objects from AD and then looks at their mailbox, recursive search through all folders and outputs to a csv file anything non default, for example inbox read rights etc.
However the code is failing on one chunk of code for some mailboxes and not others.
Above is the section of code that fails, on the line where $fldarry1 is created below the for, I get on some mailboxes the following error.
Any help would be appreciated. Thanks.
Share this post
Link to post
Share on other sites