Forum Discussion
Ravi-MTC
Oct 10, 2019Copper Contributor
Help in running script to get inactive users
Hi Friends, I want to get a list of inactive users for last 30 days as recommended in Secure Score. Secure score tells me to run this script. however when I run it i get errors. can someone tell ...
VasilMichev
Oct 10, 2019MVP
Might help if you tell us the errors you are running into. The script needs two modules, the MSOnline one, and the MFA-enabled Exchange module. Make sure those are installed before running it. And you also need to run it with account with sufficient permissions to query the audit logs.
Ravi-MTC
Oct 10, 2019Copper Contributor
VasilMichevam running the commands one by one to see which commands fail,
so the command below fails and gives error as shown in screenshot
Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA + "\Apps\2.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse).FullName | ?
{ $_ -notmatch "_none_" } | select -First 1)