OfficeDev / O365-InvestigationTooling

MIT License
574 stars 361 forks source link

A parameter cannot be found that matches parameter name 'Mailbox'. #36

Open JamesHeathcote opened 6 years ago

JamesHeathcote commented 6 years ago

DumpDelegatesandForwardingRules.ps1

Running as a GA with latest powershell module:

A parameter cannot be found that matches parameter name 'Mailbox'.

mcvic1rj commented 6 years ago

Can you run the following and paste the output? $PSVersionTable

stsulliv commented 6 years ago

Same problem here. $PSVersionTable output below. Name Value


PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.18968
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

stsulliv commented 6 years ago

Found my problem. Check your connection to Exchange (including the import session part).

Troubleshooting: -[SUCCESS] I ran the 'Get-InboxRule' command locally on exchange using Exchange Management Shell -[SUCCESS] I ran the 'Get-InboxRule' command remotely on a server with Exchange Admin Tools installed using Exchange Management Shell. *note the Exchange PowerShell launches with an 'Auto' connect option (see windows shortcut properties)

So the issue was with the Exchange connection. After digging deeper in the script, I had an error importing the Exchange PSSession. Once resolved, the command executed successfully.

PsychoData commented 5 years ago

I will say some of the commands in these scripts have to be tweaked to run with On-prem exchange, though a lot stays the same Combined with Issue #37 (Troubleshooting suggestions there) I'm guessing this is probably just an issue importing the session.