Hi mates,
I had the need to disable old/zombie users since my friend's active directory was not maintained in a clean state.
Something easy : query AD with some exclusion, an email with an attachment to recap everything.
More explanations later....in the meantime customize and enjoy.
Powershell, automation, IT problem solving, Windows, Linux and more.......
Wednesday, June 24, 2015
Powershell retrieve info about SQL instances on our network
Hi mates,
for a big migration (from a server room to a new one) some asked me to retrieve all info about all SQL instances.
Since we had to backup and restore everything from tape we must know the most important details about every DB.
I found some good info about assembly on internet and I've created a custom script for my needs.
for a big migration (from a server room to a new one) some asked me to retrieve all info about all SQL instances.
Since we had to backup and restore everything from tape we must know the most important details about every DB.
I found some good info about assembly on internet and I've created a custom script for my needs.
Tuesday, June 23, 2015
Powershell backup Fortinet configuration through SSH with Powershell
Hi mate,
I had the need to backup some firewall configuration.
I know that there are several ways to do it last but not least FortiManager but..........
Had to do it periodically and for several devices.
I used one the several external module that you can find on the web
(http://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/)
(http://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/)
Monday, June 15, 2015
Powershell move computer account to specific OU....a little bit complex
Hi,
I had the need to move a list of computer account to specific OU(s). The situation became complicated when you could have different OU based on the type of computer : notebook, desktop, server and so on.
It feeds 3 different arrays and based on the result of the AD query (searching the destination OU) you can move their content on the destination container that you prefer.
Wednesday, June 10, 2015
Powershell verify service status restart it
Hi,
some days you receive several requests and you notice that some of them (maybe the 100%) are caused by an old server that is no longer working fine or to some custom application that cause service hangs.
Anyway every day the same actions to restart a service or reboot a server is wearisome so I decided to automate these checks.
Added some email item to receive a notification......added also some logging the check, rarely if you are lucky, what happened, when and if the script did its job.
Monday, June 8, 2015
Powershell automate file or directory copy
Hi,
I had the need to automate the copy of some directory during a specific time windows. On the other side of the world my colleagues were not working and we had to align the content of specific directories. Instead of configuring DFS and so on I would like to face up this need with Powershell.
Friday, June 5, 2015
Powershell monitor event log and in case of specific error restart the related service
Hi,
I had to monitor some service on some specific servers. In particular when a specific event appears on the event log I had to restart a service. Obviously before deciding how many events to analyze before undertake any action you have to check your event viewer and know how frequently it changes.
I had to monitor some service on some specific servers. In particular when a specific event appears on the event log I had to restart a service. Obviously before deciding how many events to analyze before undertake any action you have to check your event viewer and know how frequently it changes.
Subscribe to:
Posts (Atom)