Showing results for December 2006 - Page 2 of 3 - PowerShell Team

Dec 25, 2006
0
0

Philosophy of Automation

PowerShell Team
PowerShell Team

 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 number ...

Dec 24, 2006
1
0

Boolean Values and Operators

PowerShell Team
PowerShell Team

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 test...

Dec 21, 2006
0
0

Jingle

PowerShell Team
PowerShell Team

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   ...

Dec 18, 2006
0
0

Apologizes for delays in approving comments

PowerShell Team
PowerShell Team

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 the W...

Dec 14, 2006
0
0

ConfirmPreference

PowerShell Team
PowerShell Team

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  [...

Dec 14, 2006
0
0

KB: 1024 vs 1000

PowerShell Team
PowerShell Team

I love the fact that we designed PowerShell for Admins and IT Pros and love to demonstrate what that means.  Often I'll demo PowerShell and show how you can use "KB", "MB", and "GB" as I did in my previous blog entry: PS> 1kb1024PS> 1mb1048576PS> 1gb1073741824PS> 1kb+2mb+3gb3223323648 Almost uniformly, the crowds LOVE this but...

Dec 14, 2006
0
0

File Aging Script

PowerShell Team
PowerShell Team

Jeffery Hicks as a very nice File Aging script.  The thing that Iike about it is that it provides a very good illustration of how to use a number of PowerShell features including: He had one technique that could be improved.  Here is a line from the script:  $GrandTotal="{0:N2}" -f ($GrandTotal/1048576) The question is, what i...

Dec 13, 2006
0
0

[SWITCH]

PowerShell Team
PowerShell Team

Here is a pointer to a good demonstration of PowerShell's [SWITCH] datatype: http://msgoodies.blogspot.com/2006/12/negating-powershell-switch-parameters.html Jeffrey Snover [MSFT]Windows PowerShell/MMC ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:&...

Dec 11, 2006
0
0

$OutputEncoding to the rescue

PowerShell Team
PowerShell Team

You might have noticed that “findstr” does not work properly with non-English text in PowerShell. For example: Let’s create a text file with some Chinese characters in it. PS C:\> ${c:\test.txt}="中文" Try to use findstr to find  one of the Chinese characters, and it did not find anything. PS C:\> Get-Content test.txt | findstr /c:中 The sa...

Dec 10, 2006
0
0

Windows PowerShell SDK

PowerShell Team
PowerShell Team

Windows PowerShell Software Development Kit (SDK) is now available as part of Microsoft Windows SDK for Windows Vista. Microsoft Windows SDK can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en Windows PowerShell SDK contains: The documentation can also be foun...

DOCUMENTATION