search
top

Converting User Names to SIDs with Powershell

While doing some Active Directory work ran across a need to translate a user name to a SID (security identifier)  to help find traces of it in the registry. Here is an easy way to do this with PowerShell function. function getSID($name, $domain=$env:userdomain) { $objUser = New-Object System.Security.Principal.NTAccount($domain,$name) $strSID =... read more

Extending PowerShell with modules

With Microsoft adding PowerShell to Windows it opened many different possibilities for the scripter’s and IT Administrators managing hundreds and thousands of servers with automation from their desks. One of the problems with running PowerShell from the desk is that you need modules so you can write such great scripts. In this post I will list a few of the great resources to find the modules and in... read more

Using Powershell to Parse Event Logs

Powershell is a well needed addition to Windows. For a longtime there has been Windows admins wanting a powerful and flexible scripting language similar to what Linux / Unix users have had for years, or at least I have. One of the great command line tools for Linux has been the use of commands like cat, less, more and grep as a few to parse files. Enter in Powershell for Windows. A recent need for parsing... read more

Using Powershell to check service and send email

Ran into an issue with services stopping for no reason and causing IIS to stop. This was happening in the middle of the night and was sporadic in nature, making it hard to find a root cause. As a band-aid I created a Powershell 2 script to check for the service, restart if not in a running state and send and email. Here is the script. # Checks for a service to be running and starts if needed. # Author: Me... read more

Changing Windows 2003/2008 Eventlog Size

With the daily routine as a Systems Administrator for Windows and Linux systems we periodically are looking for ways to reduce disk space usage. One of the ways for Windows servers is to reduce the amount of space used by the eventlogs which can eat up alot of space. The value I am using in this example is 1024 kb, you can use any value you would like by changing the value to your liking. The method I am... read more

Next Entries »

top
Life of a Geek Admin
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.