tankergoblin
asked on
powershell
Hi,
How to write a script to calculate how many files in a folder every 1 min. If files is more than 10 then send an email to administrator.
Also how to get cpu utilization in Linux OS... do i need snmp to do so?
How to write a script to calculate how many files in a folder every 1 min. If files is more than 10 then send an email to administrator.
Also how to get cpu utilization in Linux OS... do i need snmp to do so?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i was been told that powershell almost can do everything you can think of... so are you sure powershell is not compatible to linux platform?
There are some implementations like http://blogs.msdn.com/b/powershell/archive/2008/04/08/powershell-on-linux-solaris-mac-etc.aspx
ASKER
is that mean we can or cannot get information from other platform? if can pls show me some link that show some code on it...
$dir = gci c:\directory\directory
$count = $dir.count
if ($count -gt 10) {Send-MailMessage -to "user@domain.com" -Subject "Warning message" -from user@domain.com -smtpserver server.domain.com -body "message body"}