Show NIC Notification Icon in SysTray

by aubrytj at 2012-08-21 23:12:57

Our local IT department would like to know if “show nic notification icon in systray” for all users - We’ve looked for a global gpo setting yet unable to find it thus far…yet looks like GPO 2008 does not have an option it looks a job for PowerShell…

Currently we have this running for "Disable `“Allow the computer to turn off this device to save power”
$nic = Get-WmiObject MSPower_DeviceEnable -Namespace root\wmi | where {$_.instancename -match [regex]::escape($nic.PNPDeviceID) }
# To Uncheck or Disable the feature
$nic.Enable = $false
#Mark the request

Yet unable to find anything for the “show nic notification icon in systray” for all network devices…?

Thanks in advance…and sure hope this is something simple than unlike running a reg-hack…which we are testing…

by poshoholic at 2012-08-22 07:48:22
I just moved this question into its own topic so that it would be more visible to others. In the future you should always try to post new questions as separate topics so that they don’t get lost behind other questions/posts.

by aubrytj at 2012-08-22 22:58:48
Thanks Kirk…will do…I wasn’t sure where to start… :slight_smile:
by JeffH at 2012-08-23 05:39:04
So you want a systray notification when the nic object is updated in WMI? Do you need an systray icon or just a balloon tip? I’m not sure about the icon but it isn’t too difficult to generate the balloon tip. You could use a WMI event subscription to watch the nic. Although when I run your code to get $nic I get a lot of devices so your code $nic.Enable=$False wouldn’t work in my situation.
by poshoholic at 2012-08-23 06:44:46
I did a fair amount of digging to find out where the setting is that shows or hides the network icon in the system tray – it is difficult to figure out what to search for. Also, apparently this configuration item is different between Windows XP and Windows 7. I went with the assumption that you are using Windows 7 and found that there are two registry keys that control this:

Key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value: HideSCANetwork

Key: HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value: HideSCANetwork

Note: Each of these locations also has HideSCAClock, HideSCAPower and HideSCAVolume, for the clock, the power icon, and the volume icon allowing you to control those as well if you like.

For these registry values, if you assign them a value of 0 it will show them or 1 will remove them. I’m going to make an assumption that the HKLM setting is a machine-level policy and the HKCU setting is a user-level policy. Presumably then to show the icon for all users on a system you should be able to do this:

[script=powershell]Set-ItemProperty -LiteralPath HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies -Name HideSCANetwork -Value 1[/script]
Once that is changed, you need to log off and then log back on to see the effect. I can’t log off and log back on to test this right now because I’m in the middle of something, so why don’t you give that a try next and see if that gets you configured correctly.

The biggest question I still have in my head about this is whether or not the user policy overrides the machine policy. I would suspect it is the other way around, but it would be worth testing to make sure.
by aubrytj at 2012-08-24 13:50:46
Thanks JeffH / Kirk - looking to have the icon showup in the systray…for the 6000 XP workstations - yeah i know can’t wait till we get to WIN7…those are great options…so this brings up another question - which I may have to go to anther forum with - is to execute the powershell script to those XP workstations - who does not have powershell - any ideas would also be totally kool…I will definitely try those options above and let you know…

Guys I’ve never been so pleased in all my life…your saving me so - so much…thanks for all of us…
by aubrytj at 2012-09-04 14:50:37
Update: So the above registry settings for WIN7 does work - and it is different for XP - liket you mentioned…

As for the question you had on GPO’s - well that depends on the AD structure - if the GPO is at the top (default) and the values are “configured” they will override any local settings everytime…

If the value is set to - “not configured” at the AD-GPO or Domain level I should say - and the local settings are configured - then the local policy takes affect…

Now if both are set either “enable/disabled” or some value has been set - then guess who takes the lead…right Domain overides - especially when "enforced"

The order of the GPO is also something to be concerned about - since if the site has multiple GPO’s and the settings are in duplicated - (hopefully this is not the way the DA of the AD has it setup) - then things become conflicting and the policies goes into a “denied” use…and your trouble begins…

"The biggest question I still have in my head about this is whether or not the user policy overrides the machine policy. I would suspect it is the other way around, but it would be worth testing to make sure."

Hope the above helps…

So I’m still looking for a way to make this happen on XP workstations - have a PS script ready yet now my delima is running against XP workstations that do not have Powershell installed and our site will not allow at this time to install it - so was looking at possible a PS 2 EXE or running a PSEXEC or WINRM or anything of that nature from a system startup GPO - would this fall into a new forum?
by Techibee.Author at 2012-09-05 03:23:24
Aubrytj, about running a PS script against machine which don’t have PS installed:

In most cases you don’t require PS installed on a remote machine to manage it from PS console from your desktop. You can use WMI or dotnet classes through PS to query what you need. Coming to your case, you can use [Microsoft.Win32.RegistryKey] dotnet CLASS to connect to remote registry and modify the keys. You can find a script that does remote registry modification using dotnet class at … owershell/

Hope this helps…
by coderaven at 2012-09-10 20:45:29
I had messed with this tray icon before because I wanted it disabled on all servers so it would not be blinking at me if I had to go to the console back in the day. I am not sure you still wanted the information, but here it is.

The update is simple, just getting to it is the hard part that someone else may be able to shed some light on. The systems I checked had the registry entry located here > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network{4D36E972-E325-11CE-BFC1-08002BE10318}{D4DAFD73-E56D-4C98-B798-331094497380}\Connection. In this path are two GUIDs the first one {4D36E972-E325-11CE-BFC1-08002BE10318} seems to be consistant to the computers I go to, but you may want to verify. In this you can verify you are in the right place by its (Default) value is “Network Adapters”. Inside this key you will see a GUID for each network connection on the computer and maybe ones for connections that do not exist any more. What you do is go into each of these second level GUID then down into its Connection subkey and look for the “Name” value to be the name of the network adapter you are wanting to work with. You can get the working network adapter name from WMI. Once you found the right key that contains the Name of your network adapter, create a DWORD value named “ShowIcon” and set it to 1. I do not know the API call to tell it to instantly take affect but after you set that it will be there on next logon or if you kill and relaunch explorer.

Have fun!