Send mail on backup failure with Script

A lot of us, in small environment, is using Windows backup to backup all servers. To be honest, it is a good enough solution, but we have problems with reporting. For me, as an administrator, it is very important to know if a backup was successful or not. There is still another problem, that we have many small environments to check and it would be nice to receive reports thru mail.
As there I didn’t find a solution, I wrote a script, which runs as scheduled task (weekly or daily – as you prefer) and E-Mail me all errors on backup jobs in last X hours. It is working for me and now I am more secure that everything in the system is going in the right way. Be careful how you will use the script; it should be used on any server where you run Windows backup and if you are using Exchange for sending mails take care on authentication or create relay connector to allow the script to send an E-Mail.

Script could be downloaded here..

Essentials Server 2016 TP3 – the first look

The Server 2016 TP3 is now available and of course I tried it to see what is new and which new functionalities can we expect.
The first thing I tried was the installation and it is similar to all previous versions, but there are some new steps that I appreciated.
The first change that I like is the domain name. Now you create a non .local domain from GUI, which is very nice and useful. As you should know, in the last years is .local ending DNS name are standardized as “local computer” – that means the pc where you work. From this perspective you can expect some misfunctionalities in long term use and incompatibility with third party certificates. For this reasons it is better to use DNS domains, which you can register. You can change DNS names in the way you see on Pictures 1 and 2.

 Essentials2016-1Essentials2016-2
The second difference between normal server and Essentials server is, that Essentials server wants to have different login name for administrator. So as you can see in Picture 3, you have to choose the name and password for administrator. Be careful with the password. As Essentials does not use read DirSync to synchronize passwords between Office365 and local environment, you have to submit the password which is compatible with Office365 policy (8 to 16 characters and without some special characters – this is not the best, because some languages have some special characters). I hope that in future this policy will change as I want to use longer passwords and all characters like in AD passwords. This would be nice for security and it will not be a bed idea to implement some kind of DirSync. Of course the new version of Essentials server is also more integrated with Cloud as previous. There is a very nice function for Azure backup, creating VPN to Azure and some others. They are very useful for small companies as they are easy to configure and use.

Essentials2016-3
I am still convinced that a server should be the heart of the system, even when the system is a small one. I don’t want to have a router who has DNS and DHCP roles. For this reason, my advice will remain that you should transfer DNS and DHCP roles to the server and to have a control over them. Please configure a static IP on the server as in bigger AD systems – it is the same environment and it will work better.

Essentials2016-4
The additional new function that I very appreciate is the antimalware software. I saw many small environments without antivirus. They are convinced that there is no real danger for contamination as no one is working on it (well, they missed a lot of actions, but…). Now the antimalware is incorporated. It is not the best from the configuration perspective, but it is free of charge and it is just one click to turn it one. Please do it if you don’t plane to install any other antivirus; it is not a bad choice!
Essentials2016-5
There are many new things in Server 2016; Essentials and Standard version, so you can expect a lot of posts on blogs in this days. Of course if you have time and you plan to use it, it is time to begin to discover new functionalities and test the product..

Windows servers 2016 Technical Preview 3 is available on MSDN

For anyone who want to test the new release of Windows server, now it is possible to download the technical preview 3 on MSDN. This version has many new features and it has corrected many errors or missing functionalities. I would suggest to everyone to try it as is the last TP before RTM and if you want to be prepared at server launch, you have to learn new things now. If you want to know exactly what is new in TP3, you can read it at http://blogs.technet.com/b/server-cloud/archive/2015/08/19/what-s-new-in-windows-server-2016-and-system-center-2016-technical-preview-3.aspx and https://technet.microsoft.com/en-us/library/mt420609.aspx.

There are also Microsoft blogs which I want encourage you to read:
Windows containers: http://weblogs.asp.net/scottgu/announcing-windows-server-2016-containers-preview, http://blogs.technet.com/b/server-cloud/archive/2015/08/19/new-windows-server-preview-fuels-application-innovation-with-containers-software-defined-datacenter-updates.aspx and http://highscalability.com/blog/2015/8/19/the-microsoft-take-on-containers-and-docker.html. .

Deleting print jobs in Error on print server

I had a problem in an environment where all users print thru one print server. The printer was worst one and we always had problems to delete some jobs in error. The users were also unable to print when the printer had a job in error. So, we wanted to automate that procedure to keep printers alive as much as possible.
In this case, we found two different but similar solutions, both in PowerShell.
The first is to delete jobs in non-working hours (true the night). We used the script:

