Curated Examples
Example39 02
Source-owned example maintained with PSWriteHTML.
- Source repository: https://github.com/EvotecIT/PSWriteHTML
- Example group:
Example39-CompareObjects
Import-Module .\PSWriteHTML.psd1 -Force
$Object3 = [PSCustomObject] @{
"Name" = "Przemyslaw Klys"
"Age" = "30"
"Address" = @{
"Street" = "Kwiatowa"
"City" = "Warszawa"
"Country" = [ordered] @{
"Name" = "Poland"
}
List = @(
[PSCustomObject] @{
"Name" = "Adam Klys"
"Age" = "32"
}
[PSCustomObject] @{
"Name" = "Justyna Klys"
"Age" = "33"
}
)
}
ListTest = @(
[PSCustomObject] @{
"Name" = "Justyna Klys"
"Age" = "33"
}
)
}
$Object4 = [PSCustomObject] @{
"Name" = "Przemyslaw Klys"
"Age" = "30"
"Address" = @{
"Street" = "Kwiatowa"
"City" = "Warszawa"
"Country" = [ordered] @{
"Name" = "Gruzja"
}
List = @(
[PSCustomObject] @{
"Name" = "Adam Klys"
"Age" = "32"
}
[PSCustomObject] @{
"Name" = "Pankracy Klys"
"Age" = "33"
}
[PSCustomObject] @{
"Name" = "Justyna Klys"
"Age" = 30
}
[PSCustomObject] @{
"Name" = "Justyna Klys"
"Age" = $null
}
)
}
ListTest = @(
[PSCustomObject] @{
"Name" = "Sława Klys"
"Age" = "33"
}
)
MoreProperties = $true
}
$Object3,$Object4 | Out-HtmlView -Compare -HighlightDifferences -Filtering -WordBreak break-all -FlattenObject -CompareNames "Test Object 1", "Test Object 2"