PowerShell for Windows Admins:


January 14, 2014  12:24 PM

VM disk info

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A question came into the forum about getting information on the virtual disks associated with particular Hyper-V virtual machines. Is a bit of a digging exercise but this gets the results: Get-VM | foreach { $VMname = $psitem.Name Get-VMHardDiskDrive -VMName $VMname  | foreach { Get-VHD...

December 23, 2013  5:55 PM

CDXML–NetworkAdapterConfiguration–Search on Index

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

The Win32_NetworkAdapterConfiguration class has an Index and an InterfaceIndex property. Both are suitable search properties. The take an unsigned integer as their value – leading to this addition to the CDXML file: <Property PropertyName="Index"> <Type PSType =...


December 23, 2013  11:57 AM

CDXML–NetworkAdapterConfiguration–IP Enabled

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Last time we added a search parameter enabling this: Get-NetworkAdapterConfiguration -DHCPEnabled $true I also want to be able to search based on if the adapter if IP Enabled using: Get-NetworkAdapterConfiguration -IPEnabled $true This can be achieved by specifying another search...


December 17, 2013  5:15 AM

Countdown to the Scripting Games–32 days and counting

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

The countdown to the Winter 2014 Scripting Games has started. Officially starting at 1am (UTC or GMT) 19 January 2014 the following dates should be noted: 2 January 2014 – registration opens 6 January 2014 – a practice event becomes available 19 January 2014 – event 1 starts 26...


December 16, 2013  2:31 PM

A new version of ADMT

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A new version of the AD Migration Tool (ADMT) has been announced - http://blogs.technet.com/b/askds/archive/2013/12/13/an-update-for-admt-and-a-few-other-things-too.aspx While not ready for download just yet at least we know its in the pipeline and supports the newer versions of Windows


December 16, 2013  2:20 PM

CDXML–adding search parameters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Last time you saw how to create a cmdlet from the Win32_NetWorkAdapterConfiguration class: <?xml version='1.0' encoding='utf-8'?> <PowerShellMetadata xmlns='http://schemas.microsoft.com/cmdlets-over-objects/2009/11'> <Class...


December 2, 2013  12:01 PM

CDXML: Add a cmdlet for computer system

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Continuing the creation of a Hardware investigation module – its a simple matter to add a cmdlet to retrieve the computer system data ie Win32_ComputerSystem First create a CDXML file like this: <?xml version="1.0" encoding="utf-8"?> <PowerShellMetadata...


April 30, 2013  12:32 PM

WMI vs CIM speed tests–the final round

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

As a final test I want to see what happened when I ran multiple commands against the remote machine. PS> 1..100 | foreach { Measure-Command -Expression{1..100 | foreach { Get-WmiObject -Class Win32_ComputerSystem -ComputerName W12SUS; Get-WmiObject -Class Win32_OperatingSystem...


April 29, 2013  1:17 PM

CIM vs WMI cmdlets-remote execution speed

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Following on from my previous post we’ll look at how the two types of cmdlets compare for accessing remote machines. I used a similar format to the previous tests but was accessing a remote machine. First off was the WMI cmdlet – using DCOM to access the remote Windows 2012...


April 28, 2013  3:03 PM

CIM cmdlets vs WMI cmdlets–speed of execution

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

One question that came up at the summit was the comparative speed of execution of the new CIM cmdlets vs the old WMI cmdlets.  No of us knew the answer because we’d never tried measuring the speed. I decided to perform some tests. This first test is accessing the local machine.  In both...


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: