Celtic Coding Solutions Blog

Celtic Coding Solutions Blog - for everything computer related

Adding Windows 10 PC to a domain using VPN

As a remote worker I needed to join my newly built Windows 10 PC to the domain using Windows VPN.

  • First login to the machine as a local admin
  • Setup a VPN to the company and connect
  • Join the PC to the domain
  • Reboot
  • Log back in as local administator
  • Connect VPN again, switch account
  • Try logging on with your domain account and you will probably see this error:-

The Group Policy Client service failed the sign-in.  The universal unique identifier (UUID) type is not supported.


Fix

If you log back into the local administator account you will notice the VPN has been disconnected which did not happen in Windows 7.  The fix is simply to create a VPN that stays connected when you switch account.

So login again as the local administrator and run powershell as administator, then enter:-

Add-VpnConnection -Name NAMEOFVPN -ServerAddress VPNADDRESS -AllUserConnection $true -SplitTunneling $true -AuthenticationMethod MSChapv2 -TunnelType Automatic -EncryptionLevel Required -PassThru

Connect to the VPN which using NAMEOFVPN you used in the PS Script.

Switch accounts and try to login as a domain user and you will not see the error again.

Pyramid Analytics - Problem exporting content

Using Pyramid Analytics and trying to export content of the report (or just export the report to PDF)


After I clicked the "Click here to get file" I got the following error:-

System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Basic realm="SERVERNAME"'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at ......

This seemed strange as everything else on the site was working fine.

Fix:-

The problem was with a setting on the IIS that was running the site.

Open IIS, find BIOffice6 under the Sites.  Click Authentication and make sure everything is Disabled apart from Asp.Net Impersonation and Basic Authentication.  For some reason my setup had Windows Authentication enabled which was causing the error.  E.g you settings should look like:-


Excel Automation as a Scheduled task on Windows Server 2012 R2

Migrating some Excel Automated code using C# off an old Windows 2003 Server onto Windows Server 2012 R2 and using Scheduled Tasks to run I notice it was failing.  User linked to the Scheduled Task has correct permissions and it is being run with highest privileges.  Excel installed and I can run the code manually fine as that user.  Plenty of threads about the issue but the only thing that worked was:-

FIX

Windows 2008 +

Add 2 directories:-

%windir%\System32\config\systemprofile\Desktop

and

%windir%\sysWOW64\config\systemprofile\Desktop

Windows 2012 r2

Add 2 extra directories:-

%windir%\SysWOW64\config\systemprofile\Documents

and

%windir%\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache


SQL Server error "Invalid attempt to GetBytes" on T-SQL queries

Whilst trying to do a simple query in Microsoft SQL Server Management Studio e.g.

SELECT TOP 10 * FROM dbo.DatabasePerInstance

I was getting the following error:-

An error occurred while executing batch. Error message is: Invalid attempt to GetBytes on column 'DateAdded'.  The GetBytes function can only be used on columns of type Text, NText, or Image.

Thought it was a bit strange as is a really basic type of T-SQL.  However I running Management Studio 2005 and this SQL Server I was connecting to was SQL Server 2008 r2.

Fix

Run the same version or higher Microsoft SQL Server Management Studio to do the T-SQL.  Once I loaded up 2014 Management Studio no more errors.

Windows 10 crash IRQL_NOT_LESS_OR_EQUAL using Hyper-V And WiFi

On my HP Windows 10 Laptop I was using Hyper-V and WiFi and the host Windows 10 PC was crashing with:-

IRQL_NOT_LESS_OR_EQUAL

The Windows 10 Laptop has been find so it seemed to be something to do with Hyper-V.  Looking online it seemed related to either to Memory (built-in memory on this laptop so unlikely) or driver issues (more likely).  

I guessed it might be the WiFi driver which was an Intel Dual Band Wireless-AC 3160.  So I updated the driver and now no more crashes, phew.

To do this fix.

  • Open Control Panel
  • Security and Maintenance
  • Administrative Tools
  • Computer Management
  • Open "System Tools" and select "Device Manager"
  • Open "Network Adapters"
  • Select the Wireless adapter, in my case "Intel(R) Dual Band Wireless-AC3160"
  • Right click "Properties"
  • Click "Driver" tab
  • Click "Update Driver"
  • Click "Search automatically for updated driver software" and let it download a new driver if it finds one
  • Restart and all should be well

SQL Server Database Backup Failure Operating system error 665

Had a SQL Server 2005 FULL Backup failure each night for the largest database (around 45GB).  Looking at the SQL Server Logs I notice the following error:-

BackupMedium::ReportIoError: write failure on backup device 'D:\BACKUP\SERVER_DATABASE_FULL_20160103_202215.bak'. Operating system error 665(error not found).

Looking at possible solutions:-
  • Backup HD drive is heavily fragmented, but as this is a SAN then that is not really possible.
  • Drive is compressed
Checking the drive and yes it was compressed so the network guys turned this off and bingo all we managed a full nightly backup.

BT HomeHub 5 - Better WiFi using Advanced Settings

If you are using the BT supplied HomeHub 5 VSDL WiFi Router then I suggest changing a couple of settings to get the most of it.

First in your Browser (I normally use Google Chrome, but seem to work with Edge and FireFox) go to:-
http://192.168.1.254 (default unless you have changed it).

And you should see, click on Advanced Settings:-


And you see:-


Scroll to the bottom and enter your password (see card on the back of the HomeHub for this and click OK:-


And you will see the screen, click "continue to Advanced Settings":-


Then click "Wireless":-


Then click "5 Ghz Wireless":-


Then change "Sync with 2.4Ghz" to No and click Apply:-


Also in Advanced Settings I turn off:-
"Home Network" -> "Smart Setup" -> "Enable Smart Setup:" - No - Click Apply.

Stream or Play Xbox One Games on Windows 10 Device

The ability to play and stream Xbox One games on any Windows 10 Device is pretty amazing.  Here is the details of how to get this working.

Xbox One Setup

I am running the latest OS Install 10.0.10586.1006

Make sure your settings allow Streaming to Windows 10.  

Bring up Xbox One Settings (on the console).

Select Preferences and Game DVR & streaming


Next make sure the settings are ticked



Windows 10 Device (here I am using a Windows 10 Laptop, but works the same for a Windows 10 Tablet)

Open Store (Microsoft Apps downloader).

Search for "Xbox"

You need to download/install "Xbox" not "Xbox Smart Glass"

Once installed run the app


You will need to login with your Xbox Live account which is the same as the one connected to your Xbox One.

Once this is running, it will show details about your account, last games played, friends etc.

If you want to Stream or Play your Xbox One game on Windows 10 Device then click the Game Streaming (here my Xbox one is called "XBOXONE" but yours might be called something else.


Once running you might see the following:-


Click Continue to just Stream the content from the Xbox one e.g. in View only mode.

Or if you actually want to play the Xbox One game on your Windows 10 Device then either buy the Xbox One Wireless adapter (for Windows 10) or just plug the Usb cable in your Xbox One Controller and the other side in your Usb on the Laptop (Windows 10 Device).

Once this is done you can now play Xbox one games like so:-