-
Looks for the users who have the role
user.The script does not consider other roles, such asAppUser. -
Uses to check if the user performed any actions for a specified number of days. The default list of event types includes:
LOGIN,UPLOAD,COPY,MOVE,PREVIEW,DOWNLOAD,EDIT,DELETE,UNDELETE,LOCK,UNLOCK,NEW_USER. You can modify this list in the script settings. -
Adds users who didn’t perform any actions to a
.csvfile with inactive users. You can use this file as input for other scripts, for example to .
Prerequisites
Windows
Install the latest version of .NET core.macOS & Linux
Install PowerShell. Run thepwsh command to test the installation.
Box CLI
To use the script, you need the Box CLI installed and configured. You can do this by following our . The user you use to login with should be the main Box admin or co-admin.Configure the script
-
Clone the
boxcliGitHub repository and cd into this example’s folder or download the files from theexamplesdirectory. -
Set the number of days you want the script to scan for user events. If you don’t specify this value or leave the default, the script will prompt you to enter it.
-
(Optional) To change the report output file name, define the
ReportOutputFileparameter. -
(Optional) To change event types, define the list for
eventTypeparameter.
Run the script
Run the Powershell command.Logging
Logs are stored in thelogs folder located in the main folder.
You have access to these log files:
Inactive_Users_Report_all.txt- contains all log entriesInactive_Users_Report_errors.txt- contains only errors.
