Tags » Powershell-basics

Output from jobs

I tripped over a little problem the other day that’s worth reporting. I was running something like this:

$sb = {
$procs = get-service
$procs | Export-Csv test.csv -NoTypeInformation… 280 more words

Powershell Basics

Grains of rice on a chess board

There is a story about the inventor of chess being rewarded by putting 1 grain of rice on the first square of the board; 2 on the second and so on. 81 more words

Powershell Basics

Event Log Providers

An event log provider is writes to an event log. I’ve used WMI in the past to get these but while looking for somethign else discovered that Get-WinEvent can also find this information… 167 more words

Powershell Basics

Count property

Its frequently said that PowerShell is so big that no one can know everything about it. I proved that today when I “discovered” a change in PowerShell of which I wasn’t aware. 204 more words

Powershell Basics

foreach

I was asked about foreach today and responded with a description of who foreach-object works. Thinking about it I should have realised that part of the issue with foreach is the confusion that arises between foreach and foreach – – that is the difference between the foreach PowerShell statement and the foreach alias of the foreach-object cmdlet. 1,132 more words

Powershell Basics

Can it -whatif

One of the nice things about PowerShell is that it can help you prevent mistakes. Many of the cmdlets that make changes to you system have a –whatif parameter that allows you to test your actions: 162 more words

Powershell Basics

Select-Object or Where-Object

Both Select-Object and Where-Object (referred to by their aliases of select and where from now on) are both used to filter data.

It is important to know the way these 2 cmdlets are used. 154 more words

Powershell Basics