header image

Archive for November, 2008

Open a CSV

Posted by: | November 30, 2008 | No Comment |

PowerShell has great functionality for working with csv files.  They make an excellent way of saving information generated by PowerShell – for instance Get-Process | Export-Csv data.csv -NoTypeInformation Having created a csv file how can we read it?  It is possible to use Notepad but then the columns are not padded to the same width […]

under: PowerShell original

Scripting and automation

Posted by: | November 30, 2008 | No Comment |

Is there a difference between scripting and automation.  According to Dan http://blogs.msdn.com/dtjones/archive/2008/11/23/scripting-dba-actions.aspx  the answer is yes.   Scripting means you perform a task programmatically using a scripting language (PowerShell I hope).  Automation means that the script is automatically initiated as a scheduled task or a SQL Server job etc. A quick search shows a number of […]

under: Scripting

get-scripting podcast 5

Posted by: | November 27, 2008 | No Comment |

Want to learn more about how PowerGUI came about and where its going – then listen to the latest get-scripting podcast at http://get-scripting.blogspot.com/2008/11/get-scripting-podcast-episode-5-dmitry.html     Share this post :   Technorati Tags: PowerShell,podcast

under: PowerShell original

Hexadecimal

Posted by: | November 26, 2008 | No Comment |

I was working with an Exchange 2007 system today – using Get-StorageGroupCopyStatus.  One of the things I was interested in was the logs that had been generated, replicated and replayed.  Exchange 2007 uses 1 MB log files and the file names are based on incrementing numbers – hexadecimal numbers (base 16). Unfortunately Get-StorageCopyStatus reports the […]

under: PowerShell original

Testing AD existence

Posted by: | November 25, 2008 | No Comment |

Another question from the webcast concerned testing for the existence of an OU if you know its distinguished name.  It turns out that the System.DirectoryServices.DirectoryEntry class has an Exits method that can be used for testing in this way. One thing to be careful of is that it is a static method so you don’t […]

under: PowerShell and Active Directory

PowerShell and DHCP

Posted by: | November 25, 2008 | No Comment |

One of the questions on the AD webcast I’ve just finished was about administering DHCP with PowerShell.  As far as I am aware there isn’t an interface available through .NET, WMI or COM that enables us to administer DHCP servers through PowerShell. If you know differently I would be grateful for some examples and pointers […]

under: PowerShell original

Tee-Object

Posted by: | November 25, 2008 | No Comment |

In my post on PowerShell Objects –  http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!1875.entry – I mentioned Tee-Object and gave an example.  Mats left me a message asking why Tee and asking did it mean temporary. I had always looked at it as a branching – much like a T join in pipes. The help file says "The Tee-Object cmdlet send […]

under: PowerShell original

Correction

Posted by: | November 24, 2008 | No Comment |

The regular expressions in my previous post should have been PS> "Richard" -match "R.*True PS> "Richard" -match "[A-Z].*"True PS> "Richard" -match "[R][ic]+.*"True The * of a wildcard has to be replaced by .* which means any character except a new line any number of times including zero. Thanks to Jaykul for pointing out the error […]

under: PowerShell original

Regular Expressions

Posted by: | November 24, 2008 | No Comment |

Lets start with confession time. Regular expressions are something I have tended to avoid like the plague.  Why? I suppose its because I’ve never taken the time to understand them. Having seen some of the powerful things that can be done with them (and the fact that I’ve promised to talk about them at a […]

under: PowerShell original

Discovering PowerShell

Posted by: | November 23, 2008 | No Comment |

When I’m talking, or writing, about PowerShell I often refer to your four friends when you are first learning PowerShell.  These are: get-help get-member get-command get-psdrive Between them you can discover a vast amount of information about how PowerShell works.  if you are new to PowerShell I would strongly recommend getting to know these four […]

under: PowerShell original

Older Posts »

Categories