5 ms·
I wasn't just blindly assuming the alias worked the same. I actually read the Compare-Object documentation [1], which contains that exact command as an example
by slavik81 8y ago
I wasn't just blindly assuming the alias worked the same. I actually read the Compare-Object documentation [1], which contains that exact command as an example of how to compare files. I just didn't understand the sort of comparison it did.
If you search "PowerShell compare two files", it becomes pretty clear this is a common confusion even among people using the name Compare-Object. For example, the top serverfault question has an incorrect top-voted, accepted answer [2].
[1]: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-6#examples https://docs.microsoft.com/en-us/powershell/module/microsoft...
[2]: https://serverfault.com/a/5604 https://serverfault.com/a/5604