Tag Archives: CLI

Waynes World of Tips

I’ve blogged in the past about Wayne Martin and his outstanding list of command line tips. These are one line commands, some complex some simple, that you can use to accomplish a wide range of task. The overall number of tips is to 425 and Wayne recently reorganized them into 7 categories to make it easier for people to digest. There’s very little scripting with any of these commands. Most use native or freely available command line tools. But because they are executed from a command line you could incorporate them into a script. I encourage you to check them out.

The single list:

http://waynes-world-it.blogspot.com/2008/09/useful-command-lines.html

The same commands split into categories:

http://waynes-world-it.blogspot.com/2008/09/useful-active-directory-command-line.html

http://waynes-world-it.blogspot.com/2008/09/useful-dns-dhcp-and-wins-command-line.html

http://waynes-world-it.blogspot.com/2008/09/useful-general-command-line-operations.html

http://waynes-world-it.blogspot.com/2008/09/useful-vmware-esx-and-vc-command-line.html

http://waynes-world-it.blogspot.com/2008/09/useful-windows-mscs-cluster-command.html

http://waynes-world-it.blogspot.com/2008/09/useful-windows-printer-command-line.html

http://waynes-world-it.blogspot.com/2008/09/useful-ntfs-and-security-command-line.html

More CLI One-Liners

In the past I’ve posted a collection of command one-liners that get a ton of work done with (relatively) minimal effort. Many of these have come from Wayne Martin. I’ve been behind in my blogging while book writing, but I wanted to make sure you checked out his latest list at:

http://waynes-world-it.blogspot.com/2008/04/useful-command-lines.html

Wayne’s World of IT

One of my more popular blog entries is the one I did about CMD one-liners. These are little tidbits of commands that can get a lot done. The list came from a reader and I was happy to share. Wayne has now started a blog Wayne’s World of IT which will carry on this theme of command line automation. It’s just getting started but I hope you’ll check it out. Wayne assures me he has a growing list of one-liners to publish.

Updated Group Reporter

A few of my recent Mr. Roboto columns have been about group auditing. I first published an HTA that would report on group membership last December. Astute reader Matt V. found a bug with the way nested group memberships were being reported. Or in this case, not being reported. It turns out that if a group was a member of one other group, that membership was not reported. But if the group was nested in 2 or more groups then you’d see all the nested groups. After a little debugging I found my goof. I used ADSI to get a reference to the specified group:

strDN would have a value like CN=Sales,OU=Groups,DC=Mycompany,DC=local. My mistake was in assuming that the MemberOf property would always be a collection so I was using a ForEach construct. But it is only a collection if there is more than one group. So I modified the code:

Because I used the same code in a followup article where I released a command line version of the tool, I had to modify that tool as well. The above code snippet is actually from the WSF version.

Anyway, both versions have now been updated and are available for download from the Mr. Roboto section of my script library. Thank you Matt for keeping me on my toes.

Technorati Tags: , , , ,

Explore Your World

This week’s Windows Tip Sheet column is about opening an Explorer window from the command prompt. One of my readers sent me an email about using this tip in Vista:

Iโ€™m currently running Vista and when I type โ€œexplorer.exe /e, %cd%โ€ I get the same results as โ€œexplorer.exe /e /root, %cd%โ€.  So is /root really necessary?  Wouldnโ€™t it be faster to remove it if you get the same results?

He’s right in that you essentially end up with an Explorer window opened to the current directory. But there is a subtle difference that might matter to you. When you use /root, you should see that folder tree in the left hand pane is โ€œrootedโ€ to the specified folder. When you do it without /root, the folder tree is the full tree showing your computer, network places and the rest.

On my Vista Ultimate laptop, I didn’t really notice any performance difference between using /root or not. It would save you from typing a bit, but I use a batch file anyway.

It boils down to how you intend to use the Explorer window.  If you want to easily navigate away from the current folder, then don’t use /root. The command is flexible so do what works for you.

Technorati Tags: , , ,

Revisit an old friend

I have a new blog at the SAPIEN blog that is a visit to an old friend, DosKey. Now, before you dismiss this as old-fashioned, take a moment to read the article and try it out. If you spend a lot of time at a command prompt, DosKey can make you more efficient. You can even use it to execute PowerShell expressions and commands. If you are a fan of one-liners, then associating them with a DosKey macro makes a lot of sense. Let me know what you think.

Technorati Tags: