The Surly Admin

Father, husband, IT Pro, cancer survivor

Restart-Computers with Firm Confirmation

I’m always on the look out for new PowerShell projects.  Doesn’t much matter if they’re little projects–like this one–or big ones–like The DFS Monitor With History.  This is why I’m always on the Spiceworks IT Programming forums and PowerGui.org’s forums.

Today I ran across a little script someone was writing in batch and I decided to write it in PowerShell for a couple of reasons.  I had not really played with the Read-Host functionality yet and I wanted to play with the built-in documentation functionality of PowerShell which I discovered while on vacation.  Yes, I read PowerShell stuff while on vacation, it’s a weakness (so far I’ve been able to hold off on the PowerShell reference app for the iPad, but not sure how much longer)!!

Continue reading

Advertisements

August 28, 2012 Posted by | PowerShell | , , , , , | 2 Comments

Single Click Script to Add a Computer to the Domain

This script was inspired by a simple script I saw posted on Spiceworks, you can find the original here.  I didn’t want to post my take on the script on Spiceworks because it seemed a little rude, but I had some problems with this script.  The primary one, and this one trumps all others, was that you’re storing an extended security password in clear text!  Now, you could protect it by putting security permissions around the share where this is located and those security permissions are going to be for people who would probably know that password anyway but it still didn’t work for me.  We need a more secure method.

Continue reading

August 10, 2012 Posted by | PowerShell | , | 7 Comments

Purge List Items in SharePoint 2010

In August 2012 my company migrated to SharePoint 2010, and immediately ran into a problem. SharePoint 2010 has a limit on lists of 5000, and this is a pretty hard limit–it won’t even show the list items to the user if you’re over the threshold. Now, you could just go in and change the threshold to a much higher number but honestly, that completely defeats the whole purpose of the threshold which is there to improve list performance. Ideally, you want to delete items in the list until you’re under the threshold.  Here’s how I did it.

Continue reading

August 7, 2012 Posted by | PowerShell | , , , , , | 2 Comments

DFS Replication Monitoring

For the past two years I’ve been working, on and off, on a way to easily monitor my DFS replication tree. I just want to make sure backlogs aren’t getting stuck and so forth. The Microsoft tools are pretty unwieldy for this, by the way.  This sent me on the journey into DFS and how it works and how I can better monitor it.  Read on to see how it went!

Continue reading

August 3, 2012 Posted by | PowerShell | , , | 64 Comments