As a follow-up to our Advanced PowerShell Functions: Begin to Process to End article, the following article will dive deeper into the CmdletBinding attribute.
Let’s start with defining a function:
Function Test-ScriptBlock
{
[CmdletBinding()]
Param
(
[Parameter(ValueFromPipeline)]
[int[]]
$Numbers…
Read More
Crash bugs are generally spectacular; your application just—poof—vanishes! Or it shows error messages from the OS in foreign languages or with some indecipherable codes. Or maybe it generates 17 entries in the Windows application log. In the worst cases, it…
Read More
A few days ago I went over the PowerShell oneliner from SAPIEN’s March ’09 newsletter. I suggested using it in a scriptblock to save typing. Another possibility is to turn it into a function. Even better would be a function…
Read More
There’s been some discussion lately in the SAPIEN product forums about PrimalForms and timers. As you know, PowerShell v1.0 is essentially single-threaded. This generally means that timers and asynchronous code won’t work. But you can use a simple timer in…
Read More