Add Bookmark – Google Bookmarks, um, bookmark

In Chrome, create a new bookmark. Name it what you like and set its URL to:

1
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

Click it when you’re on a page you’d like to bookmark (and make sure you’re logged into the Googlez).

Windows: Updating existing ODBC Data Source Drivers

For some reason there still isn’t any easy way to update the driver used on a previously defined ODBC data source in Windows. There’s no option when stepping through the configuration. I suppose you’re expected to delete and recreate the data sources, specifying the new driver at that time. But what if you have dozens, or hundreds, of existing sources?

Do it though the registry.
Continue reading

Detect unresponsive applications using Powershell

Change the variables, save as a ps1 and schedule this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$to  = "user@email.com", "user2@email.com"
$from  = "user@email.com"
$smtp = "address of SMTP server"
$engine = $env:computername
$log = "C:\pathto\log.txt"
$now=Get-Date -format "dd-MMM-yyyy HH:mm"

$Processes = Get-Process -EA Stop          
$nProcesses = @($Processes | ? { $_.Responding -eq $false })
if($nProcesses) {          
  foreach($nProcess in $nProcesses) {          
   $nProcess | select Name, id, MainWindowTitle, Responding  
                Write-Host "Non-Responsive Processes found!"
                $msg = "Non responsive processes found on $engine! -- $nProcess"
                $body = "Non responsive processes found on $engine!    

                $nProcess"

                Add-content $log -value $now
                Add-content $log -value $msg
                Send-Mailmessage -From $from -To $to -Subject $msg -Body $body -Priority High -dno onSuccess, onFailure -SmtpServer $smtp
 }          
 }

OpenVPN reconnect

My OpenVPN likes to have difficulty and go yellow from time to time.  The problem with this is twofold – I have any and all downloads stop at the absence of VPN, and when I’m not home connecting to my server is more difficult when VPN has hundged up.  The simplest fix for now is just to restart/reconnect VPN on the daily.

I use OpenVPN with PIA.
Continue reading

Windows 10 – Can’t enable System Restore

System Restore.JPG

For some reason on my most recent build of Win 10 (don’t get me started) the option to enable System Restore was grayed out.  I fixed it by running the following in a admin level CMD prompt:

1
2
3
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableSR" /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v "DisableConfig" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SPP\Clients" /v " {09F7EDC5-294E-4180-AF6A-FB0E6A0E9513}" /t REG_MULTI_SZ /d "1" /f

The first two lines didn’t find those keys, FYI.  Still, the third enabled my ability to set up System Restore.

Windows 10 – Here comes ads

I’m kinda shocked by it, but it looks like Microsoft’s going to be pushing ads into the File Explorer in Windows 10.

The good news is, for now, you can turn it off. Within File Explorer, click on View > Options > Change folder and search options. Click the View tab, scroll down to Show sync provider notifications, and uncheck it.

Windows 10 Hyper V Woes

I recently needed to set up a Win10 Hyper V, and then join it to a domain over a VPN connection.  The first issue that I faced was that Cisco Anyconnect VPN client detected the virtual machine as a Remote Desktop Connection and refused to allow it to connect.  I solved this by switching from Enhanced Session to Basic Session by clicking this on the toolbar of the virtual machine:

My second issue was that, even after successfully joining the machine to the domain, there was no Switch User option (I needed to switch to a domain user while on the VPN in order for it to authenticate to the domain server and build the local profile for the domain user).  No matter where I looked there was no option.  Not in the power options, not via Alt+F4, nowhere.

I solved this by invoking tsdiscon.exe directly via a run line.  Bear in mind that it’s my understanding tsdiscon.exe is not available in Win 10 Home edition, though I don’t know why anyone would build a virt of Home edition.