PowerShell for Windows Admins:


May 23, 2012  12:46 PM

WMI providers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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...

May 21, 2012  1:56 PM

UK PowerShell group–next two meetings

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

29 May 2012 PowerShell and Windows server 2012 – new functionality pt 2 0 Comments     RSS Feed     Email a friend


May 20, 2012  12:40 PM

Using Invoke-WmiMethod to set the DNS servers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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...


May 18, 2012  2:00 PM

TCP/IP Alternative Configurations: pt III set the alternative configuration

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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 = 
			
		


May 18, 2012  12:07 PM

Advanced PowerShell v3 book

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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


May 13, 2012  11:25 AM

Scripting Games 2012 comments: #16 reading environmental variables

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Windows maintains a set of environmental variables. Some, but not all, can be seen via the env: PowerShell drive Get-ChildItem -Path env: You can also use WMI to see some of the variables Get-WmiObject -Class Win32_Environment | ft Name, VariableValue –a Now how do you read them in...


May 13, 2012  10:34 AM

TCP/IP Alternative Configuration: pt I The configuration

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A question on the forum got me wondering about setting the Alternative Configuration on a TCP/IP properties of a network adapter. NICs are normally configured to either DHCP or a static address. If you use DHCP another tab “Alternative Configuration” appears on the IPv4 properties dialog. This...


May 8, 2012  1:22 PM

Scripting Games 2012 comments: #15 pipelines

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

There are a few comments to make about using the pipeline but one of the obvious issues I saw from the games was this type of approach $p = Get-Process $p | where {$_.Name -like "powershell*"} The only time this is valid is if you need to access exactly the same data later in your...


May 7, 2012  10:31 AM

Scripting Games 2012 comments: #14 local computer name

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

There are a number of ways to pass the names of the local machine into a script or function:

  • use the actual name
  • use the IP address (if the processing in the script can work with IP addresses)
  • use 127.0.0.1 – the loop back address (if the processing in the...


May 6, 2012  8:00 AM

Scripting Games 2012 comments: #13 Default Printer

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

In one of the events you had to find the default printer. This can be done using WMI. The full list of printers can seen using: Get-WmiObject -Class Win32_Printer If you want to examine the printer objecy – to determine what information is available - use get-member or select the first...


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: