Windows SNMP Service missing tabs

If you’re trying to configure SNMP on a server from a remote workstation, make sure you have SNMP installed on the remote workstation or you’ll miss the Agent, Traps, and Security tab on the SNMP service properties.

Thanks to for getting me on the right track.

w/o SNMP installed on the remote workstation you can’t fully manage SNMP remotely.

Global hotkey for New Mail

I found how to make a global hotkey shortcut that opens a new email and I’ve found it quite useful.

  1. Create a new shortcut on the desktop.
  2. Point it to the outlook.exe file.
  3. In the Target field append /c ipm.note at the end.
  4. Select a key for the shortcut field. (I selected “m”, ctrl+alt will be automatically added.)


"C:\Program Files (x86)\Microsoft Office\Office16\OUTLOOK.EXE" /c ipm.note

Now I can press Ctrl+Alt+m anywhere and I get a new email window in Outlook.

Windows Spotlight Wallpaper

Windows Spotlight has some nice wallpaper and I’d like to keep a couple for later use, so here’s the shortest Powershell script I could make to save them to my Pictures directory:

$src = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"

$dest = "$env:USERPROFILE\Pictures\Windows Spotlight"

Get-ChildItem "$src" | where {$_.length -gt "141160"} | foreach {cp "$src\$_" "$dest\$_.jpg"}

I only copy files greater than 141160 bytes because some files in that directory are not wallpapers and the largest non-wallpaper file is 141160 bytes. So it’s a good starting point.

If user exists?

Getting a simple script to check if an AD user exists has been a nightmare. I wanted something simple and straightforward and I finally found it.

$userobj = $(try {Get-ADUser $user} catch {$null})
if ($userobj -ne $null) {
   Write-Host "$user already exists" -foregroundcolor Green
} else {
   Write-Host "$user not found " -foregroundcolor Red

Another options would be to use dsquery:

if (dsquery user -samid $user) {
   Write-Host"$($ exists."
} else {
   Write-Host"$($ doesn't exist."

These are the simplest options I can find.

Powershell and SNMP

I’ve been trying to get all my servers snmp settings fixed and it’s been kind of a pain. Powershell doesn’t have any good cmdlets, but I’ve found a couple examples. This is very nice script, but doesn’t work on remote machines unless you do PS Remoting. (I need to bone up on my PS remoting now.)

I ended up using the following for the base of a script. I need only a very simple script so this looks for a specific registry key which will be the name of the CommunityString. Since mine is ‘Public’, I’m just looking for that.

function Get-RemoteRegistryValue ([string]$ComputerName, [string]$KeyPath, [string]$Value) {
    try {
        $Hive = [Microsoft.Win32.RegistryHive]::LocalMachine
        $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive, $ComputerName)
        $key = $reg.OpenSubKey($KeyPath)
    } catch {
        return "ERR"
    return $key.GetValue($Value)
Get-RemoteRegistryValue -ComputerName $server -KeyPath 'SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities' -Value 'Public'

WSUS: Reset Server Node While Browsing Computers

I’ve run into another very annoying WSUS bug and this one deals with Computer Model information being corrupted when being entered into the SUS DB.

Crashing groups highlighted in red.

Twice I’ve encountered a bug where the WSUS console would crash every time I tried to browse the All Computers or Unassigned Computers groups, but it wouldn’t crash when I browse another sub-group.

I found a very useful blog post that showed how to fix it but I’m unable to find it now; however, I was able to remember the steps I took.

  1. Using SSMS, export the table tbComputerTargetDetail to a csv. (Select * query, then save the results as csv.)
  2. Sort the various columns to find the one with the box (like an unknown character). This is the corrupt entry. For me, its always been the ComputerModel field.

    A similar example.
  3. Note the TargetID #.
  4. You can use the TargetID number in the tbComputerTarget table to find out the hostname of the offending machine for a permanent fix.*
    SELECT FullDomainName
    FROM [SUSDB].[dbo].[tbComputerTarget]
    WHERE TargetID = '<targetid#>'
  5. Blank out this field.
    UPDATE [SUSDB].[dbo].[tbComputerTargetDetail]
    SET ComputerModel=''
    FROM [SUSDB].[dbo].[tbComputerTargetDetail]
    WHERE TargetID='<targetid#>'

WSUS will be working again.

*To fix this issue on my client machines, I’ve only needed to update the offending machine’s BIOS.

WSUS Doesn’t Download Updates

While rebuilding WSUS (once again) I discovered another snag. When first configuring WSUS I put in “D:” for the drive to store the updates because the wizard didn’t like “D:\”. Unfortunately, both are wrong. From what I read in various posts, the wizard used to default to the largest drive with free space and append \WSUS for a directory. If you just specify “D:”, the updates try to download to D:WsusContent and not D:\WsusContent. (The eventlog shows this.)

A comment on this blog post helped fix it without a reinstall:

wsusutil movecontent D:\WsusContent D:\WsusContent\movelog2.log -skipcopy

After a reboot (and waiting, as WSUS isn’t very speedy) , the updates started downloading.

For future installs: don’t specify the just the root of a drive, specify a subdirectory like “D:\WSUS”.

PS: here’s what the log file says:

2017-04-07T21:04:23 Successfully stopped WsusService.
2017-04-07T21:04:23 Beginning content file location change to D:\WsusContent
2017-04-07T21:04:23 Did not copy files due to -skipcopy flag.
2017-04-07T21:04:23 Successfully changed WUS configuration.
2017-04-07T21:04:24 Successfully changed IIS virtual directory path.
2017-04-07T21:04:24 Successfully removed existing local content network shares.
2017-04-07T21:04:24 Successfully created local content network shares.
2017-04-07T21:04:24 Successfully changed registry value for content store directory.
2017-04-07T21:04:24 Successfully changed content file location.
2017-04-07T21:04:25 Successfully started WsusService.
2017-04-07T21:04:25 Content integrity check and repair...
2017-04-07T21:04:25 Initiated content integrity check and repair.

DFS-R MaxOfflineTimeInDays

I had a screwy server that wouldn’t replicate a folder in DFSR because it had past the 60 day limit. I’m not sure why this server was out of date for so long.

EventID: 4012

The DFS Replication service stopped replication on the folder with the following local path: <folder>. This server has been disconnected from other partners for 152 days, which is longer than the time allowed by the MaxOfflineTimeInDays parameter (60). DFS Replication considers the data in this folder to be stale, and this server will not replicate the folder until this error is corrected.

To resume replication of this folder, use the DFS Management snap-in to remove this server from the replication group, and then add it back to the group. This causes the server to perform an initial synchronization task, which replaces the stale data with fresh data from other members of the replication group.

Additional Information:
Error: 9061 (The replicated folder has been offline for too long.)
Replicated Folder Name: <folder>
Replicated Folder ID: A484AB0F-7DAE-4A43-BFC4-59303224FD23
Replication Group Name: domain\dfsroot\foldername
Replication Group ID: 201BA6C5-92C9-4FDF-BE2B-C9FDC6869FBD
Member ID: 9B24A868-4C07-4BBE-AE09-C0D9427C9A24

Following the suggestion in the EventID, I removed the folder completely from DFS Replication and Namespace and let everything sync back up. The event log even said that the Replication member was dropped. However, when I re-added the folder I received the same error message again.

So I changed the MaxOfflineTimeInDays option to 155 days with this command and restarted the DFSR service:

wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=155
net stop dfsr && net start dfsr

The event log showed that DFS-R started replicating the folder again and everything is back to normal again. Then I changed the MaxOfflineTimeInDays option back to it’s normal 60 days.

Surface Ergonomic Keyboard

SurfaceKB.jpgI broke down and bought a Surface Ergonomic Keyboard the other day and I’m quite pleased.


The media keys work! No need for remapping. That was a not-so-minor annoyance with using the Apple Keyboard on Windows: several missing keys, no media keys, and the need to remap something if you really wanted it. It wasn’t a deal breaker for me because I like the feel of the keyboard and it’s very easy to type on, but it’s nice to have media keys back.

The only issue with having media keys is now I have to toggle for Function keys. I do use F2 (rename) and F5 (refresh). But there is a toggle switch so you can choose which keys will be the default.

There are media keys for mute, vol up, vol down, prev, play/pause, next, bright up, bright down, magnifier, multitask, connect to devices, settings, calculator, minimize all, notifications, and lock.

Bluetooth is built in so there is no dongle. The keyboard runs off of two AAA batteries. Pairing it up with Windows 10 was a breeze.

The ergonomic keyboard has a bit more heft to it than the regular keyboard. It’s a good weight. I prefer keyboards have a bit of mass to them. I don’t want it moving around on my desk.


The keyboard looks great. It’s all various shades of grey. The palm rest for the ergonomic keyboard has a nice feel to it. MS says it’s easy to clean but I’m just leery about a cloth palm rest. It’s some fancy Italian fabric. Soft, and padded a bit. The cloth palm rest is the only thing I’m leery about with this keyboard.



  • The lights to indicate the capslock, num lock, etc. are a little dim or small.
  • The shift key next to the Z is a bit small too. Altho’ it could be that I’ve not used an ergonomic keyboard in a long time.
  • A bit spendy at $130, but if it holds up as well as a mechanical keyboard then it’s worth it.

None of these are deal breakers.


I’m still testing out the ergonomic version. I’m tempted to go back and get the regular version, since I use a regular mechanical keyboard at work.

I heartily recommend this keyboard. What little time I’ve spent with it I can say it’s a great keyboard. It’s a little spendy, but if you like the Apple keyboard style with perfect Windows (Win8, 8.1, 10. No Win7) integration, this keyboard is great.

Microsoft Surface Keyboard

For the longest time, my favorite keyboard was the Apple keyboard. I loved the chiclet keys, the low profile, the Apple aesthetics. However, I was always missing the 100% Windows integration. I became used to using the Option key for the Windows key, the missing print screen, and a few others caveats; eventually, I worked around them. But I always maintained that if someone could make and Apple keyboard with Windows keys, it’d be the best Windows keyboard ever.

I think Microsoft finally did it with the Surface Keyboard.



At $99, it’s a little spendy for a non-mechanical, wireless keyboard, so I’ll have to sit on it for a bit, but so far it seems to be the keyboard I’ve been searching for.