I have a script that can open a ZIP file and modify the content of a xml file and working good
I want to run for a loop at all the ZIP files and change them but I get an error 
$files = Get-ChildItem -path "C:\Temp\SharedFolder\SideVIP" -filter *.VIP
write-host $files
$fileToEdit = "vip.manifest"
$replaceWithVersion = '<Prop Name="WarningDuringUpgrade" Value="False"'
Add-Type -assembly System.IO.Compression.FileSystem
foreach ($file in $files)
{
# Open zip and find the particular file (assumes only one inside the Zip file)
$zip = [System.IO.Compression.ZipFile]::Open($file,"Update")
$nuspecFile = $zip.Entries.Where({$_.name -like $fileToEdit})
# Read the contents of the file
$desiredFile = [System.IO.StreamReader]($nuspecFile).Open()
$text = $desiredFile.ReadToEnd()
$desiredFile.Close()
$desiredFile.Dispose()
$text = $text -replace '<Prop Name="WarningDuringUpgrade" Value="True"',$replaceWithVersion
#update file with new content
$desiredFile = [System.IO.StreamWriter]($nuspecFile).Open()
$desiredFile.BaseStream.SetLength(0)
# Insert the $text to the file and close
$desiredFile.Write($text)
$desiredFile.Flush()
$desiredFile.Close()
# Write the changes and close the zip file
$zip.Dispose()
Write-Host "zip file updated"
}