diff --git a/Increase-MaxOSTFileLimit100GB.bat b/Increase-MaxOSTFileLimit100GB.bat new file mode 100644 index 0000000..a89bb1f --- /dev/null +++ b/Increase-MaxOSTFileLimit100GB.bat @@ -0,0 +1,2 @@ +REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\PST" /v MaxLargeFileSize /t REG_DWORD /d "102400" /f +REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\PST" /v WarnLargeFileSize /t REG_DWORD /d "97280" /f diff --git a/Increase-MaxOSTFileLimit75GB.bat b/Increase-MaxOSTFileLimit75GB.bat new file mode 100644 index 0000000..06e7ddc --- /dev/null +++ b/Increase-MaxOSTFileLimit75GB.bat @@ -0,0 +1,2 @@ +REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\PST" /v MaxLargeFileSize /t REG_DWORD /d "76800" /f +REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\PST" /v WarnLargeFileSize /t REG_DWORD /d "74240" /f diff --git a/Monitor-ADRecycleBin.ps1 b/Monitor-ADRecycleBin.ps1 new file mode 100644 index 0000000..b44b5f7 --- /dev/null +++ b/Monitor-ADRecycleBin.ps1 @@ -0,0 +1,6 @@ +# Monitors whether Active Directory Recycle bin feature is active + +$Recycler = Get-ADOptionalFeature -Filter 'name -like "Recycle Bin Feature"' + +if(!$Recycler.EnabledScopes){Write-Host "Active Directory Recycle Bin is not enabled"; exit 1} +else{Write-Host "Healthy"} diff --git a/Monitor-ExProLicenceKey.ps1 b/Monitor-ExProLicenceKey.ps1 new file mode 100644 index 0000000..d24b7c8 --- /dev/null +++ b/Monitor-ExProLicenceKey.ps1 @@ -0,0 +1,6 @@ +# Monitors whether Examine Pro Licence USB Key is preasent + +$driver = Get-WindowsDriver -Online -all | Where-Object {$_.ProviderName -eq "SafeNet, Inc."} + +if ($driver -eq $null){Write-Host "Licence Key is Missing"; exit 1} +else {Write-Host "Licence Key is Present"; exit 0} diff --git a/Monitor-LargeOSTFiles.ps1 b/Monitor-LargeOSTFiles.ps1 new file mode 100644 index 0000000..ef42034 --- /dev/null +++ b/Monitor-LargeOSTFiles.ps1 @@ -0,0 +1,23 @@ +# Monitors if any user's OST file is over a given size, default 45GB + +param([double]$MinSize = 45) + +$UserFolder = "C:\Users" +$OutlookFolder = "AppData\Local\Microsoft\Outlook" + +Get-ChildItem -Path $UserFolder | ForEach-Object { + $User = $_ + $Folder = "$User\$OutlookFolder" + if ($(Test-Path -Path $Folder)){ + $FoundFiles = Get-ChildItem $Folder -Filter *.ost | Where-Object {$_.Length / ($MinSize * 1GB) -gt 1} + $FoundFiles | Select-Object FullName, Length | ForEach-Object { + $Name = $_.FullName + $Size = [Math]::Round(($_.Length / 1GB), 2) + Write-Host "$Name $Size GB" + } + if ($FoundFiles){$script:Found = $true} + } +} + +if ($script:Found) {exit 1} +else {exit 0}