PowerShell Notes

Searches the path recursively for CAB files and outputs the results to a text file.

PS Z:\> get-childitem -recurse -include *.cab -name -path z:\JournalArchiving0015 > z:\JournalArchiving0015\test.txt

Counts the lines, words and characters.

PS Z:\JournalArchiving0015> get-content test.txt |measure-object -word -line -character

Lines Words Characters Property
—– —– ———- ——–
17251 17251 569283

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s