PowerShell for Windows Admins:

June, 2011


June 14, 2011  11:12 AM

Scripting Guy Blog- PowerShell and WMI

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

The Scripting Guy is running a series of posts this week featuring articles taken from PowerShell books published by Manning (www.manning.com). Yesterday was Don Jones’ PowerShell Lunches, today is my PowerShell and WMI

Read the articles and get the...

June 13, 2011  3:06 PM

Calculated Fields

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

You have probably seen something like this many times Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" | select @{Name="FreeSpace";Expression={$_.Freespace / 1GB}} We take an object and perform a calculation to in effect make a new property – a calculated field. Label can be...


June 12, 2011  1:45 PM

PowerShell User Group–21 June 2011

Richard Siddaway Richard Siddaway Profile: Richard Siddaway


When: Tuesday, Jun 21, 2011 7:30 PM (BST)


Where: Virtual

*~*~*~*~*~*~*~*~*~*

Session will look at using PowerShell to automate Microsoft Office - Word, Excel, Visio, Access and more

Notes

Richard Siddaway has invited you to attend an...


June 9, 2011  3:14 PM

Date Formats–custom formats

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

I’ve added examples of practically all of the custom elements that can be used in a date format

"d...


June 8, 2011  1:34 PM

PowerShell and WMI forum

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

I will be moderating a new forum for PowerShell on powershell.com  http://powershell.com/cs/forums/217.aspx

The forum is slanted towards PowerShell and WMI but happy to take...


June 6, 2011  1:57 PM

Get-WmiObject property parameter

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

This is a fairly obvious piece of PowerShell

Get-WmiObject Win32_Volume

We would probably restrict the properties we displayed like this

Get-WmiObject Win32_Volume | select DriveLetter, DriveType, Freespace

or possibly

Get-WmiObject Win32_Volume |


June 3, 2011  12:54 PM

Invoke-WmiMethod parameters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

The Invoke-WmiMethod cmdlet was new with PowerShell 2. 

In PowerShell v1 we would do something like this

(gwmi win32_Process -Filter "Name='Notepad.exe'").Terminate()

With the cmdlet we can do this

gwmi win32_Process -Filter...


June 3, 2011  5:13 AM

Powers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Many numbers in computing are based on powers of 2. I need to calculate some powers of 2 and realised that PowerShell doesn’t have  an operator for raising  a number  to a power.  In many languages ** or ^ supply this functionality.

In PowerShell we drop back to...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: