powershell for loop an array and compare values
Go to solution
Solved by AlexGoesHigh,
Well i guess my googling skills got better, i fixed my problems with this since powershell is diferent from what i know. My code turned out to be useless in the end.
I used this instead to compare the arrays
$arrayOfItemsToCompare | ForEach-Object {
if ($array -contains $_) {
Write-Host $_
}
}

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now