Browse by Tags

All Tags » Powershell (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

Removing empty folders

I blogged about this a long time back. As part of my tidy up program (me? tidy up? - - stop laughing!) I’ve been moving scripts into PowerShell v2 modules.  I’ve added these three functions to my FileFunctions module. 001 002 003 004 005 006 007...
Posted by RichardSiddaway | with no comments
Filed under:

Creating Temporary files

One thing I need to do when testing file system scripts is generate a bunch of temporary files for experimenting with.  In the past I have just copied in whatever I could find to use as test data.  It is possible to easily generate test data...
Posted by RichardSiddaway | 1 comment(s)
Filed under:

Cleaning Temp folder

Windows uses a temporary folder as a scratch pad and dumping ground for all sorts of temporary files.  There are a couple of issues with the temporary folder. Firstly by default its part your profile and each user has their own. Secondly there isn...
Posted by RichardSiddaway | with no comments
Filed under:

No PowerShell = No Job?

James has an excellent post - http://blogs.technet.com/jamesone/archive/2009/11/02/you-can-t-be-a-21st-century-admin-without-powershell.aspx – explaining why PowerShell is going to be a must have skill for IT admins going forward. As far as I am concerned...
Posted by RichardSiddaway | with no comments
Filed under:

Date and Time

I recently came across a script that used date and time information in this manner 001 002 003 004 005 006 $stuff   =   "Stuff" $monthday   =   Get-Date   -Format   "ddMMM" $year   =   Get-Date...
Posted by RichardSiddaway | with no comments
Filed under:

Enable Ping

I’ve got a few talks coming up so need to build some more demo machines.  One thing I like to be able to do in the demo environment is ping between machines – sometimes necessary when testing things out but ping is disabled by the Windows firewall...
Posted by RichardSiddaway | with no comments
Filed under:

TCP Ports

I came across this post http://www.expta.com/2009/08/name-that-port.html that gives the well known service for a TCP\UDP port.  Useful script but its written in VBScript.  Needs to be in PowerShell. 001 002 003 004 005 006 007 008 009 010 011...
Posted by RichardSiddaway | with no comments
Filed under:

Windows 2008 R2 RTM

It hasn’t had the same level of fanfares but Windows Server 2008 R2 RTM is available for download from TechNet\MSDN. I’ll be converting my test domain over the next few days and reporting on all the PowerShell goodies we get Technorati Tags...
Posted by RichardSiddaway | with no comments
Filed under:

Windows 7 and PowerGUI 1.9

Currently rebuilding the laptop.  Downloaded Windows 7 RTM from TechNet last night and did a complete refresh.  PowerGUI is one of the first installs on any new machine. The latest version installs great.  Notice the opportunity to prevent...
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...

PowerShell in Practice Ch14&15

The latest MEAP for PowerShell in Practice adds chapters 14 and 15 to the set. The book is essentially complete now – with just the appendix and the stuff at the front to do It can be obtained from www.manning.com/siddaway Technorati Tags: PowerShell...
Posted by RichardSiddaway | with no comments
Filed under:

Its a wrap

When we run a cmdlet such as Get-EventLog we often find that the display is truncated PS> Get-EventLog -LogName Application | select -First 5   Index Time          EntryType   Source                ...
Posted by RichardSiddaway | with no comments
Filed under:

Excel 2010 PowerShell I

This now works for a non-US locale. 001 002 003 004 $xl   =   New-Object   -ComObject   "Excel.Application" $xl . visible   =   $true $wb   =   $xl . workbooks $wb . Add ( )   Well to be strictly...
Posted by RichardSiddaway | with no comments
Filed under:

MDT 2010 supports PowerShell

MDT -  Microsoft Deployment Toolkit (was known as BDD in a previous life)  now supports PowerShell with a snapin to give a provider and some cmdlets.  See http://blogs.technet.com/mniehaus/archive/2009/07/10/mdt-2010-new-feature-16-powershell...
Posted by RichardSiddaway | with no comments
Filed under:

PowerShell Editing

I have been a fan of the PowerGUI editor since it was first in beta but one thing has been consistently annoying.  I don’t like the way is sets itself as the default editor for PowerShell files and blocks changes to this unless you go into the registry...
Posted by RichardSiddaway | 4 comment(s)
Filed under: ,

PowerShell in Practice - Chapter 15

The last chapter – Chapter 15 - has been delivered for first pass editing. This is an extra chapter we decided to add to round off a few topics we thought should be included. Hopefully it will available on MEAP fairly soon. Technorati Tags: PowerShell...
Posted by RichardSiddaway | with no comments
Filed under:

Two recommendations

I took delivery of a copy of the Hyper-V Resource Kit today.  Only had chance to flick through it but Chapter 16 jumped out at me – Hyper-V Management using Windows PowerShell – unless my powers of deduction are way off this chapter was written by...
Posted by RichardSiddaway | with no comments
Filed under:

Amazon

My book has appeared on Amazon’s listings http://www.amazon.co.uk/Powershell-Practice-Richard-Siddaway/dp/1935182005/ref=sr_1_1?ie=UTF8&s=books&qid=1246906667&sr=1-1 http://www.amazon.com/Powershell-Practice-Richard-Siddaway/dp/1935182005...
Posted by RichardSiddaway | with no comments
Filed under:

Playing with dates

I happened to notice that Sundays date was 5 July 2009.  Not particular astute you may think but I noticed it because I’d written it as 5/7/9.  English date format puts the day then the month so this may not make sense in other formats. The...
Posted by RichardSiddaway | with no comments
Filed under:
More Posts Next page »