Showing results for 2006 - Page 20 of 21 - PowerShell Team

Apr 25, 2006
Post comments count0
Post likes count0

Using-Culture -Culture culture -Script {scriptblock}

PowerShell Team
PowerShell Team

One of the traditional challenges with scripting is dealing with different CULTURES.  Imagine the case where you are writing a script and you'll have to parse datetime string from different cultures.  If it was just one culture, you could set the process culture and be done with it.  Here is a function that allows you to run ...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 7 (Final): How Traps Work

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 6: Trace-Expression, Breakpoint Script

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 5: Preferences and Commandline Options

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 4: set-mshdebug

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 3: Write-Host

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 2: $error

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and ...

Apr 25, 2006
Post comments count0
Post likes count0

Debugging Monad Scripts, Part 1: Teminating vs. Non-Terminating, ErrorRecord

PowerShell Team
PowerShell Team

Did your command or script fail and/or report an error?  We hope to have a proper script debugger in a future version, but until then, MSH has some handy features to help you figure out what went wrong.  In this series of blog entries, I will present some of those features.  Thanks to Jim Truher [MSFT], Bruce Payette [MSFT], and J...

Apr 25, 2006
Post comments count0
Post likes count0

Image Conversion

PowerShell Team
PowerShell Team

  I needed to convert some images from bmp to gif for a web site I've been working on.  I figured that I could script this pretty easy - here's what I came up with.  It's a little more general than I needed, and I thought it might be useful to others.  Anyway, it's useful to me.      # Convert one graphic imag...

Apr 25, 2006
Post comments count0
Post likes count0

Duplicate Files 2

PowerShell Team
PowerShell Team

A long time ago I posted a filter (AddNote) for adding notes to objects.  Some time later I posted a function (Get-MD5) for calculating the MD5 hash of a file and somebody asked how that could be used in a script to list all the files in a given folder that are very likely the same.  I like that question because the answer it allows me...