header image

Archive for February, 2009

When you start learning PowerShell you will find that it has a massive amount of self discovery built into the system. There are four cmdlets you find yourself using all of the time: Get-Help Get-Command Get-Member Get-PSDrive Oh.  You want to know what they do – try this 001 "get-help", "get-command", "get-member", "get-psdrive" |  foreach { Get-Help $_ | select Name, Synopsis | Format-List} OK this is playing […]

under: PowerShell original

UK PowerShell UG meetings

Posted by: | February 18, 2009 | No Comment |

Speakers for the next two meetings have been finalised. In March we will be bringing you: Jonathan Medd on the AD cmdlets in Windows Server 2008 R2 Alan Renouf on VMWare’s VI toolkit plus there will be an introduction to Regular Expressions in PowerShell   In May (date tba in week of May 18-21) Dmitry […]

under: PowerShell User Group

Learning PowerShell

Posted by: | February 17, 2009 | No Comment |

One of the subjects that came up at the PowerShell event last week was how do you go about learning PowerShell. If I was starting from scratch there are a number of things I would do: Download and install PowerShell  – use a test environment. Read the documentation that comes with PowerShell The Getting Started […]

under: PowerShell original

Common parameters

Posted by: | February 16, 2009 | No Comment |

I’ve been looking at the get-diskfreespace function over a number of posts. We’ve been looking a mixture of turning it into a production script and adding the advanced functionality from PowerShell v2.  In this post http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2005 we added the [CmdletBinding()] parameter As soon as we add this parameter we get a whole bunch of functionality […]

under: PowerShellV2

In this post – http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2025 – I mentioned I had been experimenting with the copy script functionality so that I would get colour copy\paste from PowerShell ISE.  There was a problem in that I couldn’t paste into Live Writer – it crashed. Lee Holmes has re-written the script –http://www.leeholmes.com/blog/MorePowerShellSyntaxHighlighting.aspx One slight issue is that you […]

under: Uncategorized

Enter the Clones

Posted by: | February 15, 2009 | No Comment |

Following my comments about PowerShell being designed for the Jedi – http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2066 – I discovered the Clones are now getting into the action – http://www.leeholmes.com/blog/MakingPerfectChangeWithTheFewestCoins.aspx Lee (of Cookbook fame) has a very nice script for working out the smallest number of coins needed to make perfect change ie meet the price without needing change back. […]

under: PowerShell original

Cultured Dates

Posted by: | February 15, 2009 | No Comment |

In this post – http://richardsiddaway.spaces.live.com/default.aspx?_c01_BlogPart=blogentry&_c=BlogPart&handle=cns!43CFA46A74CF3E96!2007 – I talked about the way date strings had to be formatted when we were creating datetime objects – [datetime]”mm/dd/yyyyy” I have since discovered its a little bit more complicated than that.  If we start by examining the culture on my machine. PS> $host | Select *culture | fl CurrentCulture   […]

under: PowerShell original

Machine UpTime

Posted by: | February 14, 2009 | No Comment |

The February copy of TechNet magazine dropped through the letter box this morning. In the UK we get our own version so some of this may be a bit older than this months edition.  There is a nice article by Marco Shaw on using PowerShell with System Center Operations Manager that is well worth reading. […]

under: PowerShell v2

It just has to be.  Do you know how many cmdlets use the force?  In CTP 3 try get-help * -Parameter Force   Technorati Tags: PowerShell,Jedi

under: PowerShellV2

Friday 13th

Posted by: | February 13, 2009 | No Comment |

As today is Friday 13th with all of the implications that holds – who me superstitious? – I thought I would find out other days of the year I needed to hibernate function fri13 {param ($year)    for ($m=1; $m -le 12; $m++) {        $d = [datetime]"$m/13/$year"        if ($d.DayOfWeek -eq "Friday"){            $d.ToLongDateString()        }    }} The function takes a year as the parameter and iterates through the months building dates for the 13th of each month. Remember that […]

under: PowerShell original

« Newer Posts - Older Posts »

Categories