Execute! III

Okay, last time, I left you with two functions which were nearly identical. This one:

Const pi = 3.1416
r = 0
WScript.Echo Main()
Function Main()
 r = 2.5
 Dim result
 Dim str
 str = “result=pi*(r*r)”
 Execute str
 Main = result
End Function

This function returns a nonzero value. Although r has a value of zero in the global scope, function Main() …

Read More

PowerShell Goodies

It’s easy not to notice all the great things that are available for extending PowerShell. For example, here are a couple of CodePlex projects that add PSDrives to PowerShell, allowing you to treat external storage systems as if they were a file system (like you can do with the registry).

http://www.codeplex.com/PSSharePoint connects to SharePoint Portal Server 2003, http://www.codeplex.com/PSBizTalk works with …

Read More

Taking Shortcuts in PowerShell

Last month I wrote a blog entry about re-discovering DOSKey. I have to say it has been very useful and I feel much more efficient. With only a few keystrokes I can kick off programs or complex command expressions. This was easy to do since I always have a CMD window open. However, there are times when I’m in PowerShell and find myself reaching for a keyboard shortcut. While it is possible to access CMD from within Powershell, it takes too many steps. What I want is to use the same shortcut in PowerShell that I do in CMD. The solution is customizing my PowerShell profile with functions and aliases.

Read More

Make-A-Cmdlet: Part 4… Crud.

Well, my Ping-Computer cmdlet didn’t work. Dang. But this is a useful opportunity to cover some debugging techniques! I’ve got a lot of places where things COULD be going wrong. When I run Ping-Computer, no matter what name I provide, I get no output – no result at all. That’s bad. So, I want to change something to see what the problem is. I want to change the cmdlet so that, no matter WHAT happens, SOME output gets created. Here’s my code revision:

Read More

UNAVAILABLE??

As of this morning, Amazon.com is listing Windows PowerShell: TFM as unavailable. Fret not: What probably happened is they maxed out the number of pre-orders they were willing to take, and cut off further orders. You can place an order at www.ScriptingOutpost.com, and the good news is that the books started shipping today! Amazon.com should be filling their orders …

Read More

PowerQuest: The Windows PowerShell Game

Okay… I got a little creative over the holidays. Anyone rememebr the old, old, text-based computer adventure game, “Collosal Caves?” Well, I’ve created a Windows PowerShell-based “homage” to that original game. It’s packaged as a PowerShell snap-in, meaning you play by running cmdlets in PowerShell. It’s in the attached ZIP file, along with instructions.

I want to stress that this …

Read More

Cell Phones and Worker Productivity

A guy in a movie theater answers his cell phone. Can you feel the rant coming? Here’s another off-topic, gadget-related post for you to enjoy.

 

Several people complained immediately, and good for them: The movie is something we all paid to enjoy, and this guy is devaluing our purchase by carrying on a conversation. ?It?s work!? he defends himself, …

Read More

Execute! II

Happy New Year!

When last we spoke, I’d given you some code that doesn’t work quite right:

Const pi = 3.1416
WScript.Echo Main()
Function Main()
 Const r = 2.5
 Dim result
 Dim str
 str = “result=pi*(r*r)”
 ExecuteGlobal str
 Main = result
End Function

Did you see why? ExecuteGlobal is executing the contents of variable str in the global scope. However, …

Read More

Write Scripts – Win Prizes! Including a pass to TechEd 2007!

ScriptingAnswers.com and SAPIEN Technologies announce the ScriptingAnswers.com Automation Challenge 2007! This is your chance to submit your Windows administrative scripts – in any Windows-based scripting language – and win some great prizes.

All your script needs to do is accomplish some Windows administrative task. Our contest page at www.ScriptingAnswers.com/contest.asp includes some tips for writing the best script possible (one sure …

Read More

Write Scripts… Win Prizes

ScriptingAnswers.com is announcing its 2007 Automation Challenge! Details are at www.ScriptingAnswers.com/contest.asp; all you have to do is submit one or two of your best Windows automation scripts, written in VBScript, Windows PowerShell, Batch/CMD, KiXtart, JScript, or whatever. You could win a copy of Windows PowerShell: TFM, PrimalScript 4 Enterprise, a ScriptingAnswers.com University Class-On-Disc, or one of our grand prizes: …

Read More

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard