Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 22513

Powershell file size monitors

$
0
0

This is probably an easy one, I just admittedly don't know the first thing about PowerShell but I need to get some monitors built.

 

I've got some commands that do something close to what I want but I don't know how to make them output as statistics so SAM can use them.

One is to check directory size, the other is to check the filesize of the largest file in the directory.

 

This is what I have currently:

Directory size:  Get-ChildItem C:\Windows | Measure-Object -property length –sum

Largest file in directory:  Get-ChildItem c:\Windows | Sort Length -desc | Select-Object -first 1

 

How do I get them to give me statistics instead of the current output?

 

Thanks!


Viewing all articles
Browse latest Browse all 22513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>