header image

Archive for March, 2009

Measure-Command

Posted by: | March 31, 2009 | No Comment |

Working on a script to compare two lists of computer names (plus some other stuff) I wasn’t happy with the performance I was getting from my first try.  I started to experiment but needed to measure the time the scripts took.  Enter Measure-Command. Measure-Comand {./script.ps1} Output is a timespan object that gives the total execution […]

under: PowerShellV2

PowerShell uses

Posted by: | March 31, 2009 | No Comment |

Normally we think of using PowerShell to perform admin tasks – creating users in AD etc – using cmdlets or scripts.  I have found myself using it for other tasks – searching through dumps of ipconfig listsing to get IP addresses; matching two lists of computer names to find discrepancies   PowerShell is a powerful […]

under: PowerShell original

ZZZZZZZZZZ

Posted by: | March 30, 2009 | No Comment |

One thing I didn’t really take much notice of was the difference is spelling between English english and US english.  I have read so many technology and science books (nearly all published in the USA) that I just accepted the differences.   Until I come to write against a template based on US English where anything ending […]

under: Uncategorized

Computer cmdlets

Posted by: | March 30, 2009 | No Comment |

I was digging into some aspects of Exchange 2007 yesterday for Chapter 12 of my book (Chapter 11 is finished and will be on MEAP soon)  and needed to restart some of the VMs I was using.  I remembered the restart-computer that comes with V2.  It saved some time compared to logging into the offending […]

under: PowerShellV2

SQLPSX 1.5

Posted by: | March 28, 2009 | No Comment |

If you use PowerShell and SQL Server you should at the very least look at SQLPSX which is a big library of PowerShell functionality.  Version 1.5 has just been released.  See http://chadwickmiller.spaces.live.com/blog/cns!EA42395138308430!315.entry for details   Technorati Tags: PowerShell,SQL Server

under: PowerShell and SQL Server

Test folders

Posted by: | March 28, 2009 | No Comment |

I needed some test folders in a hurry.  They didn’t have to have anything in them – just exist as a set of folders for me to work with. From the PowerShell prompt 1..20 | foreach {md "test$_"} How easy is that.  Twenty folders in the time it would take me to open Windows explorer.  […]

under: PowerShell original

The original AD cookbook by Robbie Allen was published back in 2003. It has been one of my favourite, and most referenced, books.  When I used to use VBScript (shudder) it was indispensible and saved me vast amounts of time.  One AD implementation I did we created the whole AD structure – OUs, Sites, Subnets, […]

under: PowerShell and Active Directory

Microsoft have added PowerShell v1.0 as an optional update that is available through the update mechanisms. PowerShell 1.0 through MU is only offered: As an optional update If you don’t have any other version of PowerShell installed (including V2 CTPs) on your machine .NET 2.0 is installed on the machine OS is one of: XP-SP3, […]

under: PowerShell original

Quest AD cmdlets

Posted by: | March 25, 2009 | No Comment |

If you have followed this blog over any period of time you will know that I am a big fan of the Quest AD cmdlets.  The good news is that version 1.2 of the cmlets has gone RTM.  The bad news is that it won’t be available for a little while yet.  The major details […]

under: PowerShell and Active Directory

Its all in context

Posted by: | March 24, 2009 | No Comment |

I spent part of this afternoon using select-string to track down where particular settings occur in GPOs.  Use the SDM GPMC cmdlets to dump the settings to xml and then use select-string on the xml.  So much easier than wading through the GUI. In PowerShell v1 select-string returned the line containing the text we are […]

under: PowerShellV2

Older Posts »

Categories