Remko Weijnen's Blog (Remko's Blog)

About Terminal Server, Citrix, Delphi and other stuff


2,377 views

I recently had some time to play with VCDS and a friend’s RNS 315 navigation. By default there is no test mode or hidden menu with extra features like on some other Volkswagen systems.

Using VCDS we can however (temporarily) enable the Developer mode.

 

Read the rest of this entry »

  • 5 Comments
  • Filed under: General
  • 1,189 views

    Exchange Logo

    I was testing outgoing mail flow in my new Exchange 2010 setup, which should go from the CAS Servers to the Edge server in the DMZ.

    After configuring the Edge subscription I noticed that outgoing mails got stuck in the queue with the following error:

    451 4.4.0 Primary target IP address responded with: "451 5.7.3 Cannot achieve Exchange Server authentication." Attempted failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts.

    I verified that name resolution back and forth was ok and that I could communicate on port 25, 50389 and 50636.

    Read the rest of this entry »

  • 0 Comments
  • Filed under: Exchange
  • 758 views

    Logon SIDToday I was reusing some old (pre vista) code the retrieves the Logon SID that I wrote a few years ago. The Logon SID is a special SID that identifies a logon session that has the form S-1-5-5-X-Y.

    You can view your Logon SID with Process Explorer, right click a GUI process, select Properties and goto the Security Tab:

    Process Explorer|Security Tab|Logon SID

     

    Read the rest of this entry »

    482 views

    SNAGHTML1ca684c

    I needed to adapt some scripts that create a user with mailbox for Exchange 2010. The existing scripts had a hardcoded database for new mailboxes.

    I wanted the mailbox to be created in the smallest database, but how do we determine this?

    For Exchange 2010 this is fairly easy using PowerShell:

    # Add Exchange Snapins
    if ((Get-PSSnapin | where {$_.Name -match "Exchange.Management"}) -eq $null) { Add-PSSnapin Microsoft.Exchange.Management.* }

    # Get largest possible size
    $size = [Microsoft.Exchange.Data.ByteQuantifiedSize]::MaxValue.ToBytes()
    foreach ($db in Get-MailboxDatabase -Status)
    {
    #  Write-Host "Database:" $db.Name "Size:" $db.DatabaseSize.ToBytes()
       $db | select ServerName,Name,DatabaseSize

       # Is the Database smaller than previous smallest size
       if ( $db.DatabaseSize.ToBytes() -lt $size )
       {
          # This database is smaller, store size and db
          $size = $db.DatabaseSize.ToBytes()
          $ExDB = $db    
       }
    }

    Write-Host "`nSmallest Database:"
    $ExDB | select ServerName,Name,DatabaseSize

    499 views

    SNAGHTML1ca684c

    By default Exchange 2007 and 2010 are installed in Trial mode so before going into production you need to enter the Product Key.

    The Exchange Management Console will warn you if one or more servers are still in trial mode:

    image

    Read the rest of this entry »

    687 views

    The GetTokenInformation function can be used with the TokenLinkedToken Information Class on Windows Vista and higher to the linked (Elevated) token.

    This is useful when User Account Control is enabled and you want to launch an elevated process e.g. from a service.

    This example code fails however when User Account Control is disabled:

    if (bElevate)
    {
       ZeroMemory(&tlt, sizeof(tlt));
       bResult = GetTokenInformation(hToken, TokenLinkedToken, &tlt, sizeof(tlt), &RetLength);
       if (!bResult)
       {
          // Handle error here
       }
    }

    GetLastError() returns 1312 which is defined in winerror.h as ERROR_NO_SUCH_LOGON_SESSION with description “A specified logon session does not exist. It may already have been terminated.”

    So you should check if User Account Control is enabled in such cases (or make this error non critical).

    826 views

    Snippet below can be used to programmatically determine if User Account Control is enabled:

    uses
      JwaWinbase, JwaWinNt;

    function IsUACEnabled: Boolean;
    var
      hToken: THandle;
      tet: TOKEN_ELEVATION_TYPE;
      dwSize: DWORD;
    begin
      Win32Check(OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, hToken));
      // TokenElevationType class only available on Vista+
      Win32Check(GetTokenInformation(hToken, TokenElevationType, @tet, SizeOf(tet), dwSize));

      Result := tet <> TokenElevationTypeDefault;
    end;

    754 views

    SNAGHTML1ca684c

    I am currently working on an Exchange migration from 2003 to 2010. For the implementation of a load balancing solution for the CAS/HUB servers I needed to set Static RPC Ports for the RPC Client Access Service and the Exchange Address Book Service.

    The procedure of changing these ports is described on the Technet Wiki: Configure Static RPC Ports on an Exchange 2010 Client Access Server

    Since I am lazy I decided to do this with a PowerShell script that would automatically do this for all CAS/HUB servers in my 2010 environment.

    Read the rest of this entry »

    846 views

    Exchange 2010 Logo

    I got the following error while installing Exchange 2010: “There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)”

    I looked up HRESULT 0x800706D9 which is defined in winerror.h as EPT_S_NOT_REGISTERED with the same error text.

    I looked at the ExchangeSetup.log in C:\ExchangeSetupLogs and this indicates that the error occurs when the install-ADTopologyService cmdlet tries to add some rules to the firewall:

    [07-04-2011 14:03:04.0111] [2] Beginning processing install-ADTopologyService
    [07-04-2011 14:03:04.0189] [2] [WARNING] An unexpected error has occurred and a Watson dump is being generated: There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
    [07-04-2011 14:03:04.0189] [2] [ERROR] There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
    [07-04-2011 14:03:13.0751] [1] The following 1 error(s) occurred during task execution:
    [07-04-2011 14:03:13.0751] [1] 0.  ErrorRecord: There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
    [07-04-2011 14:03:13.0751] [1] 0.  ErrorRecord: System.Runtime.InteropServices.COMException (0x800706D9): There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)
       at Interop.NetFw.INetFwRules.Add(NetFwRule rule)
       at Microsoft.Exchange.Security.WindowsFirewall.ExchangeFirewallRule.Add()
       at Microsoft.Exchange.Configuration.Tasks.ManageService.Install()
       at Microsoft.Exchange.Management.Tasks.InstallADTopologyService.InternalProcessRecord()
       at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()
       at System.Management.Automation.CommandProcessor.ProcessRecord()
    [07-04-2011 14:03:13.0751] [1] [ERROR] The following error was generated when "$error.Clear();
              if (!(get-service MSExchangeADTopology* | where {$_.name -eq "MSExchangeADTopology"}))
              {
                install-ADTopologyService
              }
            " was run: "There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)".
    [07-04-2011 14:03:13.0751] [1] [ERROR] There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)


    Windows Firewall LogoThe Windows Firewall service was disabled, so I set it to Automatic, started it and enabled it and then the setup ran without errors

    1,034 views

    Mac OS X Snow LeopardI am running a virtualized Mac OS X machine in my VMWare Workstation but I noticed that after a period of inactivity the virtual machine would sometimes freeze.

    Because this only happens after inactivity I assumed it had something to do with Power Saving so I changed the Energy Saver settings and that fixed it!

    Read the rest of this entry »

  • 2 Comments
  • Filed under: Apple, VMWare
  • Profile

    Recent Tweets

    Views