views:

43

answers:

1

Hi, I would like to create a powershell script generating a report showing all compressed files/folders on remote servers. By compressed files I mean files compressed using the buildin Windows Compression utility, not zip. But I have a hard time figuring out how to localize the compressed files. Should I go with WMI or?

Thanks Frank

A: 

The FileInfo/DirectoryInfo classes from .NET (I assume all of this is easy available to PowerShell) will give you the file attributes that includes the compression attribute if compressed.

leppie
Yes the FileInfo/DirectoryInfo classes could be usefull but the solution script has to be triggered from a client pc and ask 1..many servers. So it would be very nice if the load of getting all the compressed files could be moved to each server by using WMI perhaps?
frank: PowerShell 2 has Remoting. You can easily execute a script or a series of commands on numerous machines. And no, you don't need to copy all files through the network for looking at their atributes ...
Joey