If you’ve found yourself here then chances are you messed up one of your domain controllers or at least one of your DHCP Servers. I admit I did. More than once. And I’m tired of querying for the elusive “Remove-DhcpServerv4Failover” PowerShell script to force delete the Windows Server DHCP failover relationship. The way content makes its way onto this site is usually split into two categories: Repetition, and one time specialized content not found on the internet (at least difficult). Pick the server you want to keep. Look at your DHCP leases and determine which might be the most […]
How many times have you entered ipconfig /all at the command line to return a single IP address, then have to strain your eyes sifting through mostly unwanted networking info (subnet mask/gateway/DNS/mac address)? As a sysadmin, after rinsing and repeating this process nearly every day of your waking sysadmin life, this tends to lean towards the monotonous side. What I would like to propose is to declare an environment variable which utilizes native Windows CLI tools which strips out the information you don’t need while leaving the gold behind, the IP address. Create a short and easy environmental variable so that the […]
Using the Excel.Application com object in Powershell won’t save a file through the task scheduler for automation. It’s likely a DCOM permissions issue. Automating Excel is sometimes fraught with peril… The only way I’ve found around issues such as this is to set Excel to run as a specific user through DCOM permissions.
A few years ago in a past life I performed an Active Directory migration from a 2003 functional level to 2008 R2 with ADMT 3.2 accompanied by an Exchange 2007 to 2010 migration. The only problem I ran into was that the old X500 addresses for the mailboxes aren’t migrated to the new mail system. The cached auto-complete email addresses in Outlook use the X500 address for internal emails which caused internal to internal email to fail. Once the auto-complete addresses were wiped out everything was fine and Outlook began creating new auto-complete data with correct X500 data. It’s a […]
After spending significant time Googling for an easy way to report IIS traffic on a per server basis and coming up empty handed I have decided to write my own Powershell script that will report web traffic server-wide, site-wide, chart images and automatically email it. The real magic behind it is Microsoft’s Log Parser. The query I have configured for mine is to count all the hits on aspx pages to give me the most accurate report. If you use anything else, you can add in an OR clause or replace aspx with whatever you need in the Log Parser lines: WHERE (cs-uri-stem LIKE […]
Recently I had the impulse to populate existing AD user object property fields with phone numbers, titles, companies, and office; however, I wanted to use PowerShell to bulk import instead of the old ldifde method or manual labor. It was actually quite easy, but it does require some time massaging the CSV file in Excel.