May 2012 Powershell group recording and slides

The recording, slides and demo scripts from last nights session - Powershell in Windows Server 8 part 2 - is available from
May UG meeting reminder

Quick reminder that the UK PowerShell group session on PowerShell in Windows 2012 is on Tuesday 29 May. Details from
Working with WMI methods

Many WMI classes have methods. Methods allow us to perform some action on the object. A recent question on the forum about using methods made me realise that there are still a lot of people following the old VBScript way of doing things.
We will experiment with the BITS service as it is...
WMI providers

I found a class new to me - Msft_Providers and this got me interested in WMI providers. PS> Get-CimInstance -Class Msft_Providers | select -ExpandProperty provider Msft_ProviderSubSystem SCM Event Provider WmiPerfClass That seems a bit low. Digging a bit more I got back to the old...
UK PowerShell group–next two meetings

29 May 2012 PowerShell and Windows server 2012 – new functionality pt 2
Using Invoke-WmiMethod to set the DNS servers

In the last post I showed that there was an issue with the way the SetDNSServerSearchOrder of the Win32_NetworkAdapterConfiguration class worked This would work $nic = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=7" $nic.SetDNSServerSearchOrder("10.10.54.201") but...
TCP/IP Alternative Configurations: pt IV reset to static address

At some stage we may need to reset our NIC back to having a static address
$index = 7 $nic0 Comments
RSS Feed
Email a friend
TCP/IP Alternative Configurations: pt III set the alternative configuration

We have seen how to set the NIC to use DHCP to get its address. This post shows how to set the alternative configuration on the NIC. If you just want APIPA then do nothing – other wise use this script
$HKLM =
Advanced PowerShell v3 book

Three new chapters are added to the MEAP – Manning Early Access Program
Chapter 3 – Using the PowerShell help system – includes PowerShell v3 Updateable help
Chapter 5 – Working with PSsnapins and Modules
Chapter 9 – Formatting
Scripting Games 2012 comments: #20 multiple ifs

An if statement is used to test a condition and if is true do one thing and do another if it is false. It can be written generically as
if (<condition>){ do stuff}
else {do other stuff}
Sometimes we need to test numerous alternatives. We could use multiple if...