Enumerates all the files on a computer. This is a demonstration script; if actually run, it could take an hour or more to complete, depending on the number of files on the computer. Depending on the number of files and on available memory, this script could also fail before finishing.

This script was tested using Kixtart 2001 (412) for Microsoft Windows, available from Kixtart.org.

Kixtart
Edit|Remove
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from CIM_DataFile")
For Each $objItem in $colItems
    ? "Access Mask:" + $objItem.AccessMask
    ? "Archive:" + $objItem.Archive
    ? "Caption:" + $objItem.Caption
    ? "Compressed:" + $objItem.Compressed
    ? "Compression Method:" + $objItem.CompressionMethod
    ? "Creation Class Name:" + $objItem.CreationClassName
    ? "Creation Date:" + $objItem.CreationDate
    ? "CS Creation Class Name:" + $objItem.CSCreationClassName
    ? "CS Name:" + $objItem.CSName
    ? "Description:" + $objItem.Description
    ? "Drive:" + $objItem.Drive
    ? "Eight Dot Three File Name:" + $objItem.EightDotThreeFileName
    ? "Encrypted:" + $objItem.Encrypted
    ? "Encryption Method:" + $objItem.EncryptionMethod
    ? "Extension:" + $objItem.Extension
    ? "File Name:" + $objItem.FileName
    ? "File Size:" + $objItem.FileSize
    ? "File Type:" + $objItem.FileType
    ? "FS Creation Class Name:" + $objItem.FSCreationClassName
    ? "FS Name:" + $objItem.FSName
    ? "Hidden:" + $objItem.Hidden
    ? "Install Date:" + $objItem.InstallDate
    ? "In Use Count:" + $objItem.InUseCount
    ? "Last Accessed:" + $objItem.LastAccessed
    ? "Last Modified:" + $objItem.LastModified
    ? "Manufacturer:" + $objItem.Manufacturer
    ? "Name:" + $objItem.Name
    ? "Path:" + $objItem.Path
    ? "Readable:" + $objItem.Readable
    ? "Status:" + $objItem.Status
    ? "System:" + $objItem.System
    ? "Version:" + $objItem.Version
    ? "Writeable:" + $objItem.Writeable
Next