header image

Archive for April, 2010

The Scripting Games are almost upon us but this year there is a slight change for me.  I’m not going to be taking part. Oh no you lucky people I’m going to be a judge – he he he – even more of an insane cackle than usual. I will expect a superior standard in […]

under: PowerShellV2

Summing and counting

Posted by: | April 23, 2010 | No Comment |

One problem that seems to keep arising is counting the number of records in a file and summing the contents of one or more files.  If we start with a couple of files: test.txt Green,123.45 Brown,456.77 Black,890.12 White,679.43 and test.csv Name,Amount Green,123.45 Brown,456.77 Black,890.12 White,679.43 The only difference is that the csv file has a […]

under: PowerShellV2

WMI posts

Posted by: | April 22, 2010 | No Comment |

Couple of WMI based posts you may be interested in:   Finding the current logged on user http://itknowledgeexchange.techtarget.com/powershell/current-logged-on-user/   and the Windows System Assessment Tool http://itknowledgeexchange.techtarget.com/powershell/windows-system-assessment-tool/ Technorati Tags: PowerShell,WMI

under: PowerShell and WMI, PowerShellV2

You are unique

Posted by: | April 21, 2010 | No Comment |

Lets start with some data $data =@(1,1,1,1,12,23,4,5,4643,5,3,3,3,3,3,3,37,7,7,8,9,9,0,0,12) We now want to select the unique values out of this list if I’ve wanted only the unique values I’ve tended to do this $data | select –Unique   there are other options. If you want the output sorted you may be tempted by $data | sort | […]

under: PowerShell original, PowerShellV2

This years Scripting Games start next week – Monday 26 April 2010 – see http://blogs.technet.com/heyscriptingguy/archive/2010/04/05/2010-scripting-games-all-links-on-one-page.aspx Technorati Tags: PowerShell,Scripting Games 2010

under: PowerShellV2

Thanks to everyone who came on to the Live Meeting tonight.  For anyone who missed it: The slides and demo are available on my sky drive at http://cid-43cfa46a74cf3e96.skydrive.live.com/browse.aspx/PowerShell%20User%20Group/April%202010 The recording of the meeting is available from Richard Siddaway has invited you to view a Microsoft Office Live Meeting recording. View Recording Recording Details     Subject: […]

under: Modules, PowerShell User Group, PowerShellV2

PowerShell on Bing

Posted by: | April 19, 2010 | No Comment |

The PowerShell team blogged about a new visual search capability for Powershell help care of Bing http://blogs.msdn.com/powershell/archive/2010/04/19/windows-powershell-in-bing-visual-search.aspx Couple of points – make sure that you are looking at the US version of Bing – it doesn’t show in others (at least it doesn’t in the UK version)   – click on the country name at […]

under: PowerShellV2

UG Reminder

Posted by: | April 19, 2010 | No Comment |

The PowerShell UG Live Meeting is tomorrow night (20 April) at 7.30pm BST.  Subject is modules. Details from http://msmvps.com/blogs/richardsiddaway/archive/2010/04/12/powershell-user-group-live-meeting-modules.aspx Technorati Tags: PowerShell,User group,Modules

under: Modules, PowerShell User Group, PowerShellV2

Lets start looking at validation of parameter values. We have a few options to try   [ValidateCount(1,n)]    [ValidateLength(1,m)]    [ValidatePattern("[A-Z][A-Z]A-Z][0-9]")]    [ValidateRange(0,10)]    [ValidateScript({$_ -lt 4})]    [ValidateSet("red","blue","green")]    [ValidateNotNull()]    [ValidateNotNullOrEmpty()]   lets start with validating a range of values 001 002 003 004 005 006 007 008 function test1 {     param (         [int] […]

under: PowerShellV2

IE History

Posted by: | April 13, 2010 | 3 Comments |

Saw a post on the forums that looked interesting. Problem Convert  this VBScript into PowerShell 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 […]

under: PowerShellV2, Windows 7

« Newer Posts - Older Posts »