Hope you all are safe and healthy.
I was wondering if there is any way to get reporting for VBO 365 via powershell or .net formatting in the format that we get via email from our VBO application with below fields for mailbox, one drive, sharepoint and teams
Type Name Status StartTime EndTime Items DataSize Details
The available cmdlets does not provide much details.
Code: Select all
$job = Get-VBOJob -Name jobname
$js = Get-VBOJobSession -Job $job |where {$_.CreationTime -gt ((Get-Date).AddHours(-24))} | select -First 1
$endtime = $js.endtime
If ($js.status -eq "running"){$endtime = "job is running"}
$columns = New-Object psobject
$columns | Add-Member -MemberType NoteProperty -Name "Job Name" -Value $js.jobName
$columns | Add-Member -MemberType NoteProperty -Name "Objects processed" -Value $js.Progress
$columns | Add-Member -MemberType NoteProperty -Name "status" -Value $js.status
$columns | Add-Member -MemberType NoteProperty -Name "StartTime" -Value $js.CreationTime
$columns | Add-Member -MemberType NoteProperty -Name "EndTime" -Value $endtime
$details += $columns
Job Name Objects processed status StartTime EndTime
ABC_O365Backup 1269 Warning 5/3/2021 4:00:00 AM 5/3/2021 4:51:13 AM
Thanks in advance.
Arun