Skip to content

Commit c32e400

Browse files
committed
added switch for short system report, adjusted some entries in psd1 files
1 parent 3ff188c commit c32e400

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed
3.1 KB
Binary file not shown.

Get-CompleteServerStatus.ps1

+15-4
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
3030
Author(s): Dennis Esly
3131
Date: 02/02/2017
32-
Last change: 09/04/2018
33-
Version: 2.0.1
32+
Last change: 09/12/2018
33+
Version: 2.0.2
3434
3535
#>
3636

3737
Param(
3838
# The day of week to additionaly send an report by email
3939
[ValidateSet(0,1,2,3,4,5,6)]
40-
[int[]]$dayOfWeek = 4
40+
[int[]]$dayOfWeek = 4,
41+
42+
# Switch to get a shortened report
43+
[switch]$short
4144
)
4245

4346
#region Imports
4447
Import-Module MbamExtensionModule -ErrorAction SilentlyContinue
48+
Import-Module WinSrvExtensionModule -ErrorAction SilentlyContinue
4549
Import-Module ADExtensionModule -ErrorAction SilentlyContinue
4650
Import-Module LogFileModule -ErrorAction SilentlyContinue
4751

@@ -56,7 +60,6 @@ $reportHtmlTitle = "FB Pro GmbH - MBAM-Server report " + (Get-Date -UFormat "%Y%
5660

5761
$year = Get-Date -Format "yyyy"
5862
$month = Get-Date -Format "MM"
59-
6063
$reportSavePath = $ConfigFile.Settings.Mbam.Server.ReportPath + "$year\$month\"
6164
$xmlSavePath = $ConfigFile.Settings.Mbam.Server.XmlPath + "$year\$month\"
6265

@@ -205,6 +208,7 @@ $passed, $warning, $failed, $counter = 0
205208

206209
foreach ($result in $allResults)
207210
{
211+
208212
if($result.passed -eq 1) { $passed++ }
209213
elseif ($result.passed -eq 3) { $warning++ }
210214
elseif ( ($result.passed -eq 2) -or ($result.Passed -eq 4) ) { $failed++ }
@@ -354,6 +358,10 @@ $report += New-MbamReportSectionHeader -resultObjects $mbamServerEnvironmentSyst
354358
$report += $mbamServerEnvironmentSystemsStatus | ConvertTo-TapResultHtmlTable
355359

356360
$report += "</table></div>"
361+
362+
# if full report is requested, get user login history, update history and SCCM deployment history, otherwise skip this part
363+
if ($short -ne $true)
364+
{
357365
# Add user login history to report
358366
$report += Get-UserLoginHistory | ConvertTo-Html -Head "" -PreContent "<h3 id=`"6`">User Login Histroy (last 7 days)</h3>"
359367

@@ -362,6 +370,8 @@ $report += Get-UpdateHistory -number 20 | ConvertTo-Html -Head "" -PreContent "<
362370

363371
# Add SCCM deployment history to report
364372
$report += Get-SccmDeploymentHistory -number 20 | ConvertTo-Html -Head "" -PreContent "<h3 id=`"8`">Deployment group history (last 20 assignments)</h3>"
373+
}
374+
365375

366376
# Closing html tags
367377
$report += "</body></html>"
@@ -421,6 +431,7 @@ if ($ConfigFile.Settings.Mbam.Server.SendReport)
421431
}
422432
#endregion
423433
}
434+
424435
# Catch any occured error and write it to log file
425436
catch
426437
{

LogFileModule/LogFileModule.psd1

10.7 KB
Binary file not shown.
10.8 KB
Binary file not shown.
3.11 KB
Binary file not shown.

0 commit comments

Comments
 (0)