Created
June 30, 2021 12:59
-
-
Save Xeckt/5a52d235fd28578f328cf3050184379d to your computer and use it in GitHub Desktop.
Set Outlook PST Max Size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$global:OutlookPstMaxFileSize = 0 | |
$global:ComputerName = [System.Net.Dns]::GetHostName() | |
$global:Registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('CurrentUser', $global:ComputerName) | |
$global:OutlookDataSizeRegistryPath = $global:Registry.OpenSubKey("Software\Microsoft\Office\16.0\Outlook\PST", $true) | |
$FileSize = Read-Host "Write file size in GB for max PST size" | |
$global:OutlookDataSizeRegistryPath.SetValue("MaxLargeFileSize", ([int]$FileSize * 1024)) | |
# I'm using $global variables for convenience as this script may be added to later to include more outlook functionality and registry interactions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment