PowerShell for Windows Admins:

September, 2013


September 5, 2013  3:38 PM

Getting remote services

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Getting the service on a remote server is easy Get-Service -ComputerName Exch10 Getting a set of services on a remote machine isn’t difficult Get-Service -ComputerName Exch10 -Name "MSExchangeAB", "W32Time", "W3SVC" Ok so what about the scenario with multiple...

September 5, 2013  2:46 PM

Discovering a users OU

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Interesting question – how do you discover the OU in which an AD user is sitting? The Quest cmdlets were very helpful because they had a ParentContainer property. With the Microsoft cmdlets you have to do a bit of work There are two places to look – the distinguished name and the canonical...


September 4, 2013  2:26 PM

Integer sizes save the day

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

I was looking to convert some string data into integers – the data was bytes & I needed it in GB. The value I needed was buried in the middle of a string so I needed to do some string processing. Some other conditions forced me to use the Parse method of the integer class Lets say I get a...


September 3, 2013  2:24 PM

Import and Export PSSession

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A couple of comdlets that I’ve not really used much before have just come into prominance for me to solve a problem I’ve been working on. These cmdlets are: Import-PSSession Export-PSSession The two cmdlets work with commands in a remote session but have subtle differences in terms of...


September 2, 2013  3:28 PM

Get-Alias surprise

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

On the principle that any day on which you learn something new is not a complete waste I stumbled over this today: Get-Alias has a –definition parameter I’d always done this Get-Alias | where Definition -eq 'select-string' now I can save some typing get-alias -Definition...


September 2, 2013  11:29 AM

Winter Scripting Games–maybe?

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Did you enjoy the Summer Scripting Games? Do you want more? We are exploring the possibility of running a Winter Scripting Games – see http://powershell.org/wp/forums/topic/winter-games-2013/ This will be a team event (minimum of 2) that would run late this year or early next...


September 1, 2013  1:56 PM

Get-Command trick

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A useful trick with Get-Command. Use the –ListImported parameter Get-Command -ListImported -CommandType cmdlet shows the cmdlets imported into your session Get-Command -ListImported -CommandType function shows the functions imported into your session Get-Command –ListImported...


September 1, 2013  4:57 AM

Find the key of a WMI class

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

At least one property of a WMI class will be marked as a key. This information is held in the property Qualifiers which is a collection of data. The key is needed if you need to create an instance of the class. I’ve shown how to find the key with Get-WmiObject before but not with the new CIM...


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: