1

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

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user155814
  • 101
  • 1
  • 9

1 Answers1

0

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
  • 115,091
  • 17
  • 196
  • 297
  • 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? – user155814 Sep 30 '09 at 13:33
  • 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 Sep 30 '09 at 17:06