Avantgarde Technologies

<a href="http://www.avantgardetechnologies.com.au">Avantgarde Technologies</a>
Perth's IT Experts

Sunday, October 4, 2015

Websense Appliance Services Not Starting after Hard Shutdown

When a Websense v5000 or v10000 appliance is forcefully shutdown due to power loss or hard system failure, upon restart the Filtering service, Policy service, User service and Usage monitor can fail to start in the Websense Appliance Manager portal.  This is an issue I have seen more then once and as a result decided to do a write-up.

This issue occurs due to a number of temporary files which are not cleaned up (a process that occurs during a graceful shutdown).  To remove these files manually, we must connect to the appliance using an SSH shell session.

To connect to a shell session you need to login to Websense Appliance Manager first then under Administration --> Toolbox, click Technical Support Tools and find the passcode under "Websense Remote Access".  This is the password used for SSH which is randomly generated by the appliance.

Next login to the IP address of the Websense Appliance (the same IP you used for the Appliance Manager web interface).
The username is "websense-ts" and the password is the one obtained above.
Navigate to /opt/Websense/bin and remove all temporary p12 files which were not deleted due to an incorrect shutdown.
rm -f *.p12
 Also remove the journal.dat file under the /opt/Websense/bin using the following command:
rm -f 'journal.dat

After the temporary files have been removed, restart all websense services.  This can be done from the Websense Appliance Manager website or from the shell by running the following command:

./WebsenseAdmin restart

Now all the Websense services on the appliance have returned to a running healthy state.


Tuesday, September 29, 2015

VawTrak Trojan

Today I was diagnosing why a clients Internet was running so slow.  After tracing the traffic I found it was one Windows 7 PC which was infected with a virus.  The following processes were running on the machine all communicating with various Internet IP addresses.
  • conhost.exe
  • cmd.exe
  • ctfmon.exe
  • dllhost.exe
  • msiexec.exe
  • notepad.exe
  • presentationhost.exe
Note: Use Windows Resource Monitor and navigate to the Network tab to find out which processes are communicating with Internet resources.

When killing one of these processes, they would simply respawn.  The computer was also running very slow and sluggish with web browsers and windows explorer constantly hanging and freezing.
These symptoms are related to Trojan.VawTrak which the computer was infected with.  Trojan.VawTrak copies it self into C:\ProgramData and spawns these processes with its malicious code.
Trojan.VawTrak can be cleaned up with Malware Bytes or manually.
Trojan.VawTrak is a virus you definitely want to get rid of as it is designed to steal online banking information.  Some of the common tasks it performs are:
  • Disables antivirus protection.
  • Communicates with remote C&C servers – executes commands from a remote server, sends stolen information, downloads new versions of itself and web-injection frameworks.
  • Hooks standard API functions, injects itself into new processes.
  • Steals passwords, digital certificates, browser history, and cookies.
  • Logs keystrokes.
  • Takes screenshots of desktop or particular windows with highlighted mouse clicks.
  • Captures user actions on desktop in an AVI video.
  • Opens a VNC11 (Virtual Network Computing) channel for a remote control of the infected machine.
  • Creates a SOCKS12 proxy server for communication through the victim's computer.
  • Changes or deletes browser settings (e.g. disable Firefox SPDY13) and history. Vawtrak supports three major browsers to operate in – Internet Explorer, Firefox, and Chrome. It also supports password stealing from the other browsers.
  • Modifies browser communication with a web server.
  • Stores internal settings into encrypted registry keys.
Due to the severity of this Trojan and the rate it is spreading, AVG has done a detailed writeup which is available here:


Thursday, September 24, 2015

Quick access in Windows 10 with Direct Access

Quick access is a feature in Windows 10 which lets you quickly view recently opened documents and folders.  This is handy for users to gain access to files they access on a regular basis.

