Welcome to TechNet Blogs Sign in | Join | Help

Browse by Tags

All Tags » Powershell   (RSS)

How to Pretty Print XML from PowerShell, and output UTF, ANSI and other non-unicode formats

PowerShell has been taking more than its fair share of my time of late and I need redress the balance a bit – just not quite yet. Powershell and redirection. I’ve been working on my hyper-V library for codeplex and this has separate files for every command,
Posted by jamesone | 1 Comments
Filed under:

“Vague is good” revisited: How to make usable PowerShell Functions

Before Christmas I wrote about the conclusion I was forming on PowerShell parameters: Vague is good . The Christmas season is when my parents used to get various kinds of puzzles out and most of my puzzles these day seem to be PowerShell type things rather
Posted by jamesone | 0 Comments
Filed under:

The “Joy” of Reg-ex part 3: Select-String

One of the PowerShell tools I’ve been using a lot recently is Select-String : Going through lots of files trying to find a mistake I know is in several of them – can just bang in select-string -SimpleMatch "Split-path" -Path *.ps1 –list | edit
Posted by jamesone | 0 Comments
Filed under:

The “Joy” of Reg-ex part 2 – ways I use it

In the previous post I gave some of the background to regular expression and how they might be used. I thought I’d give a few examples. 1. Checking paths. Quite a few of my functions take paths to Hyper-V virtual hard disk files as parameters and I don’t
Posted by jamesone | 0 Comments
Filed under:

The “joy” of Reg-ex part 1.

One of the good things in PowerShell is support for regular expressions – in fact I suspect some Unix sys-admins might laugh their Windows counterparts for not got to grips regular expressions sooner. The downside is that regular expressions are an area
Posted by jamesone | 0 Comments
Filed under:

Powershell Parameters 2: common parameters.

In the previous post I talked about the template I have for many of my PowerShell functions. And I've talked before about adding support for ShouldProcess to functions which change the state of the system ( that allows –confirm, -prompt, –whatif and –verbose
Posted by jamesone | 0 Comments
Filed under:

Parameters in PowerShell functions: vague is good.

There is a theme which I’ve found has come up in several places with PowerShell. Giving flexibility to the user can mean being vague about parameters – or at least not being excessively precise. Consider these examples from my Hyper-V library for PowerShell
Posted by jamesone | 0 Comments
Filed under:

Drilling into ‘reasons for not switching to Hyper-V’

Information week published an article last week “ 9 Reasons why enterprises shouldn’t switch to hyper-v”. The Author is Elias Khnaser, this is his website and this is the company he works for .  A few people have taken him to task over it, including

Add-ons and plug-ins – do you have a favourite ?

I was chatting with a couple of colleagues yesterday about internet explorer. Someone grumbled “When people think of browser add-ons they automatically think of firefox, but there are some really good ones for IE”. I have talked in the past about IE7

Get-Scripting podcast

I was pleased to get asked to record a Podcast with Jonathan and Alan to become episode 14 of their get-scripting series. To be honest to be asked to sit and chat about PowerShell with these guys – especially when they invite someone like Thomas Lee to
Posted by jamesone | 0 Comments
Filed under:

Announcing the PowerShell Configurator.

For a little while I have had a beta version of a project I call PSCONFIG on codeplex. I’ve changed a couple of things but from the people who have given it a try, it seems that it is working pretty well. It’s aimed at servers running either Hyper-V server

Making word clouds (Part 2: how to use it , and clouds from twitter).

Attached to this post is a Zip file containing Twitter.ps1 the PowerShell script I use to get information from Twitter, and since the word cloud work grew out of that it has ended up in the same file. It also contains noise.dat the list of noise words
Posted by jamesone | 0 Comments
Attachment(s): Word-Clouds.zip

Making Word clouds (Part 1: how it works).

I’ve been playing with word clouds on and off for the last couple of months, and finally I’ve decided the time has come to share what I have been doing. Word clouds turn up in all sorts of places, and I wanted to produce something which could take any

On PowerShell function design: vague can be good.

There is a problem which comes up in several places in PowerShell – that is helping the user by being vague about parameter types. Consider these examples from my Hyper-V library for PowerShell 1. The user can specify a machine using a string which contains
Posted by jamesone | 0 Comments

PowerShell on-line help: A change you should make for V2 (#3) (and How to Author MAML help files for PowerShell)

In the last could of “change you should make” posts I’ve talked about a couple of things which turn Functions from being the poor-relation of compiled Cmdlets (as they were in PowerShell V1) to first class citizens, under V2. Originally the term “Script
Posted by jamesone | 0 Comments
Filed under: ,

Attachment(s): PSH-Help.xsn
More Posts Next page »
 
Page view tracker