Browse by Tags

All Tags » PowerShell V2 (RSS)

Multiple test files

Back here http://msmvps.com/blogs/richardsiddaway/archive/2009/11/05/creating-temporary-files.aspx or http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2595.entry I showed how to create temporary test files. We can simply create multiple...
Posted by RichardSiddaway | with no comments

PowerShell WMI events

In my previous post ( http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2598.entry   or http://richardsiddaway.spaces.live.com/blog/cns!43CFA46A74CF3E96!2598.entry ) I started to look at WMI events in PowerShell v2.  The win32_process...

PowerShell Eventing

This isn’t the latest sport added for the 2012 Olympics but a way to dig deeper into what is happening on your machine.  There is a continuous stream of events occurring on a computer – programs stop or start, files open or close etc etc.  Some...

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
Posted by RichardSiddaway | with no comments
Filed under:

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 blocked. I have been meaning to do something...

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 for suggestions as to content for this project...

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...

Word Add text

Keeping on with our look at Word we need to able to add text to the documents we are creating. 001 002 003 004 005 006 007 008 009 010 011 function   Add-Text   {     param   (         ...
Posted by RichardSiddaway | with no comments
Filed under:

Word add data to a table

We created a table in a recent post.  This time round we add some data to the table.   001 002 003 004 005 006 007 008 009 function   Add-TableData   {     param   (         [int...
Posted by RichardSiddaway | with no comments
Filed under:

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. 001 002 003 004 005 006 007 Clear-Host Get-Module   -ListAvailable   |   foreach  ...
Posted by RichardSiddaway | with no comments
Filed under:

Word Close Document

So far we have created a document and started to add data into the document. 001 002 003 004 005 006 007 008 function   Close-WordDocument   {     param   (         [ parameter ( Mandatory...
Posted by RichardSiddaway | with no comments
Filed under:

PowerShell v2 help file

In PowerShell v2 we get a nice graphical help system that includes the cmdlets, the about files and and the User and Getting Started Guide. It doesn’t include the help for the optional modules though which is a pity. The default locations on the Start...
Posted by RichardSiddaway | with no comments
Filed under:

Word Add a table

There seems to be two types of paragraph I create in Word documents – text or tables.  Lets start by adding a table. 001 002 003 004 005 006 007 008 009 function   Add-Table   {     param   (        ...
Posted by RichardSiddaway | with no comments
Filed under:

Word New Document change

I started experimenting with the New-WordDocument function and realised I needed to change it to make the variables usable across the functions. 001 002 003 004 005 function   New-WordDocument   {     $global:word   =  ...
Posted by RichardSiddaway | with no comments
Filed under:

Word New Document

Lets add another function to our module for working with Word.  Its time to create a new word document 001 002 003 004 005 function   New-WordDocument   {     $word   =   New-Object   -ComObject   Word...
Posted by RichardSiddaway | with no comments
Filed under:

Word Autocorrect

If you have been following this blog for awhile you will know that I build and rebuild machines on a reasonably frequent basis.  One drawback to this that I have to keep re-creating the Autocorrect entries.  I do a lot of technical writing much...
Posted by RichardSiddaway | with no comments
Filed under:

File download problem

If you are using the Office 2010 TP and try to download a word document through Internet Explorer you end up in a continuous loop of being asked for credentials.  The download site won’t recognise your local credentials so you can’t get the documents...
Posted by RichardSiddaway | with no comments
Filed under:

PowerShell 2 on Windows 7 - Remoting

One thing I noticed was that remoting appears to be switched on by default.  I did a clean install to the extent of deleting and resizing the install partition so it shouldn’t have picked up any remnants of previous installs. The execution policy...
Posted by RichardSiddaway | with no comments
Filed under:

Service loading

This isn’t quite finished but there is enough useful stuff to share.  I was wondering what order things are loaded – especially services and found that this information can be found in the registry – only difficulty is reading it. 001 002 003 004...
Posted by RichardSiddaway | with no comments
Filed under:

Service Startup History

If we need to look at the startup history of a service we can find the information in the event log 001 002 003 004 005 006 function Get-ServiceStartupHistory { param ( [string] $name ) Get-EventLog -LogName System | where { ( ( $_ . EventId -eq 7035...
More Posts Next page »