PowerShell Team

Automating the world one-liner at a time…

Latest posts

Jun 28, 2007
Post comments count 0
Post likes count 0

Heterogeneous Job Scheduling With PowerShell

Steve Lee

JAMS (Job Access & Management System) is a commercial software product that provides job scheduling for Windows, OpenVMS, UNIX and Linux systems. It now provides full PowerShell support. What does that mean? They say that they support PowerShell in three ways: JAMS-specific PowerShell host to tightly control scripts under JAMs. I don't know what they are doing specifically but it makes sense that a job scheduler could provide a lot more control over the execution if it hosted the PowerShell engine directly. JAMS commands to control QUEUES, ENTRYs, VARIABLES, TRIGGERS, TIMEs etc. They did a good job adhering to ...

Jun 28, 2007
Post comments count 0
Post likes count 0

Heterogeneous Job Scheduling With PowerShell

Steve Lee

JAMS (Job Access & Management System) is a commercial software product that provides job scheduling for Windows, OpenVMS, UNIX and Linux systems. It now provides full PowerShell support. What does that mean? They say that they support PowerShell in three ways: JAMS-specific PowerShell host to tightly control scripts under JAMs. I don't know what they are doing specifically but it makes sense that a job scheduler could provide a lot more control over the execution if it hosted the PowerShell engine directly. JAMS commands to control QUEUES, ENTRYs, VARIABLES, TRIGGERS, TIMEs etc. They did a good job adhering to ...

Jun 28, 2007
Post comments count 0
Post likes count 0

Partying with Join-Path

Steve Lee

Did you realize that you can Join-Path can work on multiple items? PS> Get-Help Join-Path -parameter *path -path Specifies the main path (or paths) to which the child-path is appended. Wildcards are permitted. The value of Path determines which provider joins the paths and adds th e path delimiters. The Path parameter is required, although the paramet er name (-path) is optional. Required? true Position? 1 Default value N/A - The path must be specified Accept pipeline input? true (ByValue, ByPropertyName) Accept wildcard characters? true -childPath Specifies the elements to append to the...

Jun 27, 2007
Post comments count 0
Post likes count 0

Hosting Windows PowerShell Part 2 of 3

Steve Lee

David Aiken is at it again. In his latest segment of the DFO show – Hosting Windows PowerShell Part 2, he converts the code he produced in Part 1 to use strong types by casting the PSObject.BaseObject. From there, he add the ability to select one the SERVICEs he displays and then to Stop it using the Stop-Service cmdlet. In Part 1, he showed how you can pass in a string and run it. Here he shows how you can create a Command object and programmatically add parameters to it and then execute that command in a pipeline. He then shows how the program will break if the command or script you run tries to interact with ...

Jun 26, 2007
Post comments count 0
Post likes count 0

Surfing the Web the PowerShell Way

Steve Lee

I spend a lot of my time in the command line (surprised?). That said, I also spend a lot of time surfing the web. Here is a script that I wrote that lets me surf the web from PowerShell: UrlTemplateMap = @{ "bs" = "http://blogsearch.google.com/blogsearch?hl=en&q={0}&ie=UTF-8&scoring=d" "dr" = "http://drudgereport.com" "gtr" = "http://www.google.com/language_tools?hl=en" # GOOGLE TRANSLATE "verb" = "http://msdn2.microsoft.com/en-us/library/ms714428.aspx" "v" = "http://msdn2.microsoft.com/en-us/library/ms714428.aspx" "ps" = "http://blogs.msdn.com/powershell/default.aspx" } $Script:OutIE = $Null function O...

Jun 26, 2007
Post comments count 0
Post likes count 0

Why Isn’t PowerShell.exe Authenticode Signed?

Steve Lee

This question came up on our internal forum last week, and Jeffrey, knowing of my sharp wit and keen hand for prose, asked me to blog about the answer. So here goes: It is Authenticode signed. Just in a special way. The Windows PowerShell update packages each contain a catalog (.cat) file, which has a list of files in the package and a hash of each file. Since the .cat file is Authenticode signed, the chain of trust can be verified by checking the signature on the .cat file, then comparing the hash the catalog lists for PowerShell.exe to a newly computed hash of PowerShell.exe. If the signature is valid and...

Jun 24, 2007
Post comments count 0
Post likes count 0

VBScript -> PowerShell

Steve Lee

Are you a VBscripter in the process of becoming a PowerShell scripter? Once you become a PowerShell scripter, you'll find incredible gains in productivity but first you have to becoming a PowerShell scripter. There are a few things that can help. First and foremost is PowerShell's interactive nature. This allows you to quickly and easily experiment, fumble around, see what works, and then turn it into a script. But what about when your brain just "thinks VBscript"? There are a number of documentation approaches that help with this. The scripting guys over at ScriptCenter wrote the Converting VBScript Commands t...

Jun 23, 2007
Post comments count 0
Post likes count 0

Even More PowerShell Training

Steve Lee

The 2 day course PYGPOWER – PowerShell for Administrators is being offered in London by Pygmalion. I've been told by a couple of sources that the European demand for PowerShell training is huge – even more so than in the US. I would love to hear any theories about why this is so. With that, I'll have to tell you one of my favorite jokes. Q: What's the difference between Europe and America? A: In Europe, they think a 100 miles is a long distance,. In America, they think a 100 years is a long time. This is funny because it is so true. Cheers! Jeffrey Snover [MSFT] Windows Management Partner Architect Vi...

Jun 23, 2007
Post comments count 0
Post likes count 0

PowerShell Community Extensions (PSCX) V1.1.1

Steve Lee

Keith Hill reports in his blog HERE , that the PowerShell Community Extensions project has release Version 1.1.1. If you aren't already turned on to PSCX, this is a good time to start. This is a maintenance release which resolves 30 issues but it also adds 5 new features. I'm going to include their Help topic below so you can get a feel for what it does. I think most people will find something there that will tempt them. One thing to note, when you dot-source PSCX's profile, it customizes your environment to a pretty extensive degree. If you already have some customizations that you like (like your own prompt),...