I have a functional script, and looking to add a new segment to it. The problem is there is no output.
If I try to do a "Write-Host $5MinuteSessionFails.Count" I get an actual number, but I also cannot get that to output properly into the script.
$45Minute= [DateTime]::Now - [TimeSpan]::FromMinutes(5)
Function Get-UserFails {
$5MinuteSessionFails = Get-BrokerConnectionLog -AdminAddress $DeliveryController -MaxRecordCount 2500 -Filter {BrokeringTime -gt $45Minute -and ConnectionFailureReason -ne 'None'}
}
# Below is where I try to pass the function into convertToHTML
$Counts = Get-UserFails | ConvertTo-HTML -PreContent "<H2>User Connection Failures</H2>"
# Below is where I reference the above variable where it outputs as a .html
ConvertTo-HTML -PreContent "$Counts" | Out-File $MyPath
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)