./Get-M365SizingInfo.ps1
[INFO] Starting the The Missing Link SmartPROTECT Microsoft 365 sizing script (v4.11).
[INFO] Connecting to the Microsoft Graph API using 'Reports.Read.All', 'User.Read.All', and 'Group.Read.All' (if filtering results by Azure AD Group) permissions.
[INFO] Retrieving the Total Storage Consumed for ...
- Exchange
- SharePoint
- OneDrive
[INFO] Retrieving the Average Storage Growth Forecast for ...
- Exchange
- SharePoint
- OneDrive
[INFO] Disconnecting from the Microsoft Graph API.
[INFO] Switching to the Microsoft Exchange Online Module for more detailed reporting capabilities.
[INFO] Retrieving all Exchange Mailbox In-Place Archive sizing.
[INFO] Disconnecting from the Microsoft Exchange Online Module
[INFO] Calculating the forecasted total storage need for SmartPROTECT for M365..
M365 Sizing information has been written to /dev/SmartPROTECT-M365-Sizing.html
PowerShell >= 5.1
for PowerShell Gallery.- Microsoft 365 Global administrator credentials (Required to determine In-Place Archive details)
- Download the Get-RubrikM365SizingInfo.ps1 PowerShell script to your local machine
- Install the
Microsoft.Graph.Reports
andExchangeOnlineManagement
modules from the PowerShell Gallery
Install-Module Microsoft.Graph.Reports, Microsoft.Graph.Groups, ExchangeOnlineManagement
-
Open a PowerShell terminal and navigate to the folder/directory where you previously downloaded the Get-RubrikM365SizingInfo.ps1 file.
-
Run the script.
./Get-M365SizingInfo.ps1
NOTE - If you receive a PowerShell execution policy error message you can run the following command:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
- Authenticate and acknowledge report access permissions in the browser window/tab that appears. This will occur multiple times during the script execution and will open a new tab each time. To complete the script each authentication request needs to be completed.
Note: There is a known issue with the Microsoft authentication process that may result in an error message during the initial authentication process. If this occurs, re-run the script and the error will no longer show.
- The script will run and the results will be written to a html file in the directory in which it was run.
.\RubrikMS365Sizing.html
When 5,000 or In-Place archives are detected, you will receive the following prompt:
[ACTION REQUIRED] In order to periodically refresh the connection to Microsoft, we need the User Principal Name used during the authentication process."
Enter the User Principal Name:
The "User Principal Name" corresponds with the account name you used to sign into Microsoft 365 during the Modern Authentication process.
To filter OneDrive and Exchange results to a specific subset of users in an AzureAdGroup use the -AzureAdGroupName
flag.
./Get-RubrikM365SizingInfo.ps1 -AzureAdGroupName "Employees"
The majority of the information collected is directly from the Microsoft 365 Usage reports that are found in the admin center. The benefit of this approach is that the information can be pulled in bulk and does not require a complete crawl of your Microsoft 365 subscription.
The only downside of this approach is that the Usage reports do not contain any In-Place archive information. To gather that information Rubrik will request a separate set of permissions to pull statistics for each In-Place archive in your environment. Depending on the size of you environment, this can take a significant amount of time.