Exchange Hybrid Mailbox Migrations - Skipped Items script
I have a script that I'm working on to get query the entire batch, grab the users, then get the skipped items. This one works, but it crams the expanded skipped items in one line for one user. How can I modify this so it puts each skipped item for one user in a seperate line?
$MigrationUser=Get-MigrationUser -batchid b40af8ae-d4fd-4208-a085-ac1bd76f126 -resultsize unlimited
$Results = foreach( $Mailbox in $migrationuser ){
$Stats = Get-migrationuserstatistics -Identity $Mailbox -includeskippeditems | ?{$_.skippeditems -ne $null} | select-object -expandproperty skippeditems
New-Object -TypeName psobject -Property @{
Name = $migrationuser.identity
RuleName = $Stats.subject
Type = $stats.kind
}
}
$Results | ft name,rulename,type -autosize > c:\temp\migrationrules.csv