June 2, 2012 8:19 AM
Posted by: Richard Siddaway
Network,
PowerShell 3,
Windows 8,
Windows Server 8,
WMIOne of the questions in the recent Scripting Games involved toggling between a wireless and LAN connection. Only one was to be up at any one time.
This can be solved using WMI but becomes hugely simpler in Windows 8/2012 as we get a bunch of cmdlets for working with network adapters.
...
May 20, 2012 12:40 PM
Posted by: Richard Siddaway
Network,
PowerShell 3,
PowerShell v2,
WMIIn 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"
May 20, 2012 4:34 AM
Posted by: Richard Siddaway
Network,
PowerShell,
WMIAt some stage we may need to reset our NIC back to having a static address
$index = 7
$nic
May 18, 2012 2:00 PM
Posted by: Richard Siddaway
Network,
PowerShell 3,
PowerShell v2
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 16, 2012 3:12 PM
Posted by: Richard Siddaway
Network,
PowerShell,
WMIThe next step on our journey to an alternative configuration is setting the NIC to use DHCP
I will keep cheating for now and specify the NIC – on my machine I now it is the NIC whose Win32_NetworkAdapterConfiguration has an Index of 7
May 13, 2012 10:34 AM
Posted by: Richard Siddaway
Network,
PowerShell,
WMIA 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....
March 30, 2012 8:49 AM
Posted by: Richard Siddaway
Active Directory,
Books,
Hyper-V,
Network,
Operating System,
PowerShell,
Processor,
Registry,
WMIManning have PowerShell in Practice on a half price offer today. Go to www.manning.com and use code dotd0330cc when ordering
March 11, 2012 11:22 AM
Posted by: Richard Siddaway
Network,
PowerShell 3,
Windows Server 8,
WMI
Windows Server 8 & Windows 8 bring a host of new functionality to us. I wanted to try out some of it so created a new VM and installed the OS – went for full GUI for now
Opened PowerShell and ran
Set-ExecutionPolicy remotesigned
Enable-PSRemoting...
January 1, 2012 6:12 AM
Posted by: Richard Siddaway
Network,
PowerShell,
WMIA question on the forums asked how the connection metrics could be set on a Windows system.
We need to start by identifying the network adapters using this function
function test-ipmetric {
Get-WmiObject -Class Win32_NetworkAdapter -Filter "AdapterType = 'Ethernet...