While running a PowerShell command for Office365, one of my colleagues got this error:

The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: [admin0e.online.lync.com] Processing data from remote server admin0e.online.lync.com failed with the following error message: The maximum number of concurrent shells for this tenant has been exceeded. Close existing shells or raise the quota for this tenant.

How can I find out which users are using PowerShell in Office365?

I browsed through the Audit Log (at protection.office.com), but there are no logs for PowerShell activity.


Unless you have enabled auditing in your environment, then you will have a challenge in getting such info.

Your only option is to look at log on events and make assumptions.

However, if you have not set RBAC on-prem and cloud, then you are potentially sharing the MS Cloud admin account, and in that case you'd never know who did it as the logon would be the same for all.

Just look up the TechNet, MSDN, and MS Docs sites for the details on setting up auditing for O365/AAD/On-prem for resource servers/services and PoSH.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.