get-printer | where {$_.PrinterStatus -ne “Normal”} | get-printjob |Remove-PrintJob

This script deletes all jobs on all printers where the status of the printer is not normal. This are pros and contras:

  • It runs thru the night, so the printer could be offline for whole day,
  • All jobs on the printer are lost. We preferred to do it in this way, as we didn’t know what kind of jobs were in the queue. It could a confidential information and is better to lose the job as leave those papers in the printer,
  • It has minimum impact to the print server.

The second option is running a similar script every few minutes:

get-printer | Get-PrintJob | where {$_.JobStatus -match “Error”} | Remove-PrintJob

This script has those pros and contras:

  • It could be run every few minutes and printers are really many time online,
  • It has more impact on the print server as the previous, but the impact is still minimum. There is not real difference in server usage.

After consulting with the customer, the best choice was the second version, running every 5 minutes. Now we have printers really with better uptime and the server is running practically on the same performance. Be careful that you run this script with an account who has permissions to delete print jobs (Print Administrator) and it will work. Anyway, if it is possible is always better to find the cause of errors and repair it. It is not always possible, but try to do it, before you use the script.
Still I am convinced that the best way to solve this type of issues is assign the second option directly to an error. When the printer is going to error, it is acknowledged as Error 372; Source: PrintService. You have just to assign a task to this error..

LepideAuditor for File Server

LepideAuditor for File Server is a nice and powerful tool for auditing file servers. It has many good characteristics and it is one of my preferred auditing tools.
When I installed it for the first time, it seemed to me that I did something wrong; I was not able to realize that you can install and configure auditing software so easy. However, it was true. Installing and configuring this software is very easy and Lepide did a great job here. The next thing that surprised me was the fact that I had two completely separate modules – one for configuration and monitoring and the other for reporting. This approach gives me the opportunity to give to someone of the non-administrative stuff (company manager) the opportunity to control who is accessing the files and what is he / she doing in the system, without the ability to change audit parameters and with no need of any knowledge of configuration.

Lepide1
After installing the software from the install package, it is time to configure the software and this step is easy to do. For the first thing, you have to add the file servers which you want to monitor. This is done with a wizard in few steps and here you have to specify servers (you can browse from AD), select the SQL server and database, install the agent and add servers to Audit server group. Here I saw an opportunity for small companies, where administrators many times have problems with budget and buying a SQL server is not an option – Lepide File Server Auditor can work with SQL Express! This is not a limitation if you have a bigger company as you can choice a dedicated SQL server and in this way store more data.

Lepide2 Lepide3
There is also a very simple and effective way to create Audit policy and this enable administrators with not so many knowledge to use preconfigured policies or quickly create a new one. Another great functionality is the object lists, which allows you to exclude some file types (like TMP) from logging or include just file types that you need to monitor. As it seems that is not so important, you will quickly find that is very useful to have smaller log databases. You can also set up logging for some users only or just for a group of users, but here I prefer always to log all users. You never know what will happen!
In addition, don’t forget to setup alerts! Alerting is done very good, you can choose all types of alerts and how you want to deliver them.
Lepide4
The reporting console is very nice organized, with many possibilities how to show and filter our data. It is nice structured and logically done, so anyone can fine his needs. I like a lot the concept of the console, where when you open it, you can immediately determinate some options and review the results. You can simply choose the event you are searching for (read or write file, change permissions, create or delete folder…) and apply on them additional filters true success or failure. It is simple!
Of course, you always need some special filters, where you have to search events and those are present on the top. They are very accurate and choosing the right combination will give you any expected result with only data that you search. It is one of my favorite reporting console, because you are able to find any result you need quickly and logically. Don’t forget that this console is many times used by IT and non-IT people. It is done very nice also for management or non-IT people; they will love it.
Lepide5
Conclusion:
Lepide did a great job with this product. It is very easy to manage and easy to install and configure. I can say that is reliable, so the results you will get are useful for all needs, printed reports are nice done and it is simple to explain the content to anyone. Alerting is very well done and I like the SMS and mail options, but here you have to be careful as you can quickly receive a lot of alerts on mismatched configuration.
I can recommend this software to everyone. It is a good solution for small and bigger companies, you can also think on integrating other excellent Lepide products together and in this way, you will have a very nice monitoring environment.

You can download LepideAuditor for File Server trial version from http://www.lepide.com/file-server-audit/download.html. .