Operating System

/Operating System

Sending email message

I was reading my last blog post Monitoring disk drives and realized, what if I don’t have a monitoring system? I would want the notifications, right?

Well, of course we want to know if our disk drives are getting full in time.
The quick solution, send email message.

I’m going to create a function and use the function from the Monitoring disk drives as the message to send with the email, so I assume we have already run the function and have it already in our session.
(more…)

By |2018-10-18T20:02:43+00:00October 18th, 2018|Common, Email, Operating System|0 Comments

Monitoring disk drives

Hello all, being active to make up for some lost time last month.

The noise, the annoyance, what is happening now…
Disk drives tend to fill up fast, windows updates are taking more and more disk space and servers not getting rebooted won’t cleanup the winsxs folder.

I’ve written a simple function to monitor disk drives, run it with parameters to monitor multiple disks and monitor with your monitoring software, me, I prefer nagios.

I use exit codes for nagios which will give me the results for “OK”, “Warning” and “Critical”, which is the threshold you can define in this function
(more…)

By |2018-10-15T23:08:41+00:00October 15th, 2018|Common, Operating System|0 Comments

Playing with functions

Today I’m going to play around with functions.

I use functions to do repetitive admin tasks to make my life easier.

Functions can be simple and complex depending on your need, sometimes it’s static and won’t need any dynamic parameters.

Function Reset-WUFolder {
# Stop Windows update and BITS services
Stop-Service -Name wuauserv
Stop-Service -Name BITS
# Remove WU Folder
Remove-Item -Path $env:SystemRoot\SoftwareDistribution -Force
# Start Windows update and BITS services again
Start-Service -Name wuauserv
Start-Service -Name BITS
}

Run the code and you can call your function from the command line.

(more…)

By |2019-03-29T23:15:13+00:00August 3rd, 2018|Common, Operating System|0 Comments