header image

Archive for January, 2013

PowerShell wins award

Posted by: | January 16, 2013 | No Comment |

PowerShell has won one on InfoWorld’s Technology of the Year awards for 2013 See http://www.infoworld.com/slideshow/80986/infoworlds-2013-technology-of-the-year-award-winners-210419#slide24 for details

under: PowerShell V3

Workflow article 4

Posted by: | January 16, 2013 | No Comment |

The next in the series of articles on PowerShell workflows that are appearing on the Scripting Guy blog has been published. The articles in the series that have been published are: http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/26/powershell-workflows-the-basics.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/02/powershell-workflows-restrictions.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/09/powershell-workflows-nesting.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/16/powershell-workflows-job-engine.aspx Look for the next article in one weeks time. Until then Enjoy!

under: PowerShell V3

One of the new features in PowerShell v3 is the capability to update the help files. In fact you have to do this because PowerShell v3 doesn’t ship with any help files. Since Windows 8 RTM’d there have been a succession of new help files released. I discovered one of my netbooks didn’t have the […]

under: PowerShell V3

  Today’s question involves using the Context parameter: It’s probably just me, but I’ve never gotten the switch ‘-context 5 or -context 2, 7′ to work predictably – where 5 lines before and after or 2 before and 7 after will come out – have you? Let’s start by looking at the default behaviour of […]

under: PowerShell Basics

Workflow article 3

Posted by: | January 9, 2013 | No Comment |

  The next in the series of articles on PowerShell workflows that are appearing on the Scripting Guy blog has been published. The articles in the series that have been published are: http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/26/powershell-workflows-the-basics.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/02/powershell-workflows-restrictions.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2013/01/09/powershell-workflows-nesting.aspx Look for the next article in one weeks time. Until then Enjoy!

under: PowerShell V3

Today’s question concerns finding the first and last matches in a file Sometimes, I need to make two passes at seeking content in this file, once for the first occurrence; and a second grep for obtaining the last occurrence of a phrase. After the second pass, I figure placing the values into an array is […]

under: PowerShell Basics

Following on from yesterday’s post this is the second question: Since I’m recursively searching thru files to find matching phrases, how can I obtain other directory service information about the matching files file(s) – this is more of a methodology technique question because I realize there are multiple ways of achieving this? You could do […]

under: PowerShell Basics

  I had some questions come in after mu recent post regarding select-string. I’ll answer them as a series of posts. First off: I’m recursively searching thru many files, and want to pull out specific data in ‘fixed column’ positions from the line(s) that match the phrase I’m seeking, i.e. position 10 thru 15 of […]

under: PowerShell Basics

Select-String confusion

Posted by: | January 5, 2013 | 1 Comment |

I have seen a lot of confusion recently over the use of Select-String. One mis-conception is that you need to use Get-Content to pipe the file contents into Select-String.  Not so. Select-String will read the file for you. If you just want to scan the files in a single folder to find a specific string […]

under: PowerShell Basics

WMI enables you find the number of processors in your system: PS> Get-WmiObject -Class Win32_ComputerSystem | fl Number* NumberOfLogicalProcessors : 2 NumberOfProcessors        : 1 This works fine for Windows Vista/Windows 2008 and above. Earlier versions of Windows mis-report the number of processors – it counts the number of logical processors reports it as the number […]

under: PowerShell and WMI

« Newer Posts - Older Posts »

Categories