PowerShell Team

Automating the world one-liner at a time…

Mandelbrot One-liner

WaiKin Wong sent me a Mandelbrot one-liner: $i=$j=$r=$x=$y=[float]-16; while(($y++) -lt 15) {for($x=0; ($x++) -lt 84; write-host (" .:-;!/>`)|&IH%*#"[$k -band 15]) -nonewline){$i=$k=$r=[float]0;do{$j=$r*$r-$i*$i-2+$x/25;$i=2*$r*$i+$y/10;$r=$j} while (($j*$j+$i*$i) -lt 11 -band ($k++) -lt 111)}" "} This produces the following results...

Editing your Profile file

$hay has a new scripting blog at http://scriptolog.blogspot.com/ .  His first blog entry Restart your engine - The PowerShell Way, talks about how he frequently edits his PowerShell profile file and then restarts his session.  In his directions he says: 2: type: Notepad $profile to open your profile file I looked at this and...

PowerShell Essentials Package

A number of people have asked me about PowerShell IDEs and about how to get started with PowerShell.  Here is something to consider - Sapien is offering a special price on a package of components focused on PowerShell.  The package includes Tools (PrimalScript Professional), Snippets (reusable PowerShell code segments), and ...

Resolve to blog your automation

In response to my entry Philosophy of Automation, Tim Long blogged a response where he advanced the idea that people should make a New Year's Resolution to start a blog (if you have already).  That is a great idea.  I would follow on and further encourage you to set up a system to remind yourself at least once a week to make a blog ...

Send-SignatureToClipBoard

In my previous blog about the Philosophy of Automation, I encouraged everyone to share their automation even when it was small.  Here I'll follow that advice. I find myself doing quite a bit of blogging and commenting on other people's blogs.  I am often struck by the sorry state of blogging software.  I could go on for ...

Philosophy of Automation

 In my previous post about Boolean Values And Operators I made the following point: "PowerShell has a rich notion of TRUE/FALSE because it dramatically reduces the overhead and junk that you need to deal with when doing your work."  This philosophy flows from Whitehead's observation:   Civilization advances by extending the ...

Boolean Values and Operators

John Smith asked what TRUE and FALSE were in PowerShell on our newsgroup Microsoft.Public.Windows.PowerShell.   The simple answer to this is $TRUE and $FALSE but the complete answer is a richer.  PowerShell has a very rich notion of TRUE and FALSE.  The best way to explain it is to show it.  PS>  function...

Jingle

As an attempt to spread some holiday joy, Satish Mathew and I wrote the following script.  Hope you enjoy it!  - Marcel Ortiz  ######################################################################################## $notes = write-output `  4A4 4A4 2A4        4A4 4A4 2A4  &...

Apologizes for delays in approving comments

We had a bad windstorm here and most people have been without power since Thursday night.  Microsoft was closed on Friday and power got restored sometime during the weekend.  Jeffrey Snover [MSFT]Windows PowerShell/Aspen ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit ...

ConfirmPreference

With Windows PowerShell you can specify -CONFIRM on commands that have a side-effect on the system and it will ask you whether to perfmon the action or not.  e.g. PS> Stop-Process 7004 -Confirm ConfirmAre you sure you want to perform this action?Performing operation "Stop-Process" on Target "calc (7004)".[Y] Yes  [A] Yes to All&...