Monthly Archives: September 2009

Word module

I’ve posted a PowerShell module that includes the functions in earlier posts to my skydrive  –   http://cid-43cfa46a74cf3e96.skydrive.live.com/browse.aspx/PowerShell%20Scripts Enjoy Technorati Tags: PowerShell v2,Word,Module Advertisements

Posted in PowerShell V2 | Leave a comment

Unblocking files

When I download files from the Internet to Vista or Windows 7 the file is blocked and I can’t execute it until its unblocked. This is especially annoying with zip files because if I unzip them all the contents are … Continue reading

Posted in PowerShell V2 | 3 Comments

Codeplex AD Replication Module

The other codeplex project that caught my eye was a brand new one to create a PowerShell module to manage AD replication.  This one will be very useful and one I will be using a lot. There is still time … Continue reading

Posted in PowerShell and Active Directory | Leave a comment

Codeplex PowerShell Configurator

I was looking at codeplex (Microsoft’s Open Source site) and decided to do a search for projects relating to PowerShell. 161 projects were returned.  The first 110 had an obvious PowerShell connection.  This is a tremendous number and really does … Continue reading

Posted in PowerShell V2 | Leave a comment

Word Add text

Keeping on with our look at Word we need to able to add text to the documents we are creating. 001002003004005006007008009010011 function Add-Text {    param (        [string] $style = "Normal",        [string] $text     )    $global:paragraph = $doc.Content.Paragraphs.Add()    $range = $paragraph.Range    $Paragraph.Range.Text = $Text    $Paragraph.Range.Style = $Style    $Paragraph.Range.InsertParagraphAfter()}   Add a paragraph then set the style and … Continue reading

Posted in PowerShell V2 | Leave a comment

Word add data to a table

We created a table in a recent post.  This time round we add some data to the table.   001002003004005006007008009 function Add-TableData {    param (        [int] $row = 1,        [int] $col = 1,        [string] $text    )    $table.Cell($row,$col).Range.Text = $text    }   The row and column together with the text to enter into … Continue reading

Posted in PowerShell V2 | Leave a comment

Module Contents

I’ve been writing a few modules recently and sometimes forget what I have in each module. Simple way to view the functions each module makes available. 001002003004005006007 Clear-HostGet-Module -ListAvailable | foreach {    Import-Module $_.Name    Get-Command -Module $_.Name | Select Module, Name    Remove-Module $_.Name    ""}   List the available modules and for each … Continue reading

Posted in PowerShell V2 | Leave a comment