Working with profiles: 2 deleting profiles
Posted by: Richard Siddaway
I recently (1 June) showed how to discover the user profiles on your system. Now its time to delete them.
function remove-profile {![]()
0 Comments
RSS Feed
Email a friend
I recently (1 June) showed how to discover the user profiles on your system. Now its time to delete them.
function remove-profile {![]()
0 Comments
RSS Feed
Email a friend
One 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.
...A question came up on the forum for PowerShell and WMI – how do I delete profiles. I’m going to work up to answering that by looking at using WMI to work with profiles.
So to start how can we find the...
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...
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...
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"
At some stage we may need to reset our NIC back to having a static address
$index = 7 $nic![]()
0 Comments
RSS Feed
Email a friend
May 16, 2012 3:12 PM
TCP/IP Alternative Configuration: pt II Set DHCP
Posted by: Richard Siddaway
Network, PowerShell, WMI
The 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
![]()
0 Comments
RSS Feed
Email a friend
May 15, 2012 11:37 AM
Test-Connection on PowerShell v3
Posted by: Richard Siddaway
PowerShell 3, WMI
Following on from the previous post I performed the same tests on PowerShell v3
The behaviour is the same except that
Test-Connection -ComputerName . -Count 4 –AsJob
now give the 4 pings when you receive the job information
May 14, 2012 3:23 PM
Test-Connection oddities
Posted by: Richard Siddaway
PowerShell, WMI
I’ve playing around with Test-Connection because I wanted to set up a long running WMI based job and I thought that pinging a machine lots of times would be a good way to do it. Test-Connection uses the Win32-PingStatus class.
I started with this
