Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions HTMLReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,11 @@ Foreach ($User in $AllUsers)
$UPN = $User.UserPrincipalName
$UserLicenses = ($NewObject02 | Select-Object -ExpandProperty Licenses) -join ", "
$Enabled = $User.AccountEnabled
$ResetPW = Get-User $User.DisplayName | Select-Object -ExpandProperty ResetPasswordOnNextLogon
$ResetPW = Get-User $User.UserPrincipalName | Select-Object -ExpandProperty ResetPasswordOnNextLogon

If ($IncludeLastLogonTimestamp -eq $True)
{
$LastLogon = Get-Mailbox $User.DisplayName | Get-MailboxStatistics -ErrorAction SilentlyContinue | Select-Object -ExpandProperty LastLogonTime -ErrorAction SilentlyContinue
$LastLogon = Get-Mailbox $User.DisplayName -ErrorAction SilentlyContinue | Get-MailboxStatistics -ErrorAction SilentlyContinue | Select-Object -ExpandProperty LastLogonTime -ErrorAction SilentlyContinue
$obj = [PSCustomObject]@{
'Name' = $Name
'UserPrincipalName' = $UPN
Expand Down