This is an update to my previous post describing the steps to create backups ESTOS applications. The older post handled backing up the earlier release 3.5 of MetaDirectory.
In the meantime MetaDirectory 4.0 has been released and with the new release ESTOS changed the installation path and the name of the service so that the current backup script will not work anymore.
So it’s time for a small update.
In order to not adjust the script every time I want to deploy it again on another server, I want a script that works for the older and the actual version. So I have to check and adjust the values for service name and paths used within the script. Continue reading →
Those days a customer asked me to create a limited access to IPO for human ressources department to check for used and free extensions. Every time new staff is hired HR decides what extension the new user will get.
The challenge was to find a way to create a security user with that restricted and read read only access. Continue reading →
Last time we discussed how to handle Windows services with Microsft Powershell. This time we get a little deeper by restarting multiple services at once with an additional check if they all restart successful.
Let’s take a real example where one software installs three services. I often use GFI Faxmaker. It can works as a fax server behind a telephone system and is usually connected through SIP or H323. To send outbound faxes it has to receive the fax from the client as SMTP mail. Therefore the Microsoft SMTP Server service is also needed. Let’s guess we want to restart all relevant services. So we have to restart three services that come with GFI Faxmaker and the Microsft SMTP Service.
Just restarting a service is not a big deal but don’t we want to check wether all services run after the restart? Wouldn’t it be bad if we restart four services but only two of them come up again? So we will check the state of the service and if they don’t start again successfully we want to send an email to have a chance to act.
Continue reading →
Today we will take a look at how we can handle Windows service with Powershell.
Usually a software that is installed as a Windows service should run all day long without any issues. But did you ever run into the situation that a software does not run fully stable? That it only helps to restart the service? That is not design intend but what should we do? If it helps to restart a service once a day it can be used as a workaround. Nevertheless we should always try to force the vendor to correct the issue that makes the software instable or doing only parts of it’s work. But I also know that it is something not possible to convince the vendor for various reasons. Even if the vendor tries to fix the issue we just need to skip the time before the vendor has done his work.
To be honest it is not the biggest challenge to just restart a Windows service. But sometimes a service doesn’t start reliable or the start runs into a timeout. So we will also check the if the service started successfully and retry to start the service. I will cover some basics about handling with services in this post and publish a follow up article about checking the service state. In that case we have to check the state of the involved services in a loop and if needed trigger the start of a service again. Continue reading →
With this short post I want to share information what you have to do to run Microsoft Powershell scripts from Windows task scheduler.
I like to automate tasks I want to run on a daily basis. Earlier I did that with batch scripts but I ran into the challenge to use workarounds to handle pretty basic things. For example if I want to call specific commands only once a week. Did you ever try get the day of the week within a batch script? Or did you try to get the current date formats in a way you can use it to name a folder. Sometimes the easier way is to call a VB Script within a batch script or you have to cut the date string into pieces an reorder the parts in the way you need it.
Powershell is way more powerful (perhaps that is where the name comes from?) and we have a bigger range of opportunities. Since Powershell is deeper integrated in Microsoft Windows than batch ever had been the interaction with files, properties and Windows services is much easier. Powershell gives us much better output than batch does so that we can reuse informations a command outputs.
Continue reading →