Richard Siddaway

Explore articles and content from this author

Richard Siddaway

128 articles published

1 min read

Shutting down a remote computer

PowerShell provides the Stop-Computer cmdlet for closing down a remote machine. I find this especially useful in my virtual test environment. I"™ll have several machines running but won"™t necessarily have logged onto them. Using Stop-Computer means that I can shut them down cleanly without the hassle of logging onto them.

In modern Windows systems you have to explicitly enable remote WMI access through the Windows firewall. Stop-Computer uses WMI. If the WMI firewall ports aren"™t enabled you can"™t use Stop-Computer. I"™ve taken to use the CIM cmdlets rather than WMI so sometimes don"™t open the WMI firewall ports.

1 min read

CIM cmdlets

The CIM cmdlets are found in the CIMcmdlets module.

Get-Command -Module CimCmdlets produces this list of names. I"™ve added some information on the tasks they perform

Get-CimAssociatedInstance is for working with WMI associated classes
Get-CimClass is for discovering the properties and methods of a WMI class
Get-CimInstance is analogous to Get-WmiObject
Get-CimSession
Invoke-CimMethod is analogous to Invoke-WMIMethod
New-CimInstance can be used for creating a new WMI instance in certain circumstances
New-CimSession
New-CimSessionOption
Register-CimIndicationEvent is analogous to Register-WMIEvent
Remove-CimInstance is analogous to Remove-WMIObject
Remove-CimSession
Set-CimInstance is analogous to Set-WMIInstance

1 min read

WMI vs CIM

An email debate yesterday regarding the use of the CIM cmdlets (new in PowerShell 3) vs the WMI cmdlets made me realise that other people are probably wondering the same thing,

The question is really part of a the semi-philosophical debate about when you should adopt new technology.

In the case of the WMI/CIM cmdlets the resolution is fairly straightforward.

If you are using PowerShell v2 you have to use the WMI cmdlets.

2 min read

Network Adapters"“Disable/Enable

Last time we saw the Get-NetAdapter cmdlet from the NetAdapter module

PS> Get-NetAdapter | ft Name, InterfaceDescription, Status -a

Name InterfaceDescription Status —- ——————– —— Ethernet NVIDIA nForce 10/100/1000 Mbps Ethernet Up WiFi Qualcomm Atheros AR5007 802.11b/g WiFi Adapter Up

If you look in the module you also find Disable-NetAdapter & Enable-NetAdapter

PS> Disable-NetAdapter -Name Wifi -Confirm:$false
PS> Get-NetAdapter | ft Name, InterfaceDescription, Status -a

Name InterfaceDescription Status —- ——————– —— Ethernet NVIDIA nForce 10/100/1000 Mbps Ethernet Up WiFi Qualcomm Atheros AR5007 802.11b/g WiFi Adapter Disabled

3 min read

Network adapters

The WMI classes Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration have seen a lot of use over the years. They can be a bit fiddly to use which is why the NetAdapter module in Windows 8/2012 is a so welcome.

Lets start by looking at basic information gathering

PS> Get-NetAdapter | ft -a

Name InterfaceDescription ifIndex Status MacAddress LinkSpeed —- ——————– ——- —— ———- ——— Ethernet NVIDIA nForce 10/100/1000 Mbps Ethernet 13 Up 00-1F-16-63-F5-DF 100 Mbps WiFi Qualcomm Atheros AR5007 802.11b/g WiFi Adapter 12 Up 00-24-2B-2F-9C-A5 54 Mbps

1 min read

Windows 8 Kindle app

Amazon have released an update for the Windows 8 Kindle app that appears to have resolved the corrupted display issue that occurred after every few pages of reading.

I would recommend updating the app immediately. The app now seems to be usable.

1 min read

Last nights Live Meeting

The sound was awful on last night"™s Live Meeting so I intend to re-record it at the weekend. I"™ll post the recording and scripts once its done.

I"™m also investigating an alternative delivery mechanism that will hopefully solve the sound issues.