With these it helps There is something missing from your code. As it stands this contains no information about zipping a directory. The root of the issue with the code you are showing is you are asking Invoke-Expression to run a folder name. Your $command is returning an object that contains one folder. Was that what you wanted? You then take that folder object and put it into Invoke-Expression. $file = means that you mean to put the results of Invoke-Expression into $file. I also notice you have the command in single quotes which would mean Invoke-Expression would attempt to expand it. More testing is required. I would take a guess that you want to change this up a little.
it should still fix some issue Get-ChildItem is a provider cmdlet - that means that a bulk of its actual work is offloaded to an underlying provider, likely the FileSystem provider in your case. The provider itself doesn't actually support the -Include/-Exclude parameters, that's one of the few things that the cmdlet takes care off - and for the file system provider this is ultra heavy double-work, because the cmdlet needs to recurse down through the file system hierarchy to figure out whether it needs to apply an exclusion or an inclusion based on a parent directory name, you can see how this is implemented here.