cli

net user command reference and examples

2010-03-01

  As a follow up to the recent post on disabling accounts with a script, I thought I would include a quick cheat sheet on net user commands. As you may know, the net commands were what we had to deal with back in the dark ages before VB, WMI, PowerShell, and the likes of [...]

would you like to know more?

howto://disable accounts with a script

2010-02-26

  Today’s post is short and sweet, and fully in line with the lazy approach that I took going into this problem. I found myself with a handful of ancient accounts in need of shooting////err, disabling, with the following caveats. I had a list that only contained their sAMAccountNames, this had to be done at [...]

would you like to know more?

Granting browse rights to a directory structure

2010-01-21

    Needing to set some very specific NTFS rights, I am posting this as much to remind myself how I did it, as for any other purpose. Just in case it could help someone else here’s the lowdown. There is a file share that a group of users needs to be able to browse, [...]

would you like to know more?

howto://Fix 0×80070422 errors with Microsoft Forefront or Windows Update

2010-01-20

    The situation you come across with either Microsoft Forefront or Windows updates is that you cannot download updates, and are presented with the incredibly useful error message 0×80070422. You’ve got to love the amount of information they include in these messages. I mean, come on, is it really that hard to say "ET [...]

would you like to know more?

Scripting AD group creation using dsadd

2009-12-07

So today I found myself needing to create about 130 AD security groups, to map to a set of existing folders. The pattern was fairly straightforward…if the folder name was DataSet1, I wanted to create a group called DataSet1RO (for read-only.) Needing to do this quickly  and efficiently (meaning with a minimum of effort) I [...]

would you like to know more?

Customising the PowerShell prompt

2009-07-30

Today a student asked me how to customise the PowerShell prompt, such that the running count of commands, as well as the last command, would appear in the prompt. He had some ideas from other posts but they weren’t quite there, so I started digging around and this is what I came up with. function [...]

would you like to know more?

Creating DNS records at the command line

2008-08-12

Given a number of records that need to be added to DNS, we can create a file with the necessary information, and then run a cmd to read the data in the file and create the necessary records in DNS. The following assumes that all records are to be created in the same zone. Create [...]

would you like to know more?

Creating DHCP reservations at the command line

2008-07-02

So we are in the process of migrating an entire network from one ip.addr range to another, and need to create a large number (>100) of reservations across various scopes at each location. While the GUI DHCP Admin tool is adequate to the task, I didn’t want to have to do that one at a [...]

would you like to know more?