I have this following code
$filenameFormat1 = "new_permission.txt"
$approvedLogsName = "last_permissions.txt"
Compare-Object -referenceobject $(get-content "E:\\logs\$approvedLogsName") -differenceobject $(get-content "E:\\logs\$filenameFormat1") |
Out-File E:\\logs\output.txt
When I run this code in the PowerShell ISE, I get both '<=', '=>' Side Indicators. But If I run it on normal PowerShell or CMD, the SideIndicator is completely missing.
There's no error messages.
I tried adding the where-object as in this question PowerShell Compare-Object SideIndicator. If I run it with
where-object -eq '=>'
It prints the all the list items which are '=>' but if I change the side, the result again missing the SideIndicator completely
Any tips or suggestions will be highly appreciated