On the Avantgarde Technologies network all our employees use Direct Access to provide seamless connectivity back to resources in the office.  We found on links with poor bandwidth and high latency, Quick access causes performance issues and causes Windows Explorer to hang up to 10 seconds every time a user tries to save a file or open a new Explorer window.
To ensure employees which are outside the office are not affected with performance issues, we disabled this technology on all our Windows 10 workstations.  The two registry keys you want to modify are under this location:
Both are REG_DWORD values.
Simply modify both these registry keys to 0.
 Deploy these registry keys to all your users using Group Policy Preferences.

After making this change, Windows Explorer will be a lot more snappy for remote users connecting via Direct Access or another VPN technology.

Monday, September 21, 2015

Remove all Printers Deployed from a specific Print Server with Powershell

I had a customer which had deployed printers from a legacy print server utilising scripts.  They have recently built a new 2012 R2 print server where they deployed the printers utilising Print Management Console and Group Policy.

All printers were redeployed from the new print server.

The customer however had a number of printers setup on workstations still pointing to the legacy print server.  As such they wanted to remove all printers deployed from the hostname of the legacy print server.

The following PowerShell script achieves this and can be easily deployed with Group Policy.  Simply replace "PRINTSERVER" with the name of your print server and then deploy the PowerShell script.

$PrintServer = "\\PRINTSERVER"
$Printers = Get-WmiObject -Class Win32_Printer
ForEach ($Printer in $Printers) {
If ($Printer.SystemName -like "$PrintServer") {
(New-Object -ComObject WScript.Network).RemovePrinterConnection($($Printer.Name))


Tuesday, September 15, 2015

Regaining Access to an SQL Instance

After a previous employee left an organisation, no one had access to an SQL Instance and the SA Password was unknown.  In this article I will show you how to regain access to an SQL Instance.

This process was performed in SQL Server 2012 Enterprise Edition by booting the SQL server into Single User Mode.

First stop the SQL service for which we need to recover the password.

Then start the service by entering a Start parameter of "-m" in the services window in Control Panel.

Next connect to the instance with SQLCMD.exe -S "SERVERNAME\Instance".

To grant sysadmin to a user or entire group such as Domain Admins, run the following command:

EXEC sp_addsrvrolemember 'DOMAIN\Domain Admins', 'sysadmin'; 

Next run "quit" to close SQLCMD.

After this, remove the -m from the SQL Instance and start the instance normally.  Now anyone in the Domain Admins group will have sysadmin rights to the instance.  Login with a Domain Admin account and reset the SA password (provided your Instance is setup for Mixed authentication).

Enter the new password and click OK.

Thursday, September 10, 2015

Howto Decrypting an Active Directory Password

In this post I will show a tool which makes decrypting Active Directory passwords easy.  It is important to note decrypting highly secure passwords takes a long time and is not always achievable within a reasonable period of time based on the complexity of the password however I have had success recently using this product.

Find a Windows Computer where the user has logged into recently and has their password cached.  Next obtain the Network Password Recovery Wizard (NPRW) tool from:


After the tool simply use the GUI for performing the password encryption.  I found this video very helpful.


Wednesday, September 9, 2015

The SMTP availability of the Receive connector Default was low

In Exchange 2013 CU9 you may start seeing the following error message more often.

Log Name:      Application
Source:        MSExchangeTransport
Date:          10/09/2015 12:15:21 PM
Event ID:      1040
Task Category: SmtpReceive
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      CCEX2.toph.local
The SMTP availability of the Receive connector Default was low (98 percent) in the last 15 minutes.

This is due to a new Transport Agent introduced by CU9 called the System Probe Drop Smtp Agent - undocumented, but apparently responsible for dropping probe emails - which does not "drop the email" in a traditional sense, but removes all email recipients instead. Alas, this method of stopping an email from getting delivered has an adverse effect, namely the email still gets passed down the pipeline, but now with the recipient information destroyed.

This results in the email delivery failing only for the System Mailbox "probe drop" emails as shown in the following screenshot.

As a result, Event ID 1040 for the MSExchangeTransport service is logged saying that a small percentage of emails are failing.  These are generally the probe messages from Exchange 2013 CU9.

I do recommend you run the above Get-MessageTrackingLog command with an EventId of FAIL to determine that there is no other emails which have failed. 

Monday, August 17, 2015

Enable Split Tunneling on Windows 10 VPN Connections

In previous versions of Windows Server, Split Tunneling was enabled by removing the default gateway from the IPv4 settings under the properties of a Windows PPTP, L2TP or SSTP VPN connection.  This was done on the Networking tab and selecting Properties on the Internet Protocol 4 (TCP/IPv4) settings.

In Windows 10 if you click properties on the Internet Protocol Version 4 (TCP/IPv4) settings, nothing happens the button has no code behind it.
On Windows 10, to enable Split Tunneling this must now be done with PowerShell. 
Set-VpnConnection "VPN Connection Name" -SplitTunneling $true
 After enabling the VPNConnection for Split Tunneling this achieves the same affect as the "Use as Default Gateway" button from the IPv4 properties dialog box.

Friday, August 14, 2015

MAPI NSPI Issues with Exchange 2013

A customer running two Exchange 2013 CU9 multi-role servers in a cluster with an F5 load balancer contacted me this morning reporting issues where they could not create new Outlook Profiles for users.  Users with existing Outlook profiles were not affected by the issue.

Users primarily connect with MAPI over HTTP which is enabled on the Exchange Organization configuration.

When a user attempted to create a new profile, they would receive the following error:

The connection to Microsoft Exchange is unavailable.  Outlook must be online or connected to complete this action.

When running the Microsoft Exchange Remote Connectivity Analyzer against the Exchange organisation, the following errors were captured:

Testing MAPI over HTTP connectivity to server webmail.company.com
MAPI over HTTP connectivity failed.
  Additional Details
  HTTP Response Headers:
request-id: 1f79419f-0c42-4a38-bf07-99b1c6882928
Set-Cookie: ClientId=MUZOXYKGXN9GLA; expires=Sat, 13-Aug-2016 02:50:02 GMT; path=/; HttpOnly
Server: Microsoft-IIS/8.5
WWW-Authenticate: Negotiate,NTLM
X-Powered-By: ASP.NET
Date: Fri, 14 Aug 2015 02:50:02 GMT
Content-Length: 0
Elapsed Time: 7764 ms. 

Testing the MAPI Address Book endpoint on the Exchange server.
An error occurred while testing the address book endpoint.
  Additional Details
  Elapsed Time: 5784 ms. 

  Test Steps
  Testing the address book "Check Name" operation for user TestUser@company.com against server webmail.company.com.
  An error occurred while attempting to resolve the name.
  Additional Details
  A protocol layer error occured. HttpStatusCode: 500
FailureLID: 47372

###### REQUEST [2015-08-14T02:50:03.1064218Z] ######

POST /mapi/nspi/?mailboxId=e110343c-c351-4dac-b066-3b552417a51b@company.com HTTP/1.1
Content-Type: application/octet-stream 
User-Agent: MapiHttpClient 
X-RequestId: 57959cb1-fd5d-4ae1-ac55-4494f0a61748:1 
X-ClientInfo: 6016fb10-ca94-4a67-847c-549dd99bacb8:1 
X-ClientApplication: MapiHttpClient/ 
X-RequestType: Bind 
Authorization: Negotiate [truncated] 
Host: webmail.company.com 
Content-Length: 45 

--- REQUEST BODY [+0:05.159] ---
..[BODY SIZE: 45]

--- REQUEST SENT [+0:05.159] ---

###### RESPONSE [+0:05.781] ######

HTTP/1.1 500 Internal Server Error
request-id: 9653be79-d895-4cf3-8169-98ceeb218197 
X-CalculatedBETarget: Server1.company.local 
X-DiagInfo: Server1 
X-BEServer: Server1 
X-FailureContext: BackEnd;500;NTAw;U3lzdGVtLk5ldC5XZWJFeGNlcHRpb246IFRoZSByZW1vdGUgc2VydmVyIHJldHVybmVkIGFuIGVycm9yOiAoNTAwKSBJbnRlcm5hbCBTZXJ2ZXIgRXJyb3IuDQogICBhdCBTeXN0ZW0uTmV0Lkh0dHBXZWJSZXF1ZXN0LkVuZEdldFJlc3BvbnNlKElBc3luY1Jlc3VsdCBhc3luY1Jlc3VsdCkNCiAgIGF0IE1pY3Jvc29mdC5FeGNoYW5nZS5IdHRwUHJveHkuUHJveHlSZXF1ZXN0SGFuZGxlci48PmNfX0Rpc3BsYXlDbGFzczJjLjxPblJlc3BvbnNlUmVhZHk+Yl9fMmIoKQ==;;ProtocolError; 
Persistent-Auth: true 
X-FEServer: Server1 
Transfer-Encoding: chunked 
Cache-Control: private 
Content-Type: text/html; charset=utf-8 
Date: Fri, 14 Aug 2015 02:50:08 GMT 
Set-Cookie: X-BackEndCookie=e110343c-c351-4dac-b066-3b552417a51b=u56Lnp2ejJqBz5nPyM2cxpnSncebmdLLyZue0sfJnJ7SnM2Znc7Iys7LnJnMgYHNz87K0s/G0s7Mq8/NxcrPxc/H; expires=Sun, 13-Sep-2015 02:50:08 GMT; path=/mapi; secure; HttpOnly 
Server: Microsoft-IIS/8.5 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 

Also on only on Server1, the following error was experienced in the event log.

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          14/08/2015 5:54:03 PM
Event ID:      1309
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      Server1
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 14/08/2015 5:54:03 PM 
Event time (UTC): 14/08/2015 9:54:03 AM 
Event ID: 6e8a15487387414b9279078f9f6aba51 
Event sequence: 2 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/2/ROOT/mapi/nspi-3615-130840196323691514 
    Trust level: Full 
    Application Virtual Path: /mapi/nspi 
    Application Path: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\mapi\nspi\ 
    Machine name: Server1

Process information: 
    Process ID: 13528 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\SYSTEM 

Exception information: 
    Exception type: HttpException 
    Exception message: RpcObjectSetType
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

   at Microsoft.Exchange.Rpc.RpcServerBase.ThrowRpcException(String message, Int32 rpcStatus)
   at Microsoft.Exchange.Rpc.ProcessAccess.ProcessAccessRpcServer.RegisterInterface(Void* ifSpec, ValueType mgrTypeGuid, _GUID* pMgrTypeUuid, Void* pMgrEpv, UInt32 flags, UInt32 maxCalls)
   at Microsoft.Exchange.Rpc.RpcServerBase.RegisterServer(Type type, ObjectSecurity sd, UInt32 desiredAccess, ValueType mgrTypeGuid, Void* mgrEpv, String annotation, Boolean isLocalOnly, Boolean autoListen, UInt32 maxCalls)
   at Microsoft.Exchange.Data.ApplicationLogic.ProcessAccessManager.RegisterComponent(IDiagnosable diagnosable)

Request information: 
    Request URL: https://localhost:444/mapi/nspi 
    Request path: /mapi/nspi 
    User host address: ::1 
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\SYSTEM 

Thread information: 
    Thread ID: 81 
    Thread account name: NT AUTHORITY\SYSTEM 
    Is impersonating: False 
    Stack trace:    at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

After further investigation, we discovered that only mailboxes which resided on an Active database on Server1 experienced the issue creating Outlook profiles, the same server which experienced EventID 1309.  After failing mailbox databases over to Server2, users were able to login to Outlook without issues.

After this we identified the issue was only present with Server1.

On Server1 we tested the NSPI website by navigating to the Exchange backend in IIS Manager and selecting Browse:444 (https).

The browse failed on Server1 with an "unhandled exception error".  This was aligned with the HTTP 500 exception shown in the Event Logs on Server1 and the Exchange Remote Connectivity Analyzer.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.Exchange.Rpc.RpcException: RpcObjectSetType

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

On Server2 when repeat the same process.

On Server2 it prompted as authentication as normal.

This shows the MAPI/NSPI results as expected.


We rebooted Exchange Server 1 and after a reboot, it started responding to MAPI/NSPI requests as expected.  We believe it was a side affect after the CU9 upgrade, however will monitor the situation and update this blog thread in the event the issue reoccurs.

Wednesday, July 29, 2015

DNS Host A Record Being Deleted on Server Reboot

Our company Avantgarde Technologies was performing a domain controller upgrade for a client from Server 2008 R2 domain controllers to Server 2012 R2.  After deploying the new domain controllers we went through the process of updating the DNS Client records on member servers which had these addresses statically assigned.

After updating a few DNS client settings on member servers, our customer complained that when they rebooted these servers, the member servers Host A record in DNS disappeared.  This issue only occurred with 2008 and 2008 R2 member servers, 2012 servers were not affected.

After looking into this issue, we found that there is a bug with the DNS client in Server 2008 and Server 2008 R2.  Windows Vista and Windows 7 clients are also effected.  This bug is documented under KB2520155 and Microsoft has released a hotfix.

The issue is simple, as per the Microsoft KB article:

"This issue occurs because of an issue in the DNS Client service. When the DNS server configuration information is changed on a client, the DNS Client service deletes the DNS host record of the client from the old DNS server and then adds it to the new DNS server. Because the DNS record is present on the new server that is a part of the same domain, the record is not updated. However, the old DNS server replicates the deletion operation to the new DNS server and to other DNS servers. Therefore, the new DNS server deletes the record, and the record is deleted across the domain."

To get the member server to re-register itself in DNS, you must perform one of the following actions:
  • Restart the computer.
  • Restart the DNS Client service.
  • Run the ipconfig /registerdns command.
After the dynamic registration is re-created the record will not delete unless the DNS client addresses are again changed on the server.

If you require the ability to change the DNS client addresses on member servers on a regular basis, I strongly recommend installing the patch which is available from KB2520155.  In this instance we did not install the patch as this customer does not change the DNS client addresses on member servers on a regular basis.

For this customer we did not install the patch, we simply performed an ipconfig /registerdns on any servers 2008 R2 servers after their DNS client was updated and server was rebooted.

Tuesday, July 7, 2015

The folders cannot be queried. Element not found.

In in the process of setting up a new DFS Namespace server at a remote site for a customer, I faced an issue where I was unable to utilize the DFS management console to add the remote server as a namespace server.  The error received in the DFS Management console was:

The folders cannot be queried. Element not found

After some investigation it turns out that the error was due to a setting the customer had configured:

"Exclude targets outside of the client's site".

After changing the Ordering method back to "Lowest Cost" and waiting 120 minutes for AD Replication and the DFS Namespace to refresh, we were able to configure the DFS Namespace server at the remote site.

Tuesday, June 30, 2015

Newly Built Hyper-V 2012 R2 Server Blue Screening

We experienced an issue with a newly built Hyper-V 2012 R2 server running on Windows Server 2012 R2 Datacentre edition with all the latest critical and security and critical as of 23/06/2015.  The server was built, setup with a number of virtual machines and ran without issues for a period of approximately 1 month.  After approximately 1 month, the server started blue screening on a regular basis, no changes had been made to the Hyper-V Host.

The Hyper-V Host was setup on a Dell PowerEdge R730XD with 192GB of memory.


The cause of the crash as per the original error was from the NT Kernel (ntoskrnl.exe).

We opened a support case with Microsoft to get the full memory dump analysed.  After the memory dump was analysed, we were advised it was a known bug in Windows Server 2012 R2 identified 14th of April 2015.  They pointed us at KB3055343 which resolves a issue with Windows that can cause inconsistent network interface data on the system.

After downloading and installing KB3055343 the issue was resolved.


Tuesday, June 23, 2015

Legacy File Servers with User Profile Disks

I have been involved in a number of Remote Desktop Services 2012 R2 deployments and from my experiences, I recommend to my clients to only utilise Server 2012 R2 file servers.  This is due to two issues which I have experienced with legacy file servers such as Windows Server 2008 R2:
  • Problems using DFS Namespaces
  • Temporary Profiles
DFS Namespaces
DFS Namespaces are supported with User Profile Disks however from my experience both the file server and DFS namespace servers must be Server 2012 R2.  If they are not Server 2012 R2 you will receive this error:
Unable to enable user disks on UserVHDShare. Could not create template VHD.  Error Message: The network location "\\domain.local\namespace\foldertarget" is not available.
 I have replicated this twice in my lab and at a production site when dealing with 2008 R2 file servers.  If you utilise 2012 R2 file servers with 2012 R2 DFS namespace servers you will not experience this error.

Temporary Profiles

I have seen at a customer sites using 2008 R2 file servers sometimes results in temporary profiles.  This happens when the user logs off and the 2008 R2 file server does not release the file handle to the server.  This results in the VHD being locked and as a result, when users login they receive a temporary profile.

In this scenario we confirmed there was no real time AV scanning on the server or third party products that could be locking the server.  It only happens rarely but enough to get the odd user complain to service desk they are getting a temporary profile.

When the VHD is locked on the file server, restarting the Server service or restarting the file server unlocks the file again (both which result in downtime).

I worked with Microsoft PSS support on this case under 115052712773011 and got no where.  After upgrading the file server to 2012 R2, we had no more issues with user profile disks being locked under a file handle on the file server.  Microsoft said that it could be an issue when dealing with the legacy SMB 2.1 protocol where the legacy protocol fails to remove the file handle on the User Profile Disk after the user logs off.

When a Windows machine connects to a legacy operating system for file shares, it will always use the legacy version of the SMB protocol as shown in the following table.  It is recommended to always utilise SMB 3.02 when using Remote Desktop Services 2012 R2 which means you need a 2012 R2 file server for storing the profile disks.


Thursday, May 21, 2015

SSTP VPN Bug with Server 2012 R2

Tonight I stumbled across what appears to be a bug/glitch with Server 2012 R2 when attempting to setup an SSTP VPN connection.  I completed the config as per MS best practice with a valid public digital certificate which I obtained from DigiCert however when I went to connect, I received the following error:

Error Code: 0x80072746
Error Description: 0x80072746: An existing connection was forcibly closed by the remote host.

My certificate was bound to the RRAS instance correctly and TCP443 was forwarded through.

When I ran a "netsh http show ssl" however it did not show the binding, despite me configuring it in the RRAS interface and the certificate existing in the local computer certificate store with private key.
I tried changing the certificate in RRAS to another, then changing it back, but still no binding.
As a result, I exported the certificate off the machine with Private Key, deleted the certificate, then imported it back with Private Key.  After performing this task, I then rebound it in Routing and Remote Access (RRAS) using the same method.
Running the command again, the binding worked.
 And that's why we get paid the big bucks!

Wednesday, May 20, 2015

Testing GRE Protocol with PPTP VPN connections

In this post I am going to show you how to test GRE Protocol is open and working when setting up PPTP VPN Servers.  GRE Protocol being blocked on network infrastructure is one of the most common issues faced when setting up a PPTP VPN Server.

The first step is to stop the VPN Server.  This is done by right clicking the VPN server in Routing and Remote Access and clicking "Stop" under All Tasks.  This is done because our testing tool also listens on TCP1723 so we need to ensure this port is no longer in use on the server in question.
Next download our testing tools called pptpsrv.exe and pptpclnt.exe.  These tools are available in the Windows XP SP2 support tools available from the following URL:
Copy the pptpsrv.exe file to C:\Windows\System32 on your PPTP VPN Server then run it from an Administrative Command Prompt.  Ensure Windows Firewall does not block it.  Run the tool on the server and it will begin listening on TCP1723.
Next run the pptpclnt.exe from another remote computer and target it against the PPTP VPN Server like this:
My local IP address of my PPTP VPN Server is  Then when prompted enter in some sample text to send through the TCP1723 port socket.  I wrote "Hello this is clint".
Next go back to the PPTP VPN Server and verify the text was received.  We can see that the VPN Server received the text "Hello this is clint" and then went onto the second test of closing down the port socket TCP1723 and beginning a socket for GRE Protocol test.

The client automatically goes on to test GRE protocol.  GRE Protocol on my local network is currently blocked by our Cisco Infrastructure (L3 Switch/Router) and as a result we get a Socket Failure error.
This means I need to go back to the Cisco Infrastructure, resolve this problem then test again.
Hope this post has been helpful for troubleshooting PPTP VPN servers.

Wednesday, May 6, 2015

Shared Mailboxes and Sent Items in Microsoft Exchange

In this post I'm going to focus on an Exchange feature introduced back Exchange 2010 SP2 Update Rollup 4 which has not had heavy exposure out there in the real world however is a feature in demand by many companies.  Ever since Exchange 5.5, companies have been able to create shared mailboxes which multiple users use to access email content.  Users with shared mailbox are able to view incoming email which is handy for many shared mailbox scenarios such an "Accounts mailbox", a "Service Desk mailbox", a "HR mailbox" and so on.  However, when a user with access to the shared mailbox "Sends As" the shared mailbox or "Sends on behalf" of the shared mailbox, the Sent Item goes to the users mailbox, not the shared mailbox.  This means users that share the shared mailbox cannot see the email sent on behalf of the mailbox.

See the problem?

Well this has been addressed in Exchange 2010 SP2 Update Rollup 4 and the latest update rollup in Exchange 2010 SP3.  If you are still on Exchange 2003 or 2007 you will need to upgrade to be able to use this feature.

What Microsoft has done is implement a new feature which "copies" the email "Sent As" or "Sent on behalf" of the shared mailbox TO the shared mailboxes sent items from the users primary mailbox.  This means the sent item will appear in both the shared mailbox and the users mailbox.

This needs to be manually configured on each shared mailbox with the following command:

Set-MailboxSentItemsConfiguration "shared mailbox name" -SendAsItemsCopiedTo SenderAndFrom -SendOnBehalfOfItemsCopiedTo SenderAndFrom

This command configures both SendOnBehalfOf and SendAs, if you only want to configure one of them, simply remove the one you want to not configure.

There is a problem however, this command the Set-MailboxSentItemsConfiguration and Get-MailboxSentItemsConfiguration commands were not included with Exchange 2013 or Office 365 and are still not available in the latest release Exchange 2013 CU8.

However, this feature will be coming out soon in Exchange 2013 CU9 but will have different commands and will no longer use the Set-MailboxSentItemConfiguration and Get-MailboxSentItemConfiguration cmdlets.  The commands instead will use the Set-Mailbox cmdlet with the following syntax:

set-mailbox -MessageCopyForSentAsEnabled $False
set-mailbox -MessageCopyForSendOnBehalfEnabled $False
set-mailbox -MessageCopyForSentAsEnabled $True
set-mailbox -MessageCopyForSendOnBehalfEnabled $True

Also, this feature will be enabled by default on all mailboxes in Exchange 2013 CU9.  Companies will no longer need to worry, shared mailboxes will automatically receive any emails "Sent As" or "Sent on behalf as".

More information on this new feature in Exchange 2013 CU9 can be found below:


Edit: 17-09-2015:

This feature was NOT enabled by Default as originally promised by Microsoft.  As a result you need to enable it on your shared mailboxes with the following commands:

set-mailbox -MessageCopyForSentAsEnabled $True
set-mailbox -MessageCopyForSendOnBehalfEnabled $True

Also in my lab, after installing CU9 I was not able to run the above commands as the following error was received.

A parameter cannot be found that matches parameter name 'MessageCopyForSentAsEnabled'.

 After running the CU9 installation, I then needed to manually PrepareAD with the CU9 media.

setup /PrepareAD /IAcceptExchangeServerLicenseTerms

After this I was able to enable the option on a shared mailbox.


Monday, April 6, 2015

Unable to Remove Mailbox Permission in Exchange 2013

After a cross-forest domain  migration, a customer complained that a number of their users have random SIDs of unknown accounts linked to their mailbox as shown in the following screenshot.

 This object is not inherited anywhere in the configuration partition in Active Directory, I checked the ACLs on the Databases Exchange Org and the Active Directory containers in between.

The following error shows the mailbox permission in question in more detail showing it is not Inherited.  It also shows the error message we receive when attempting to remove it:

WARNING: Can't remove the access control entry on the object "CN=ceo,OU=Civic Centre,OU=CEO,OU=Office of CEO,OU=Users,OU=COMPANY,DC=DOMAIN,DC=LOCAL" for account "S-1-5-21-3350901170-1262693169-1119774923-3651" because the ACE doesn't exist on the object.

The same error is also experienced if we include "-InheritanceType All" on the command.

After reading into this a bit more, some people have posted that using the Exchange 2003 management tools allows the object to be removed.



I do not believe building a WinXP machine and installing the legacy Adminpak.msi and Exchange 2003 system manager tools is the way to go!

After scratching my head for a while, it turns out that adding "-Deny:$True" to the end of the command allowed me to remove the ACL.

Hope this post saves you some time figuring this one out!

Monday, March 30, 2015

How to Remove SID History from Active Directory Object

In this blog post I'm going to show you how to remove the SIDHistory from an object in Active Directory after a domain migration.  If you attempt to use standard Microsoft tools such as ADSIEdit to remove the SIDHistory from an object regardless what access rights you have been assigned, the following error will be presented.

Operation failed.  Error code: 0x5
Access is denied

00000005: SecErr: DSID-031A1256, problem 4003

To remove SIDHistory from an object you need to use the following VBScript from Microsoft KB295758.


Simply copy and paste the script into a notepad document then run the script with the following arguments to remove the SIDHistory entries from the object in question.


Sunday, March 29, 2015

Windows 8 Unable to Connect through RD Gateway

A customer of mine today logged a support case stating users on Windows 8 or Windows 8.1 were unable to connect to remote computers by using a Remote Desktop Gateway (RD Gateway).

I tested this functionality and was able to reproduce the issue.  The error experienced was:

Remote Desktop can't connect to the remote computer for one of these reasons:
  1. Remote access to the server is not enabled
  2. The remote computer is turned off
  3. The remote computer is not available on the network
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.

Windows 7 clients did not receive any problems connecting through an RD Gateway.

After reviewing the group policy applied to the domain, I noticed a Group Policy object was setting the LAN Manager Authentication Level to "Send LM & NTLM - use NTLMv2 session security if negotiated".

The new RDP 8.0 client (built into Windows 8 and 8.1) requires this policy be set to "Send NLTMv2 response only" as it uses NTLMv2 and does not have the ability to negotiate authentication.  "Send NTLMv2 response only" is the default for Windows 8 and Windows 8.1.
As a test, I set a local policy on one of the Windows 8 computers using gpedit.msc and then did a gpupdate /force followed by a reboot.

After setting the LAN Manager authentication level to "Send NLTMv2 response only" I was able to connect to RD Gateways without issues.

I did not test this, but I assume if a Windows 7 client was updated to RDP v8 by installing Microsoft KB2592687, the same issue would be experienced if the LAN Manager authentication level is changed to anything other then the default.