Archive for the ‘windows’ tag
Win7 Install
I just really wanted to mention how much I <3 the win7 installer. I’ve got a GX620 optiplex in the house that I realized had no cd-rom, and wouldn’t boot from a flash drive, so i copied the win7 install files from my flash drive to an NTFS formatted usb hard drive, and it installed wicked fast.
Win7 is full of win and love and butter.
Server Monitoring
Ok, so normally i’m not a product whore, but I found a really neat tool for monitoring windows servers at www.poweradmin.com
I’ve loaded it up on our data server and it enables all kinds of monitoring and notification options. I’m gonna keep it monitoring this server for a bit, and if it seems to stay as good as it looks now, I’ll add more servers to my monitoring. The all in one place monitoring is slightly awesomesauce as well.
Auto remove old accounts from AD
From Scott Lowe:
http://blog.scottlowe.org/2006/05/19/semi-automatic-account-maintenance/
Continuing in my “semi-automatic†theme, here’s some information on using command-line utilities to help automate account maintenance. By combining dsquery and a third-party replacement for Dsmove (since Dsmove has some problems), we can streamline account maintenance policies for Active Directory.
First, the problem with Dsmove. The Dsmove.exe utility is supposed to be able to take DNs on standard input (stdin) and move them (with or without a rename operation at the same time) to a new location in Active Directory. Unfortunately, it doesn’t work; for some reason, Dsmove won’t accept the output of Dsquery, even though that output works with Dsmod and Dsrm. I found numerous references to this same problem (here’s one) via a Google search, so I know I’m not alone.
Fortunately, there’s a free third-party replacement that steps up to the plate to fill in for dsmove, and it’s call AdMod. AdMod does more than just move objects; it can also modify objects as well. For our purposes, however, we’re just going to use it to move objects.
We’ll start out with the Dsquery command again, this time to find inactive accounts:
dsquery user -inactive 4
This will find all the user accounts have have been inactive (not logged into) for more than 4 weeks. Pipe this into the Dsmod command to automatically disable them:
dsquery user -inactive 4 | dsmod user -disabled yes
This ensures that any account that has not been used in more than 4 weeks will be automatically disabled. Now, we can bring in AdMod to help us keep those disabled accounts manageable:
dsquery user -disabled | admod -move “ou=Disabled Accounts,dc=example,dc=net†-safety 100
This will automatically gather all the disabled accounts and move them into the Disabled Accounts OU automatically. Note the “-safety 100†parameter; this means that if more than 100 objects will be affected, the command won’t proceed. This can be replaced with the “-unsafe†parameter if this fail-safe isn’t necessary.
So, put this into a batch file, schedule it to run once a week, and it will take care of those inactive accounts that are no longer being used. (This will make those security guys pretty happy.)
MS Scriptomatic
Must remember to check this out at some point in the future:
2k3 Admin Pack in Vista
In case you hadn’t noticed (Or like me aren’t using Vista and don’t really care yet) the windows 2k3 admin pack doesn’t work with Vista. That’s because MS fails at registering DLL’s.
Thankfully, one poor soul at MS helpfully solved the issue, and MS has given us a fairly simple fix:
http://support.microsoft.com/default.aspx/kb/930056
Relevant portion below as MS likes to move their KB articles around over time:
To resolve this issue, register the Windows Server 2003 management tools on a domain user account. To do this, follow these steps:
| 1. | Log on to Windows Vista as a user who has local administrator permissions. | ||||||||
| 2. | Create the RegisterAdminPak.cmd script. To do this, follow these steps:
|
||||||||
| 3. | Run RegisterAdminPak.cmd from an elevated command prompt. To do this, follow these steps:
|
adhoc network drive mapping
As I’m working to consolidate the neat tips I find for a future wiki at work, here’s another neat one:
There is a feature in Windows XP and Vista that not many people know which can save you endless hours and it’s called pushd.
From the command-line if you type:
pushd \\someserver\someshare\somedirectory
Then Windows will automatically map a temporary drive to \\someserver\someshare, change to that drive, then change directory to somedirectory.
When you’re finished you can then type:
popd
Then Windows will change back to your original working directory and remove the mapped drive.
Here is an example:
C:\Temp\> pushd \\someserver\someshare\somedirectory
X:\somedirectory\> del somefile.txt
X:\somedirectory\> popd
C:\Temp\ >
Found at:
http://blog.bartholomew.id.au/2007/12/19/adhoc-mapping-of-network-drives
, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
If you are prompted for an administrator password or for confirmation, type your password, or click Continue.