turgel
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by turgel
-
-
Hi everyone,
After playing around with the powershell i wrote a small script which does the following:
1. get the size of a certain folder
2. take this result and compare it with a set limit (in this case 7500 Megabytes)
3. if this limit is exceeded it starts the pulseway notifcation bridge and sends out the notification.
This is very useful to me, i use it to monitor the sql database size of vmware vcenter.
I will post it here, hopefully it will help someone else:
###########################################################
$h = 7500
$colItems = (Get-ChildItem "C:\THISFOLDER" | Measure-Object -property length -sum)
"{0:N2}" -f ($colItems.sum / 1MB) + " MB"
If ($colItems.sum / 1MB -gt $h ){
invoke-item "C:\YOURPULSEWAYFOLDER\NOT.lnk"
}
##################################################################
note: I made a link to the notifcationbridge.exe (NOT.lnk) to give to correct commands, writing it out directly in the powershell didn't work for some reason.
-
Hi Chris,
Thank you four the reply, i will check it out!
Cheers,
turgel
-
Hello,
I was wondering if it is possible to get a notification if a file exceeds a certain file size.
In my case I want to get an alert when a file or a folder exceeds 5 GB. Is that possible?
I only found an option to either monitor the whole harddisk or get an alert when a file changes in size
notification when file size exceeds limit
in Notifications
Posted
Good to know.
Thanks, Chris!