One of the first CMD commands I fell in love with (yes I’m that geeky) was TREE. When executed from a command prompt it would give you a nice graphical representation of the directory structure. Never being satisfied I wrote a VBScript version years ago. I decided to dust it off and tweak it some. Here is TREE.VBS.
Tag: VBScript
Using the VBScript Dictionary
I don’t want you to think that it is PowerShell now and forever more. VBScript isn’t going away anytime soon and I still answer plenty of VBScript questions in the forums at ScriptingAnswers.com. A topic that has come up several times in recent days is the Dictionary object. It is easy to use in VBScript and often comes in handy. Let me show you how.
New Logon Script Wizard
PrimalScript 2009 ships with a new Logon Script Wizard, generating VBScript code and providing easy customization. Most of the items are straight forward, like drive and printer shares. You can edit your Welcome message right there in the wizard and specify external command line tools to be executed. The section with the custom VBScript actions […]
Are you leading me on?
Recently in the VBScript forum at ScriptingAnswers.com there was a question about creating a file name from the current date, but with leading zeros. This is a pretty common question. It is easy enough to get the month or day portion of the current day.
dy=Day(Now)
However there is no VBScript function to format this to provide a leading 0. Neither FormatDate or FormatNumber can help. So instead I offered a function. Here is a modified version of what I originally offered that is a little more flexible.
So when is PrimalScript 2009 being released?
The PrimalScript 2009 code is locked and loaded! We are just putting on some finishing touches and getting all of the “accoutrements” in place so that the purchase and upgrade experience is as smooth as possible. We will be doing our final testing of everything Valentine’s weekend and expect to go LIVE by Tuesday, Feb. 17th. PrimalScript 2009 is […]
WMI Live
Similar to the enhanced SQL support, PrimalScript 2009 provides enhanced WMI and WQL support. WMI is an important tool in the administrators arsenal. It allows you to accomplish many tasks, local and remote with very little effort. However, the sheer number of WMI classes and their properties can be overwhelming and make it sometimes hard […]
Where do I begin?
“I’m new to scripting and need a book recommendation.” “Should I learn VBScript or PowerShell?” “What are some good books for learning scripting?”
These are natural and common questions. A few years ago the answers would have been simple. But today if you are just getting started with administrative scripting, the answers only bring more questions. The real question isn’t what book should you read but what technology should you learn? If you are a a SAPIEN blog reader I’m going to assume that the choice comes down to VBScript or PowerShell. The quick answer is to learn both, but I realize that’s not practical. So let’s look at this a bit further and realize that some of this will change once PowerShell v2.0 is released as part of Windows 7 and depending on your adoption of Windows 7.
PrimalScript Samples
Here’s another tidbit about PrimalScript that you may not be aware of. Not only does PrimalScript offer a large number of code snippets that you can drag and drop into your scripting or development project, but it also includes a large number of complete sample scripts.
Scripting Essentials
I wanted to make sure everybody knew about another site in the ScriptingAnswers.com family. We have another area we refer to as our Essentials site. Here we gather tips, best practices, sample scripts and more. Coverage includes not only PowerShell but VBScript as well. This is also where you’ll find conference slide decks and demo […]
WBEMTest Demo
If you’ve sat in on any of my WMI related classes or conference sessions, I know you’ve heard me talk about using WBEMTest to test WMI connectivity and your WMI queries. WBEMTest has been around as part of Microsoft operating systems for a long time but many administrators have never heard of it. If you are troubleshooting a WMI related script this is the first place you should go, especially when troubleshooting remote server connections and alternate credentials. If you can’t authenticate to the server using WBEMTest, your script is likely to fail as well. Usually if there is a connection error, the error message should lead you in the right direction.
You should also use WBEMTest to test and refine your query. Once you know it works, then copy and paste it into your script (VBScript or PowerShell or anything else for that matter). If you script still has a problem, it is likely not your WMI query because you’ve already verified it works.
I put together a short video demo on how to use WBEMTest. To start it, click Start – Run and type WBEMTEST. The video shows you the rest.