This Compare-Object doesn't work, but is there a way to do the same thing?
For ($F=0; $F -le $NumberOfSameFolders; $F++)
{
$Results$F = Compare-Object "$FilesInFolderX$F" "$FilesInFolderY$F"
-Property Name, LastWriteTime -IncludeEqual -PassThru |…
I'm wondering if there's a simpler way to accomplish this. I have two (JSON) objects, where they have properties that are lists of IPs (the properties are individual IPs). I'm comparing the two object properties to find any matching items and want…
I'm building a script that will compare the last octed of in-use IPv4 addreses, with all the available octeds (2 till 254).
I am already this far that I do get a result by comparing array's, but my end-result is also an array, and I cannot seem to…
I have code that finds if a file/folder exists or not in a different location, basically compares two folders. I cannot seem to find anything online to also search file size differences. My code is below and I just need help on how to recursively…
I´m trying to run Compare-Object for a mounted ISO. These 3 lines works perfect with v 4.0 in Windows 8.1.
$Driveletters = (Get-Volume).Driveletter
$SetupDriveLetter = (Mount-DiskImage -ImagePath "Mypath")
$ISODriveletter = (Compare-Object…
I am comparing 2 DLL files based on name, size, last write time and version using the following script. These files are stored on a remote server. My script is working fine but it is taking too long. Is there a way to optimize my script?
function…
I am comparing 2 files based on size, last write time and version number using Compare-object in Powershell. I am getting the results. The only problem is how to get the value of the version number from the result.
function dll_compare(){
…
I'm a Powershell rookie and I would like to pipe the result of Compare-Object to a Write-Progress function (progress bar) as well as a .csv file. I have the following, but it only writes to the file. Can I only use a single pipe? I have large…
I want powershell to Compare a few XML files that contain services, status and computernames. That include all of these in the output but only use Name and Status for comparison.
The Idea is to get an output like so:
Name Status…
My Assert.Equal() for an anonymous object is returning false, however very carefully inspecting the properties by hand in the debugger everything seems fine.
It doesn't complain about the properties per say, only the following (which if you compare…
I am trying to compare two objects in PS.
$object1 = "1.1.1.1,2.2.2.2,3.3.3.3"
$object2 = "3.3.3.3,4.4.4.4"
How do I compare these two objects and include similarities into a new variable?
I've tried -
$compare = Compare-Object -IncludeEqual…
I am using Compare-Object to compare 2 bidimensional arrays issued by Get-ChildItem.
I am asking it to compare using the Name property using -Property 'Name'
This returns a table with the Name property and SideIndicator.
The problem is that I would…
Here is a sample input from two different files hash1.txt and hash2.txt:
hash1.txt:
abcdef01234567890 \path\to\file1.txt
01234567890abcdef \path\to\file2.txt
a0b1c2d3e4f567890 \path\to\file3.txt
hash2.txt
abcdef01234567890…
I can't seems to be able to export the results of the Foreach in a csv or even a txt file.
It asks me for input or simply a blank file
What the code do is import two csv both with same values but with eventual difference or missing value compare…