Figured it out myself. Because Powershell works with .net objects rather than text, you need to use get-content to expose the contents of the text files. So to perform what I was trying to do in the question, use:
compare-object (get-content one.txt) (get-content two.txt)
Related Posts:
- What exactly are DLL files, and how do they work?
- The application was unable to start correctly (0xc000007b)
- How do I start PowerShell from Windows Explorer?
- How to run a PowerShell script
- Setting Windows PowerShell environment variables
- How to run a PowerShell script
- ‘npm’ is not recognized as internal or external command, operable program or batch file
- Difference between xcopy and robocopy
- The filename, directory name, or volume label syntax is incorrect inside batch
- Bat file to run a .exe at the command prompt
- How can I open Java .class files in a human-readable way?
- How to find the Windows version from the PowerShell command line
- Opening a remote machine’s Windows C drive
- Why does CreateProcess give error 193 (%1 is not a valid Win32 app)
- Unix tail equivalent command in Windows Powershell
- Taskkill /f doesn’t kill a process
- How to run PowerShell in CMD
- Bluescreen on windows 10 after using android emulator
- XCOPY: Overwrite all without prompt in BATCH
- How do I get the current username in Windows PowerShell?
- How to install and run the Nmap program through Cygwin in Windows?
- Difference between $? and $LastExitCode in PowerShell
- How do I force Robocopy to overwrite files?
- How to compile C program on command line using MinGW?
- All links in my site start with localhost?
- WordPress database setup Windows 2016 IIS
- How do you find what process is holding a file open in Windows?
- How do I tell Git for Windows where to find my private RSA key?
- How to send ctrl+alt+del using Remote Desktop?
- What’s the command-line utility in Windows to do a reverse DNS look-up?
- Useful Command-line Commands on Windows
- How do you add a Windows environment variable without rebooting?
- hosts file ignored, how to troubleshoot?
- How to refresh hosts file without rebooting
- How to sleep in a batch file?
- Resolve host name from IP address
- Run a .bat file in a scheduled task without a window
- Command line to list users in a Windows Active Directory group?
- What is Active Directory Domain Services and how does it work?
- Is there a global, persistent CMD history?
- In Windows, using the command line, how do you check if a remote port is open?
- Does Windows have a built-in ZIP command for the command line?
- Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?
- How does CTRL-ALT-DEL to log in make Windows more secure?
- How to check if a port is blocked on a Windows machine?
- How do I force sync the time on Windows Workstation or Server?
- How do I create a symbolic link in Windows?
- Best practice: Should I always install a fresh OS for new employees?
- How can I tell what version of IIS is installed?
- Where can I find data stored by a Windows Service running as “Local System Account”?
- How can I connect to a Windows server using a Command Line Interface? (CLI)
- Windows server last reboot time
- Windows Active Directory naming best practices?
- Why hasn’t rsync caught on in the Windows world? [closed]
- Boot and Install Windows from a USB thumb drive
- How to fix PuTTY showing garbled characters? [closed]
- How to delete cached temporarily credentials for a network share on a Windows machine without rebooting or logging off [duplicate]
- How do you free up a port being held open by dead process?
- What is the Windows equivalent of Unix “whoami” command?
- How to configure a Windows machine to allow file sharing with a DNS alias
- Alternatives to Splunk?
- How to install OpenSSL in windows 10?
- PowerShell says “execution of scripts is disabled on this system.”
- Unexplained crashes related to ntdll.dll
- How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
- Echo equivalent in PowerShell for script testing
- PowerShell says “execution of scripts is disabled on this system.”
- How to handle command-line arguments in PowerShell
- How can I open a cmd window in a specific location?
- How do I concatenate strings and variables in PowerShell?
- Function return value in PowerShell
- Command ‘ls’ not working in command prompt
- openssh windows bad owner or permissions
- Read file line by line in PowerShell
- Azure Powershell Select-AzureSubscription with subscription id
- What is the ASCII Code of ½?
- Docker for Windows error: “Hardware assisted virtualization and data execution protection must be enabled in the BIOS”
- Why Local Users and Groups is missing in Computer Management on Windows 10 Home?
- How can I replace every occurrence of a String in a file with PowerShell?
- The program can’t start because libgcc_s_dw2-1.dll is missing
- CMake : C and CXX compiler identification is unknown Win10 CMakeGUI
- Running Python in PowerShell?
- Terminal Multiplexer for Microsoft Windows – Installers for GNU Screen or tmux
- Why do fonts appear jagged in Chrome?
- accessing the $args array in powershell
- how to open Jupyter notebook in chrome on windows
- How to use random in BATCH script?
- Windows batch – concatenate multiple text files into one
- Concatenate files using PowerShell
- Where do you usually have your DirectX SDK folder?
- Using %PROGRAMFILES(x86)% on Windows OS 32bit
- What’s a good (free) visual merge tool for Git? (on windows)
- php exec() is not executing the command
- Powershell send-mailmessage – email to multiple recipients
- Permissions to wp-content folder in Windows Server 2012
- WP CLI Shell not working on Windows
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- Remove index.php from WP 8.0 install migrated to IIS from Apache (still detecting Apache server)?
- In a PowerShell script, how can I check if I’m running with administrator privileges?
- What’s the reverse DNS command line utility?